Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jhonangelmireles opened this issue May 23, 2024 · 1 comment · May be fixed by #502
Open

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

jhonangelmireles opened this issue May 23, 2024 · 1 comment · May be fixed by #502
Labels
documentation This is a problem with documentation. p3 This is a minor priority issue pending-release This issue will be fixed by an approved PR that hasn't been released yet.

Comments

@jhonangelmireles
Copy link

jhonangelmireles commented May 23, 2024

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

@jhonangelmireles jhonangelmireles added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels May 23, 2024
@jmklix jmklix linked a pull request May 24, 2024 that will close this issue
@jmklix jmklix added p3 This is a minor priority issue pending-release This issue will be fixed by an approved PR that hasn't been released yet. and removed needs-triage This issue or PR still needs to be triaged. labels May 24, 2024
@jmklix
Copy link
Member

jmklix commented May 24, 2024

Thanks for pointing out this error in our docs. I've made a PR to fix this.

@jmklix jmklix linked a pull request May 24, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This is a problem with documentation. p3 This is a minor priority issue pending-release This issue will be fixed by an approved PR that hasn't been released yet.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants