Cognito - Dynamic Role

0

Hi,
i'm implementing an application in the IoT domain. Every user would be able to communicate with his personal provider, so i would like to have temporary credentials, using Identity Pools, that permit the user to publish and subscribe only for the topic associate with his device.

There is a way to return temporary credentials based on a particular user? I would like federate Cognito User Pool with Identity Pool and use a way to have dynamic roles. So if the user X can only publish and subscribe the topic Y, i would like to return the temporary credentials linked to a role that permit only to operate with this topic.

Have i to use the choose of role based on rule?

Thanks in advance.

Marco G.

Edited by: MarcoG on May 18, 2019 3:45 PM

MarcoG
질문됨 5년 전321회 조회
2개 답변
0

Hi,
we have used the AttachPolicy method with Cognito User Pool and Cognito Identity Pool. In this way we can attach dynamically policy to user session.

Thanks.

MarcoG
답변함 5년 전
0

Thank you for reaching out. I understand that you are working on an IoT application where each user needs to communicate with their personal provider. To enable this, you are looking for a solution to obtain temporary credentials through Identity Pools. These credentials should allow users to publish and subscribe only to the topics associated with their respective devices.

In regards to your question, yes, there is a way to retrieve temporary credentials based on a specific user. You can achieve this by federating the Cognito User Pool with the Identity Pool and implementing dynamic roles. By doing so, you can assign roles to users based on their specific permissions and access requirements. For instance, if user X is limited to publishing and subscribing to topic Y, you can configure the temporary credentials to be associated with a role that grants permissions solely for that topic.

To accomplish this, you can by using rule-based mapping to assign roles to users within the Identity Pool configuration. By defining rules based on your specific requirements, you can dynamically assign roles to users when they authenticate and obtain temporary credentials accordingly.

https://docs.aws.amazon.com/cognito/latest/developerguide/role-based-access-control.html

profile pictureAWS
답변함 10달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인