Skip to content

Policy for /browser/custom_authorizer_connect sample project is missing details #501

Open
@jhonangelmireles

Description

Describe the issue

The websocket connection will fail unless the Lambda function return the following policy:

{
  "isAuthenticated": true,
  "principalId": "TEST123",
  "policyDocuments": [
    {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Action": ["iot:Connect"],
          "Effect": "Allow",
          "Resource": [
            "arn:aws:iot:us-east-1:123456789012:client/custom_authorizer_connect_sample*"
          ]
        },
        {
          "Action": ["iot:Publish"],
          "Effect": "Allow",
          "Resource": ["arn:aws:iot:us-east-1:123456789012:topic/test/topic"]
        },
        {
          "Action": ["iot:Subscribe"],
          "Effect": "Allow",
          "Resource": [
            "arn:aws:iot:us-east-1:123456789012:topicfilter/test/topic"
          ]
        },
        {
          "Action": ["iot:Receive"],
          "Effect": "Allow",
          "Resource": ["arn:aws:iot:us-east-1:578079176758:topic/test/topic"]
        }
      ]
    }
  ],
  "disconnectAfterInSeconds": 3600,
  "refreshAfterInSeconds": 300
}

Links

https://github.com/aws/aws-iot-device-sdk-js-v2/tree/main/samples/browser/custom_authorizer_connect

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    documentationThis is a problem with documentation.p3This is a minor priority issuepending-releaseThis issue will be fixed by an approved PR that hasn't been released yet.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions