Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-7466

[phoenix-connector] spark with authorization enabled cannot access phoenix tables without schema

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • connectors
    • None

    Description

      When spark enabled authorization, Spark cannot access phoenix tables without schema.
      Assuming we use userA to operate Spark, and userA has access to the default namespace on hbase

      When Spark enabled authorization by Kyuubi Spark AuthZ Plugin, and spark access phoenix tables by the following way.
      df = spark.sqlContext.read.format("phoenix")
        .options(Map("table" -> "Table1", "zkUrl" -> "phoenix-server:2181")).load;

      This phoenix table doesnot specify schema, So the authorization service cannot get the database name of this table (database is null), So it think that we are accessing an unauthorized database and denies access.

      I'm not sure if it must be a problem with phoenix-connector.
      But my solution is as follows.
      When the accessed Phoenix table does not have a schema, I convert it to default.table in PhoenixTable.

      Attachments

        Activity

          People

            Unassigned Unassigned
            guluo guluo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: