Assigning custom permissions profiles
After you create a custom permissions profile, you can assign it to users, roles, or
accounts. Users with sufficient permissions can also use the AWS::QuickSight::CustomPermissions Amazon CloudFormation resource to manage
Amazon Quick custom permissions profiles.
Assigning a custom permissions profile (Quick console)
You can assign a custom permissions profile to specific users, roles, or to the entire account. Assigning a profile replaces any existing assignment at that level. A user, role, or account can only have one active custom permissions profile at a time.
If a user or role already has a custom permissions profile assigned, the new assignment replaces the previous one. The original profile is no longer active for that user or role. Similarly, if an account-level profile is already active, Quick displays a warning before you replace it.
To assign a custom permissions profile
-
Open the Quick console
. -
Choose Manage Quick.
-
In the left navigation, choose Permissions, and then choose Custom permissions.
-
On the Custom permissions page, locate the profile you want to assign. Choose the actions menu next to the profile, and then choose Assign.
TipYou can also assign a profile immediately after creating one. After you choose Create on the profile creation page, Quick takes you directly to the assignment page.
-
On the assignment page, configure who receives this profile:
-
Users – Enter the usernames of the users you want to assign this profile to. You can add multiple users.
-
Groups – Enter the names of the groups you want to assign this profile to. Every member of the group receives the profile. You can add multiple groups.
-
Roles – Select the Quick roles (Admin, Author, Reader) that you want to assign this profile to.
-
Set as account default – Select this option to apply the profile as the account-level default. If an account-level profile is already active, Quick displays a warning indicating that the existing assignment will be replaced.
-
-
When you are ready, choose Assign. You are returned to the custom permissions list page.
Assigning custom permissions profiles (Amazon CLI)
Before you begin, you need to set up and configure the Amazon CLI. For more information about installing the Amazon CLI, see Install or update the latest version of the Amazon CLI and Configure the Amazon CLI in the Amazon Command Line Interface User guide. You also need permissions to use the Quick API.
Updating custom permissions assignments
The following example updates the custom permissions that are assigned to a role.
aws quicksight update-role-custom-permission \ --roleROLE\ --aws-account-idAWSACCOUNTID\ --namespace default \ --custom-permissions-namePERMISSIONNAME
The following example applies a custom permissions profile to a user.
aws quicksight update-user-custom-permission \ --aws-account-idAWSACCOUNTID\ --namespace default \ --user-nameUSER_NAME\ --custom-permissions-namePERMISSIONNAME
The following example updates the custom permissions that are assigned to an account.
aws quicksight update-account-custom-permission \ --aws-account-idAWSACCOUNTID\ --custom-permissions-namePERMISSIONNAME
Removing custom permissions assignments
The following example deletes a custom permissions profile from a role.
aws quicksight delete-role-custom-permission \ --roleROLE\ --aws-account-idAWSACCOUNTID\ --namespace default
The following example deletes a custom permissions profile from a user.
aws quicksight delete-user-custom-permission \ --user-nameUSER_NAME\ --aws-account-idAWSACCOUNTID\ --namespace default
The following example removes a custom permissions profile from an account.
aws quicksight delete-account-custom-permission \ --aws-account-idAWSACCOUNTID
Describing custom permissions assignments
The following example returns the custom permissions profile that is assigned to a role.
aws quicksight describe-role-custom-permission \ --roleROLE\ --aws-account-idAWSACCOUNTID\ --namespace default
The following example returns the custom permissions profile that is assigned to an account.
aws quicksight describe-account-custom-permission \ --aws-account-idAWSACCOUNTID
Assigning profiles to groups
You can assign a custom permissions profile to a group. Every member of the group receives the profile. A user can belong to more than one group, and each group can have its own assigned profile.
Each account supports a maximum of 2,000 group assignments. A group assignment is a group that has a custom permissions profile assigned to it. If your account requires a higher limit, contact the Quick service team to request an increase.
A profile can apply to a user at several levels. Quick applies the most specific assignment, in this order: user, then group, then role, then account. A profile assigned directly to a user overrides any group profiles, and group profiles override role and account profiles. The resolution rules apply when the group level applies, that is, when the user has no profile assigned directly. For more information, see How Amazon Quick resolves multiple group assignments.
This section covers the following topics:
Custom permissions assignments read from user-identity fields will not reflect group-level custom permissions. In some cases, the value falls through to the role-level or account-level assignment instead of the group-level assignment. This behavior applies to the user-based operations that return user objects, such as DescribeUser and ListUsers. It also applies to any console page that lists users and their custom permissions. To see the effective custom permissions profile for a user, use the Check permissions feature in the custom permissions console. For more information, see Verifying permissions for a user.
Assigning a profile to a group (console)
You assign a profile to a group from the same assignment page used for users and roles. On the assignment page, in the Groups field, enter the names of the groups that you want to assign the profile to, and then choose Assign. For instructions on assigning a profile to a group, see Assigning a custom permissions profile (Quick console).
Assigning profiles to groups with the API
You manage group assignments through the Amazon Quick governance policy
management operations. In these operations, you identify the
custom permissions profile by its policy ARN (PolicyArn) and the
group by its principal ARN (PrincipalArn). For custom permissions,
the policy type (PolicyType) is CUSTOM_PERMISSIONS, and
the principal type (PrincipalType) is GROUP. These
operations currently only support group principals for custom permissions.
The following table lists the operations that manage policy assignments.
| Operation | Description |
|---|---|
|
Assigns a profile to one group, replacing any existing
custom permissions assignment on that group. Returns the assigned
|
|
Assigns one profile to between 1 and 50 groups in a
single call. The call is not atomic: The response lists
|
|
Returns the profile currently assigned to a group for a
given |
|
Removes a group's assignment to the named profile. It is idempotent: Removing an assignment that is not present still succeeds. If the group is assigned a different profile, the call fails with a conflict, so you do not remove the wrong one. |
|
Removes between 1 and 50 groups' assignments to one
profile in a single call. The call is not atomic: Inspect
|
|
Lists the principals assigned to a profile (a reverse
lookup by |
These operations share the following parameters.
AccountId-
The ID of the Amazon account that contains the Quick account.
PolicyArn-
The ARN of the custom permissions profile to assign or remove.
PrincipalArn-
The ARN of the group the assignment applies to.
PolicyType-
The policy type. For custom permissions, use
CUSTOM_PERMISSIONS. PrincipalType-
The principal type. For custom permissions, group assignments use
GROUP, which is currently the only supported value. OnListPrincipalsForPolicy, this is an optional filter. ExistingPolicyArn-
(Optional) The profile you believe is currently assigned to the group. When you provide it, the write proceeds only if it matches the current assignment, which prevents overwriting an assignment that changed since you last read it.
Revision-
(Optional) A compare-and-set token returned by the most recent read. When you provide it on a write, the change is applied only if it matches the assignment's current revision, which guards against concurrent updates.
Example commands (Amazon CLI)
The following examples show how to manage group assignments with the Amazon Command Line Interface (Amazon CLI). The example commands use placeholders for values that you replace with your own:
account-id– The ID of your Amazon account.region– The Amazon Region of your Quick account.profile-name– The name of the custom permissions profile.group-name– The name of the group, in thedefaultnamespace.
PutPolicyAssignment assigns the profile to one group:
aws quicksight put-policy-assignment \ --account-idaccount-id\ --policy-arn arn:aws:quicksight:region:account-id:custompermissions/profile-name\ --principal-arn arn:aws:quicksight:region:account-id:group/default/group-name
To make the assignment conditional, add --existing-policy-arn
(the profile you expect is currently assigned) or --revision
(the token from your last read). The assignment proceeds only if the value
matches the current assignment:
aws quicksight put-policy-assignment \ --account-idaccount-id\ --policy-arn arn:aws:quicksight:region:account-id:custompermissions/profile-name\ --principal-arn arn:aws:quicksight:region:account-id:group/default/group-name\ --existing-policy-arn arn:aws:quicksight:region:account-id:custompermissions/existing-profile-name\ --revision 3
BatchPutPolicyAssignmentByPolicy assigns one profile to up to
50 groups. The call is not atomic, so the output reports
Success and Errors separately:
aws quicksight batch-put-policy-assignment-by-policy \ --account-idaccount-id\ --policy-arn arn:aws:quicksight:region:account-id:custompermissions/profile-name\ --assignments \ PrincipalArn=arn:aws:quicksight:region:account-id:group/default/group-1\ PrincipalArn=arn:aws:quicksight:region:account-id:group/default/group-2
GetPolicyAssignment returns the profile currently assigned to a group:
aws quicksight get-policy-assignment \ --account-idaccount-id\ --policy-type CUSTOM_PERMISSIONS \ --principal-arn arn:aws:quicksight:region:account-id:group/default/group-name
DeletePolicyAssignment removes a group's assignment to the named profile:
aws quicksight delete-policy-assignment \ --account-idaccount-id\ --policy-arn arn:aws:quicksight:region:account-id:custompermissions/profile-name\ --principal-arn arn:aws:quicksight:region:account-id:group/default/group-name
BatchDeletePolicyAssignmentByPolicy removes up to 50 groups' assignments to one profile:
aws quicksight batch-delete-policy-assignment-by-policy \ --account-idaccount-id\ --policy-arn arn:aws:quicksight:region:account-id:custompermissions/profile-name\ --principal-arns \ arn:aws:quicksight:region:account-id:group/default/group-1\ arn:aws:quicksight:region:account-id:group/default/group-2
ListPrincipalsForPolicy lists the groups assigned to a profile. Filter with --principal-type and page with --max-results and --next-token:
aws quicksight list-principals-for-policy \ --account-idaccount-id\ --policy-arn arn:aws:quicksight:region:account-id:custompermissions/profile-name\ --principal-type GROUP \ --max-results 50
How Amazon Quick resolves multiple group assignments
When a user belongs to more than one group and the group level applies, Quick combines all of the user's group profiles. A capability is available to the user only if none of their group profiles denies it. If any group profile denies a capability, it is denied for the user. This is the most restrictive combination of the profiles.
Deny by Default profiles take part the same way. A Deny by Default profile denies every capability in its restricted category except the capabilities it explicitly allows. This includes capabilities that Quick launches in that category later. Quick combines those denials with the other groups' denials.
The order of the groups does not matter. The combined result is the same.
Example 1: Two standard profiles
Scenario: A user belongs to two groups. The
group Finance has the profile FinanceNoExport, which denies
ExportToCsv and ExportToPdf. The group Reporting has
the profile NoExcelExport, which denies ExportToExcel. Both
are standard (allow-by-default) profiles.
{ "CustomPermissions": { "CustomPermissionsName": "FinanceNoExport", "Capabilities": { "ExportToCsv": "DENY", "ExportToPdf": "DENY" } } }
{ "CustomPermissions": { "CustomPermissionsName": "NoExcelExport", "Capabilities": { "ExportToExcel": "DENY" } } }
The following table shows how each group's denials combine for the user.
| Capability | Denied by FinanceNoExport |
Denied by NoExcelExport |
Denied for the user |
|---|---|---|---|
|
Yes |
No |
Yes |
|
Yes |
No |
Yes |
|
No |
Yes |
Yes |
|
No |
No |
No |
Result: The user is denied
ExportToCsv, ExportToPdf, and
ExportToExcel. All other capabilities, such as
ChatAgent, stay available because neither profile denies
them.
Example 2: One Deny by Default profile and one standard profile
Scenario: The group Finance has the standard
profile FinanceNoExport, which denies ExportToCsv. The
group AIReview has the profile RestrictAI, a Deny by Default profile
on the AI category that explicitly allows only
ChatAgent. RestrictAI therefore denies every AI
capability except ChatAgent, for example, Flow and
Automate, and also denies any AI capability launched later.
{ "CustomPermissions": { "CustomPermissionsName": "FinanceNoExport", "Capabilities": { "ExportToCsv": "DENY" } } }
{ "CustomPermissions": { "CustomPermissionsName": "RestrictAI", "Capabilities": { "ChatAgent": "ALLOW" }, "Governance": { "DefaultCategoryEffects": { "AI": "DENY_BY_DEFAULT" } } } }
The following table shows how each group's denials combine for the user.
| Capability | Denied by FinanceNoExport |
Denied by RestrictAI |
Denied for the user |
|---|---|---|---|
|
Yes |
No |
Yes |
|
No |
Yes |
Yes |
|
No |
No |
No |
A new AI capability launched later |
No |
Yes |
Yes |
Result: The user is denied
ExportToCsv, Flow, and every other AI capability
except ChatAgent, including future AI capabilities.
ChatAgent stays available because RestrictAI allows it,
and FinanceNoExport does not deny it.
Example 3: Two Deny by Default profiles
Scenario: Both of the user's groups use
Deny by Default on the AI category but allow different capabilities.
The group TeamA has the profile AI-TeamA, which allows
ChatAgent and Research. The group TeamB has the profile
AI-TeamB, which allows ChatAgent and Topic.
Each profile denies every other AI capability, current and future.
{ "CustomPermissions": { "CustomPermissionsName": "AI-TeamA", "Capabilities": { "ChatAgent": "ALLOW", "Research": "ALLOW" }, "Governance": { "DefaultCategoryEffects": { "AI": "DENY_BY_DEFAULT" } } } }
{ "CustomPermissions": { "CustomPermissionsName": "AI-TeamB", "Capabilities": { "ChatAgent": "ALLOW", "Topic": "ALLOW" }, "Governance": { "DefaultCategoryEffects": { "AI": "DENY_BY_DEFAULT" } } } }
The following table shows how each group's denials combine for the user.
| Capability | Denied by AI-TeamA |
Denied by AI-TeamB |
Denied for the user |
|---|---|---|---|
|
No |
No |
No |
|
No |
Yes |
Yes |
|
Yes |
No |
Yes |
Any other AI capability (current or future) |
Yes |
Yes |
Yes |
Result: Among AI capabilities, only
ChatAgent, the capability both profiles allow, stays available.
Research and Topic are each denied because only one of
the two profiles allows them. When two Deny by Default profiles combine, the user
keeps only the capabilities that both profiles explicitly allow.
To test the custom permissions that are applied to a role or user, log in to the user's account. When a user logs into Quick, they are granted the highest privilege role that they have access to. The highest privileged role a user can be granted is Admin. The lowest privileged role that a user can be granted is Reader. For more information about roles in Quick, see Managing user access inside Quick.
Verifying permissions for a user
After you assign a custom permissions profile, you can verify which profile is active for any user and at which level it applies.
To verify a user's active permissions profile
-
Open the Quick console
. -
Choose Manage Quick.
-
In the left navigation, choose Permissions, and then choose Custom permissions.
-
Choose Check permissions.
-
Enter the username of the user you want to verify.
-
Quick displays the active profile name and the level at which it applies (user, group, role, or account). When the group level applies, a user can belong to more than one group that has an assigned profile. In that case, Quick shows the profiles from all of those groups, because the user's effective permissions combine them. For more information, see How Amazon Quick resolves multiple group assignments.
Use this feature to confirm that Deny by Default profiles are correctly applied and that precedence is working as expected.