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

Pass x-amzn-iot-thingname header when authenticating to IoT Data Plane #207

Open
supergillis opened this issue Oct 24, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@supergillis
Copy link

supergillis commented Oct 24, 2024

Describe the bug
The IotDataPlaneClientFactory is not passing the thing name as x-amzn-iot-thingname HTTP header. This prevents us from using IoT Core Policy variables like iot:Connection.Thing.ThingName.

To Reproduce
Use ${iot:Connection.Thing.ThingName} in the IoT Core Policy for iot:*ThingShadow.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": [
        "iot:GetThingShadow",
        "iot:UpdateThingShadow",
        "iot:DeleteThingShadow",
        "iot:ListNamedShadowsForThing"
      ],
      "Effect": "Allow",
      "Resource": [
        "arn:aws:iot:eu-west-1:831588550848:thing/${iot:Connection.Thing.ThingName}",
        "arn:aws:iot:eu-west-1:831588550848:thing/${iot:Connection.Thing.ThingName}/*"
      ]
    }
  ]
}

Expected behavior
The AWS IoT Core policy using the policy variable iot:Connection.Thing.ThingName should work.

Actual behavior
Synchronizing shadows with the shadow manager does not work. You have to set Resource to * for it to work.

@supergillis supergillis added the bug Something isn't working label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant