-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: worksheet UI improvements - fix Team and list Environments of Team #1111
Conversation
@@ -517,6 +517,8 @@ def update_consumption_role(session, uri, env_uri, input): | |||
|
|||
@staticmethod | |||
def query_user_environments(session, username, groups, filter) -> Query: | |||
if filter and filter.get('SamlGroupName') and filter.get('SamlGroupName') in groups: | |||
groups = [filter.get('SamlGroupName')] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this new groups variable mean? Why we need to change the initial groups?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
groups includes all the groups that the user belongs to, SamlGroupName includes a single group. We verify that the selected group is part of the groups of the user
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But why afterwards you want to reset groups as the array consisting only of filter.get('SamlGroupName')
?
It seems to be not safe, since we eliminate all other groups. I know, it won't be saved to database, but still in further code we cant refer to groups
as all the groups that the user belongs to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep the bar high :) I have changed the way of doing this in this commit: 44262c7
I still need to test, but that will wait until tomorrow
I want to do some investigation on the issue for consumption roles. Moving the PR to draft |
Feature or Bugfix
Detail
Testing
Testing scenario:
Worksheet owned by TeamA
Insufficient permissions to execute the query. Insufficient Lake Formation permission(s) on rl_imported_central_sse_c3
TABLE_NOT_FOUND: line 1:15: Table 'awsdatacatalog.dataall_lcreated_a2_l7pm61ii_shared.books_raw' does not exist
---> FIXED!Worksheet owned by TeamB
Issues found:
getSharedDatasetTables
--> FixedRelates
Security
Please answer the questions below briefly where applicable, or write
N/A
. Based onOWASP 10.
N/A
fetching data from storage outside the application (e.g. a database, an S3 bucket)?
eval
or similar functions are used?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.