User-managed setup (3LO)
With user-managed setup, you sign in to Box directly to authorize the connection, and Amazon Bedrock Managed Knowledge Base handles authentication. Users can complete setup in a few minutes. After you authorize the connection, create the data source with authType set to MANAGED_OAUTH2. See Connect a Box data source.
User-managed setup does not support document-level access control (ACL). All indexed content is accessible to any user who has access to query the knowledge base. Individual permissions in Box are not enforced. Carefully review which content you include when creating a knowledge base. If you require document-level access control, use Client Credentials Grant authentication instead. See Set up Client Credentials Grant authentication for Box. For more information about document-level access control, see Access Control Lists awareness enablement.
How your credentials are stored
With user-managed setup, you do not create or provide an AWS Secrets Manager secret yourself. When you sign in, Amazon Bedrock Managed Knowledge Base creates a secret in your AWS account with a system-generated ARN and stores a 3LO refresh token in it. Amazon Bedrock Managed Knowledge Base uses the refresh token to obtain and refresh access tokens as needed to access the data source.
When you choose Sign in, you can optionally provide a secret name prefix. Amazon Bedrock Managed Knowledge Base includes this prefix in the generated secret ARN. Providing a prefix lets you create a scoped-down IAM policy that grants access only to secrets with that prefix. You can put this policy in place before the 3LO token is created. If you do not provide a prefix, Amazon Bedrock Managed Knowledge Base uses default as the prefix, so the secret ARN contains bedrock-managedkb-oauth/default/.
The generated secret ARN follows this pattern:
arn:aws:secretsmanager:region:account-id:secret:bedrock-managedkb-oauth/your-prefix/connector-type/uuid
Permissions for the caller (CreateDataSource): The IAM principal that calls CreateDataSource needs the following permissions on the secret. The console user who signs in also needs Amazon Bedrock permissions to complete the user-managed setup (3LO) flow. For the complete set of IAM permissions the console user needs, see IAM permissions for user-managed setup (3LO).
{ "Effect": "Allow", "Action": [ "secretsmanager:CreateSecret", "secretsmanager:GetSecretValue" ], "Resource": [ "arn:aws:secretsmanager:region:account-id:secret:bedrock-managedkb-oauth/your-prefix/*" ] }
Permissions for the execution role: The knowledge base execution role needs read and write access to the secret for token refresh:
{ "Effect": "Allow", "Action": [ "secretsmanager:GetSecretValue", "secretsmanager:PutSecretValue" ], "Resource": [ "arn:aws:secretsmanager:region:account-id:secret:bedrock-managedkb-oauth/your-prefix/*" ] }
You can create 3LO secrets and complete the user consent flow through the Amazon Bedrock Knowledge Bases console. You can then reference these AWS Secrets Manager entries when creating a third-party data connector (see Connect a Box data source). These entries are not associated with any knowledge base and can be used across separate knowledge bases as needed.
If you run into problems during user-managed setup, use the following guidance.
Sync fails after a period of inactivity
Symptoms:
-
Syncs fail with an authentication error after the data source has not synced for more than 60 days.
Cause:
Box refresh tokens are single-use and expire after 60 days without use. If the data source does not sync within that time, the stored refresh token can no longer be used to obtain access tokens.
Resolution steps:
-
In the Amazon Bedrock Knowledge Bases console, sign in to Box again to create a new secret.
-
Update the data source to use the new secret ARN. See Connect a Box data source.
Authentication popup fails
Symptoms:
-
Authentication popup does not appear or closes immediately.
-
Popup appears but fails to complete the OAuth flow.
Resolution steps:
-
Verify that your browser allows popups from the Amazon Bedrock KB console domain.
-
Verify that Box is accessible from your network.
-
Try using a different browser or clearing your browser cache.