feature(GH-1613)- New policy management types#1762
Open
TejasRGitHub wants to merge 17 commits intodata-dot-all:mainfrom
Open
feature(GH-1613)- New policy management types#1762TejasRGitHub wants to merge 17 commits intodata-dot-all:mainfrom
TejasRGitHub wants to merge 17 commits intodata-dot-all:mainfrom
Conversation
# Conflicts: # backend/dataall/core/environment/db/environment_models.py
TejasRGitHub
commented
Feb 12, 2025
| ) | ||
| ) | ||
| if filter and filter.get('groupUri'): | ||
| print('filter group') |
Collaborator
Author
There was a problem hiding this comment.
removing print statement
TejasRGitHub
commented
Feb 12, 2025
| # If environment role is created in environment stack, then data.all should attach the policies in the env stack | ||
| # If environment role is imported, then data.all should attach the policies at import time ( Fully Managed ) | ||
| # If environment role is created in environment stack, then data.all should attach the policies in the env stack ( Partially Managed - Here policy will be created but won't be attached ) | ||
| policy_management: str = ( |
Collaborator
Author
There was a problem hiding this comment.
Earlier, when the dataallManaged = True, then share policies were getting attached via the API calls. But when dataallManaged = False, then the share policies were not attached via API calls instead are attached via CF templates.
Mapping this logic to the new policy management types and keeping the functionality same
TejasRGitHub
commented
Feb 12, 2025
| consumption_role: ConsumptionRole = EnvironmentService.get_consumption_role(session, uri=principal_id) | ||
| return consumption_role.dataallManaged | ||
|
|
||
| return PolicyManagementOptions.FULLY_MANAGED.value |
Collaborator
Author
There was a problem hiding this comment.
If the role is not a consumption role, then all other roles( i.e. env groups ,etc ) are treated as Fully Managed
TejasRGitHub
commented
Feb 12, 2025
|
|
||
| @staticmethod | ||
| @ResourcePolicyService.has_resource_permission(environment_permissions.GET_ENVIRONMENT) | ||
| def get_consumption_role_by_name(uri, IAMRoleName): |
Collaborator
Author
There was a problem hiding this comment.
get_consumption_role_by_name , remving this static method as it was not used any where
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feature or Bugfix
Detail
Relates
Testing
Security
Please answer the questions below briefly where applicable, or write
N/A. Based onOWASP 10.
fetching data from storage outside the application (e.g. a database, an S3 bucket)? Yes
evalor similar functions are used? YesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.