Michael Smith has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/24800 )

Change subject: IMPALA-15217: Authorize URIs for avro.schema.url when loading
......................................................................

IMPALA-15217: Authorize URIs for avro.schema.url when loading

Adds authorization checks for 'avro.schema.url' when creating a table or
altering a table to add the property. If an HTTP URL, checks that the
user has permission to read the specified URL. If any other URL, it also
requires that the path exist.

Authorization is now performed before reading from the source at
'avro.schema.url'; schema parsing for remote schemas moves to
CatalogOpExecutor. New end-to-end tests are added to verify that
CatalogOpExecutor catches the same errors and uses matching schema
reconciliation.

Verification and authorization are now also done when changing the file
format of a table to avro if the 'avro.schema.url' property is present.

Updates ColumnDef#toFieldSchemas to lower-case types for uses where the
results are not subsequently lower-cased. Previously all calls were
later lower-cased through CatalogOpExecutor#buildFieldSchemaList.

New tests are added for authorization of 'avro.schema.url'.

Assisted-by: Claude Sonnet 4.6 (VSCode)
Change-Id: Idf9a9b3e95c495f232057515a047802bc963b555
Reviewed-on: http://gerrit.cloudera.org:8080/24800
Reviewed-by: Michael Smith <[email protected]>
Tested-by: Michael Smith <[email protected]>
---
M fe/src/main/java/org/apache/impala/analysis/AlterTableSetFileFormatStmt.java
M fe/src/main/java/org/apache/impala/analysis/AlterTableSetTblProperties.java
M fe/src/main/java/org/apache/impala/analysis/ColumnDef.java
M fe/src/main/java/org/apache/impala/analysis/CreateTableStmt.java
M fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
M fe/src/main/java/org/apache/impala/util/AvroSchemaUtils.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java
M fe/src/test/java/org/apache/impala/common/FrontendFixture.java
M fe/src/test/java/org/apache/impala/common/FrontendTestBase.java
A tests/authorization/test_avro_schema_url.py
11 files changed, 658 insertions(+), 195 deletions(-)

Approvals:
  Michael Smith: Looks good to me, approved; Verified

--
To view, visit http://gerrit.cloudera.org:8080/24800
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Idf9a9b3e95c495f232057515a047802bc963b555
Gerrit-Change-Number: 24800
Gerrit-PatchSet: 3
Gerrit-Owner: Michael Smith <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Fang-Yu Rao <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Peter Rozsa <[email protected]>
Gerrit-Reviewer: Sai Hemanth Gantasala <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>

Reply via email to