Add RBAC and call deletion functions to the web UI#347
Open
meduncan wants to merge 3 commits intoaws-samples:developfrom
Open
Add RBAC and call deletion functions to the web UI#347meduncan wants to merge 3 commits intoaws-samples:developfrom
meduncan wants to merge 3 commits intoaws-samples:developfrom
Conversation
…ced roles and permissions to provide control over who can perform read, upload, delete and permission administration. Also added logging to the API Gateway, added new Anthropic models, and set file name regex parsing to be case insensitive.
…d also built a cloudformation template which creates example CloudWatch dashboards and notifications.
…unctionality they have always had with PCA (read calls and upload calls). Also added a parameter to the CFN to trigger web UI updates when a template is upgraded. The default value in the template should match that of PCA being deployed. Later perhaps consider making this a map value instead of parameter.
Author
|
There is also a parameter added to the CloudFormation template to fix an issue with upgrades. The pca-main-nokendra.template and the pca-main.template have a "Version" parameter where the default value should be updated to match the version that will be compiled. In the version I was working on I assumed that due to the introduction of RBAC and call deletion this would be 0.8.0 so that is how I set the value. |
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.
*Issue #346, #338, *
Description of changes:
Roles have been introduced to PCA along with the ability to define roles and permissions. This is in support of enabling the ability to delete calls from the web UI. To create roles and manage permissions in the UI a user must have the manage_roles permission. Role definitions are stored in a DynamoDB table and the role is attached to the user as an attribute on the user in Cognito. The attribute is called custom:pca_role and contains the role name assigned to the user. This attribute is added to a user's access token by Cognito's Pre token generation Lambda trigger when they sign in to the PCA web UI so if permissions are changed for a user they will need to log off and log back in to receive the new entitlements.
When the PCA solution is launched the admin user is granted the admin role which has full access to the web UI. Additional roles may be created using the new Admin widget in the top right of the web UI. Note that if a role is defined with the manage_roles permission the role cannot be deleted. This is a safety measure to avoid accidental deletion of role management. When a user with manage_roles creates, deletes, or changes anything in the Role Management page that action will be logged in a CloudWatch log group called /pca/audit. These roles only affect the web UI. Authentication and authorization to access the QuickSuite dashboard, if enabled, use a different mechanism.
The permissions available are:
Notes on Upgrading from prior versions of PCA
Before performing an upgrade to an existing version of PCA you will need to update the Cognito User Pool to the Plus Feature plan. This will enable support for identity and access token enrichment.
If you perform an upgrade from a prior version of PCA your users will start with no role assigned until they log in for the first time after the upgrade. At that point they will be automatically assigned the call-readwrite role which provides them the ability to read all calls and upload calls (identical to the functionality they had in the prior version). Initially the only user with rights to assign roles and create new roles will be the admin user. If you need to elevate privileges for a user because the admin user has been deleted you can go into Cognito, go into the details of a user, and change the value of the custom:pca_role attribute to admin.
Other enhancements
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.