Skip to content
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

adding update consumption role capability #1020

Merged

Conversation

petrkalos
Copy link
Contributor

@petrkalos petrkalos commented Jan 30, 2024

Feature or Bugfix

  • Feature

Detail

Relates

Security

Please answer the questions below briefly where applicable, or write N/A. Based on
OWASP 10.

Testing

Tested with multiple accounts and roles

  • Locally
  • AWS account
  • Added unit-tests
    • Mocked the entire sts client as the tests were sending request to AWS
  • 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.

@petrkalos petrkalos force-pushed the feature/update_consumption_role branch 2 times, most recently from 9df37da to 44dc83a Compare February 1, 2024 15:05
@petrkalos petrkalos force-pushed the feature/update_consumption_role branch from 44dc83a to 823e8b1 Compare February 5, 2024 11:28
@noah-paige
Copy link
Contributor

noah-paige commented Feb 5, 2024

Testing this PR now:

  • Deploy to AWS w/ CICD Pipeline
  • EnvironmentTeams View Loads
  • Pagination of ConsumptionRole Tables
  • Edit & Cancel Existing Consumption Role Name and Owner
  • Edit & Save Existing Consumption Role Name and Owner
  • Check Shares for Existing Consumption Role - Principal Name Updated
  • Delete Existing Consumption Role
  • Create New Consumption Role
  • Edit New Consumption Role
  • Delete Consumption Role

This feature looks great - I really like the use of DataGrid and think we should take some time to move all of our tables to similar structure

Left some minor comments on formatting and such - i think once tests are added and comments addressed we should be good to merge

@petrkalos petrkalos marked this pull request as ready for review February 6, 2024 11:27
(
and_(
ConsumptionRole.consumptionRoleUri == uri,
ConsumptionRole.environmentUri == env_uri,
Copy link
Contributor

@dlpzx dlpzx Feb 6, 2024

Choose a reason for hiding this comment

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

The consumptionRoleUri is unique, we do not need the environmentUri filter, which means that in the mutation we can just have consumptionUri and updateConsumptionUriInput as inputs, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Make sense, I will remove it from the entire stack

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actually are we sure it's unique? get_environment_consumption_role doesn't make that assumption? I think I will reuse this method as well (I should have anyway) for safety

Copy link
Contributor

Choose a reason for hiding this comment

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

good call - let's re-use that method get_environment_consumption_role

Copy link
Contributor

@noah-paige noah-paige left a comment

Choose a reason for hiding this comment

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

looks good - approved!

@petrkalos petrkalos merged commit d86c07f into data-dot-all:main Feb 7, 2024
8 checks passed
@petrkalos petrkalos deleted the feature/update_consumption_role branch February 7, 2024 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants