- Newest
- Most votes
- Most comments
Hi. The token exchange role uses the AWS IoT Core credential provider. Please try the credentials-iot:ThingName policy variable in your IAM policy.
When you add an authorization policy on your component in your component recipe you could make use of recipe variables to specify the thing name. The policy looks something like the example in this docs and would be a part of each component that will access these secrets: https://docs.aws.amazon.com/greengrass/v2/developerguide/ipc-secret-manager.html.
As this accessControl policy is part of the component configuration, you can use the {iot:thingName} variable to specify the resource specific to your device. Greengrass will only do this recipe variable interpolation in the configuration if the interpolateComponentConfiguration Nucleus config is set to true and on Nucleus 2.6.0 or later. You can find info on the variables here as well as the configuration you will need here: https://docs.aws.amazon.com/greengrass/v2/developerguide/component-recipe-reference.html#recipe-variables.
This is almost what I’m asking for :) The difference is that I need to limit access from secrets manager to AWS core device and in your example it’s about limiting the access from core device to components deployed on it or on other client devices.
I want to avoid situation in which malicious party gets an access to the core device and can leverage this gap in IAM and fetch secrets for other core devices as well.

That works, thanks!