How can I restrict certain topics when not using AWS Cognito?

0

I am using AWS IoT for a webapp and I need to restrict some topics so that only a specific user (client) can connect to them.

How can I achieve this? My app uses lambda functions with topicRule event listeners to trigger application code. I'm using the beta custom authentication and passing IoT authentication data through the username/password at connect.

I am not using cognito for authentication and again my javascript app sends auth token when connecting to mqtt. The developer guide only shows how to do it when using cognito which I am not (https://docs.aws.amazon.com/iot/latest/developerguide/pub-sub-policy.html).

How could I check the authentication data when a client attempts to subscribe to a certain topic and verify they are authorized to do so?

Thanks!

Edited by: phasetwo on Aug 15, 2020 1:10 AM

borg
질문됨 4년 전200회 조회
1개 답변
0

solved by using custom authorizer function and specifying a policy specific to a logged in user

borg
답변함 4년 전

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

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

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

관련 콘텐츠