Skip to content

Conversation

@takezoe
Copy link
Member

@takezoe takezoe commented Mar 15, 2025

Description

Improve messages for column access error in FileBasedAccessControl and FileBasedSystemAccessControl to make those messages consistent with other access control implementations.

Other access controls show requested columns when column-level access check fails.

public void checkCanSelectFromColumns(SystemSecurityContext context, CatalogSchemaTableName table, Set<String> columns)
{
for (RangerTrinoResource resource : RangerTrinoResource.forColumns(table.getCatalogName(), table.getSchemaTableName().getSchemaName(), table.getSchemaTableName().getTableName(), columns)) {
if (!hasPermission(resource, context, SELECT, "SelectFromColumns")) {
denySelectColumns(table.getSchemaTableName().getTableName(), columns);
}
}
}

@Override
public void checkCanSelectFromColumns(SystemSecurityContext context, CatalogSchemaTableName table, Set<String> columns)
{
checkTableAndColumnsOperation(context, "SelectFromColumns", table, columns, AccessDeniedException::denySelectColumns);
}

Additional context and related issues

Release notes

( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:

## Section
* Fix some things. ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label Mar 15, 2025
@takezoe takezoe force-pushed the improve-filebased-access-control-error-message branch 2 times, most recently from b0c6bba to 95d5af1 Compare March 15, 2025 03:27
@github-actions github-actions bot added the hive Hive connector label Mar 15, 2025
@takezoe takezoe force-pushed the improve-filebased-access-control-error-message branch from 95d5af1 to 99856ff Compare March 15, 2025 03:51
@github-actions
Copy link

github-actions bot commented Apr 7, 2025

This pull request has gone a while without any activity. Ask for help on #core-dev on Trino slack.

@github-actions github-actions bot added the stale label Apr 7, 2025
@github-actions
Copy link

Closing this pull request, as it has been stale for six weeks. Feel free to re-open at any time.

@github-actions github-actions bot closed this Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant