bedrock-claude-chat icon indicating copy to clipboard operation
bedrock-claude-chat copied to clipboard

[BUG] OpenSearch dashboards is not accesible for console user

Open konokenj opened this issue 11 months ago • 1 comments

🚨 Please Note 🚨

To ensure efficient investigation of the issue, please fill out the fields below with as much detail as possible. Reports that do not follow this template may be closed without notification. We appreciate your cooperation.

Describe the bug

With Bedrock Knowledge Bases on custom bot, users can't access OpenSearch dashboard although user has AdministratorAccess.

There are no data access control granted to IAM Roles or Users used by human. It might be a good idea to be able to configurable the OpenSearch dashboard administrator role or user in cdk.json.

To Reproduce

Steps to reproduce the behavior:

  1. Create custom bot with knowledges
  2. Go to OpneSearch Serverless collection page on AWS Management Console
  3. Click on 'dashboard' link
  4. See error

Screenshots

image

Additional context

Add any other context about the problem here.

konokenj avatar Dec 27 '24 11:12 konokenj

CDK Reference:

    const ADMIN_ROLE_ARN = "arn:aws:iam::1234567890:role/Admin";
    const dataAccessManagementConsolePolicy = new oss.CfnAccessPolicy(
      this,
      "DataAccessManagementConsolePolicy",
      {
        name: `${DATA_ACCESS_POLICY}-man`,
        type: "data",
        description: `Data access policy for ${COLLECTION_NAME} collection from management console..`,
        policy: `
        [
          {
            "Rules": [
              {
                "ResourceType": "collection",
                "Resource": ["collection/${COLLECTION_NAME}"],
                "Permission": [
                  "aoss:CreateCollectionItems",
                  "aoss:DescribeCollectionItems",
                  "aoss:DeleteCollectionItems",
                  "aoss:UpdateCollectionItems"
                ]
              },
              {
                "ResourceType": "index",
                "Resource": ["index/${COLLECTION_NAME}/*"],
                "Permission": [
                  "aoss:CreateIndex",
                  "aoss:DeleteIndex",
                  "aoss:UpdateIndex",
                  "aoss:DescribeIndex",
                  "aoss:ReadDocument",
                  "aoss:WriteDocument"
                ]
              }
            ],
            "Principal": [
              "${ADMIN_ROLE_ARN}"
            ]
          }
        ]
      `,
      }
    );

Need to consider that Admin role exists.

statefb avatar Jan 15 '25 02:01 statefb