-
Notifications
You must be signed in to change notification settings - Fork 81
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
CICD Integration tests: new shares for pre-existing datasets #1611
Conversation
if list_organizations(client6).count == 0: | ||
invite_team_to_organization(client5, persistent_cross_acc_env_1.organization.organizationUri, group6) | ||
if list_environments(client6).count == 0: |
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.
if org/env have non-zero count because of some other change (i.e a manual change or some other test changing it) group6
will end up not invited.
I think it would be better if you invite_to_org/invite_to_env and then catch the errors if any (i.e already part of the env/group)
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.
I added an explicit check by uri
|
||
|
||
@pytest.fixture(scope='session') | ||
def session_consumption_role_2( |
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.
perhaps create a contextmanager and reuse it for all consumption_roles?
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.
lgtm, let's wait a bit till we merge it
return group_workgroup | ||
elif env_workgroup: | ||
return env_workgroup | ||
return default_workgroup |
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.
If here we are returning the workgroup for groups (not for consumption roles) we should throw an error instead of returning the primary if no group_workgroup or env_workgroup is found
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.
Left one minor comment
@@ -697,7 +697,7 @@ def create_integration_tests_role(self): | |||
], | |||
effect=iam.Effect.ALLOW, | |||
resources=[ | |||
f'arn:aws:iam::{self.account}:role/dataall-test-*', | |||
f'arn:aws:iam::{self.account}:role/dataall-test*', |
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.
This was made, so the int test role could ListPolicies for role dataall-testgroup-*
<!-- please choose --> - Feature For group share and consumption role shares perform - [x] Create Share request - [x] Submit request without Items (not allowed) - [x] Add items to request - [x] Submit request - [x] Change request purpose - [x] Reject request - [x] Change reject purpose - [x] Approve request - [x] Request succeeded - [x] Item health verification - [x] Folder sharing validation (cal list objects via s3 accesspoint) - [x] Bucket sharing validation (cal list objects in s3 bucket ) - [x] Table sharing validation (cal perform athena query: select * from db.table ) - [x] Revoke items - [x] Folder sharing validation (no more access) - [x] Bucket sharing validation (no more access) - [x] Table sharing validation (no more access) - [x] Delete share Tests are the same as for new shares for new datasets Fixtures are parametrised - #1376 Please answer the questions below briefly where applicable, or write `N/A`. Based on [OWASP 10](https://owasp.org/Top10/en/). - Does this PR introduce or modify any input fields or queries - this includes fetching data from storage outside the application (e.g. a database, an S3 bucket)? - Is the input sanitized? - What precautions are you taking before deserializing the data you consume? - Is injection prevented by parametrizing queries? - Have you ensured no `eval` or similar functions are used? - Does this PR introduce any functionality or component that requires authorization? - How have you ensured it respects the existing AuthN/AuthZ mechanisms? - Are you logging failed auth attempts? - Are you using or adding any cryptographic features? - Do you use a standard proven implementations? - Are the used keys controlled by the customer? Where are they stored? - Are you introducing any new policies/roles/users? - Have you used the least-privilege principle? How? By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Co-authored-by: Sofia Sazonova <[email protected]>
Feature or Bugfix
Detail
For group share and consumption role shares perform
Tests are the same as for new shares for new datasets
Fixtures are parametrised
Relates
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)?
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.