Skip to content

Conversation

@arjunp99
Copy link
Contributor

@arjunp99 arjunp99 commented Oct 8, 2025

Branch: fix-cross-account-resource-link-permissions

File: backend/dataall/modules/s3_datasets/cdk/pivot_role_datasets_policy.py
Commit: cce0a50f - "Fix for cross account permissions and also to remove incorrect permissions"


Changes Made

1. GlueCatalog Policy Statement - Cross-Account Fix

Original (Incorrect - Account-Specific):

resources=[
    f'arn:aws:glue:*:{self.account}:catalog',
    f'arn:aws:glue:*:{self.account}:database/*',
    f'arn:aws:glue:*:{self.account}:table/*/*',
]

** Updated (Fixed - Cross-Account Support):

resources=[
    'arn:aws:glue:*:*:catalog',
    'arn:aws:glue:*:*:database/*',
    'arn:aws:glue:*:*:table/*/*'
]
  1. LakeFormation Policy Statement - Cross-Account Fix

Updated (Fixed - Cross-Account Support):

resources=[
    f'arn:aws:lakeformation:{self.region}:*:catalog',
    f'arn:aws:lakeformation:{self.region}:*:catalog:*',
    f'arn:aws:lakeformation:{self.region}:*:database/*',
    f'arn:aws:lakeformation:{self.region}:*:table/*/*',
    f'arn:aws:lakeformation:{self.region}:*:data-location/*',
    f'arn:aws:lakeformation:{self.region}:*:lf-tag/*'
]
  1. Removed Incorrect Glue Actions

Removed / Updated Permissions:

  • 'glue:GetTags' → Added in updated version
  • 'glue:ListDatabases' → Removed (redundant/incorrect)
  • 'glue:ListTables' → Removed (redundant/incorrect)
  • 'glue:ListPartitions' → Removed (redundant/incorrect)

Key Improvements

This fix enables the pivot role to work with cross-account resources by:

  • Allowing access to Glue catalogs, databases, and tables across all accounts (* instead of {self.account}
  • Enabling Lake Formation permissions across accounts for proper data governance
  • Removing redundant Glue list permissions that were causing policy bloat

TejasRGitHub
TejasRGitHub previously approved these changes Oct 8, 2025
Copy link
Collaborator

@TejasRGitHub TejasRGitHub left a comment

Choose a reason for hiding this comment

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

+1

@TejasRGitHub TejasRGitHub requested a review from petrkalos October 8, 2025 18:32
'glue:ListTables',
'glue:ListPartitions',
'glue:SearchTables',
'glue:GetTagsglue:SearchTables',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Incorrect synctax.

@TejasRGitHub TejasRGitHub self-requested a review October 13, 2025 16:37
@TejasRGitHub TejasRGitHub dismissed their stale review October 13, 2025 16:37

Incorrect syntax

Copy link
Collaborator

@TejasRGitHub TejasRGitHub left a comment

Choose a reason for hiding this comment

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

+1

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