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
asked 3 years ago663 views
1 Answer
0
Accepted Answer

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
answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions