Cognito: Require Federated AD Group to be returned in Access Token

1

A customer is integrating Cognito with Ping to allow federation with Active Directory. The access token generated by Cognito is then passed to Istio to provide RBAC based on Istio policies to backend Java apps in AWS. These policies are based on the AD Group. When using Ping without Cognito they can take the AD Group (memberOf) that is returned as 'group' in the Ping response authorize the user in Istio and authorization completes successfully. When using Cognito the AD group is not present and they have not been able to find a method to include or inject it as a custom attribute.

Is there a recommended method to allow for AD groups to be forwarded in the Access Token by Cognito? My initial assumption is that there would need to maybe be a mapping to a Cognito Group or an override in the Pre Token Generation Lambda Trigger?

AWS
Simon_C
已提問 3 年前檢視次數 678 次
1 個回答
0
已接受的答案

As of today you can't add custom attributes to Cognito access token. You probably could achieve mapping AD groups to Cognito groups but I wouldn't recommend that, management would probably be unnecessarily complex and potentially error prone. Another way would be to see if customer could use id_token instead. You can map AD attributes to Cognito ones and those are included in id_token.

AWS
已回答 3 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南