Skip to content

Fix/glue lakeformation access denied get database#358

Closed
rpoluri wants to merge 3 commits into
mainfrom
fix/glue-lakeformation-access-denied-get-database
Closed

Fix/glue lakeformation access denied get database#358
rpoluri wants to merge 3 commits into
mainfrom
fix/glue-lakeformation-access-denied-get-database

Conversation

@rpoluri

@rpoluri rpoluri commented Jun 25, 2026

Copy link
Copy Markdown

📝 Description

Handle LakeFormation Access Denied Excpetion when describing invalid Database and Tables in Glue Catalogs.

🔗 Related Issues

Raj Poluri and others added 3 commits June 24, 2026 19:47
…on for Glue federations

When a client describes a non-existent database on a Glue/Lake Formation-backed
metastore, Lake Formation returns AccessDeniedException instead of
EntityNotFoundException to prevent database enumeration. This caused waggle-dance
to surface a confusing AWS error to clients rather than the standard Hive
NoSuchObjectException.

Adds isGlueBackend() to MetaStoreMapping (propagated via MetaStoreMappingImpl and
MetaStoreMappingDecorator, set from GlueConfig presence in MetaStoreMappingFactoryImpl)
so get_database can scope the translation to Glue federations only.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…on for get_table on Glue federations

Same pattern as get_database: Lake Formation returns AccessDeniedException instead
of EntityNotFoundException for non-existent tables to prevent enumeration. Applied
the translation in both get_table and get_table_req so clients receive the standard
Hive NoSuchObjectException regardless of which path the caller uses.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@rpoluri rpoluri requested a review from a team as a code owner June 25, 2026 01:07

@javsanbel2 javsanbel2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should not be the place where this exception is handled

Have you considered handling the exception here? https://github.com/ExpediaGroup/aws-glue-data-catalog-client-for-apache-hive-metastore/tree/branch/waggle-dance

This library is used within Waggledance to connect to Glue as a thrift client

@javsanbel2

Copy link
Copy Markdown
Contributor

Done as part of #359

@javsanbel2 javsanbel2 closed this Jun 25, 2026
@javsanbel2 javsanbel2 deleted the fix/glue-lakeformation-access-denied-get-database branch June 25, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants