CDLUC3 / dmsp_aws_prototype

Sceptre CloudFormation templates for DMPHub v2
MIT License
1 stars 0 forks source link

Explore Cognito as a means for authentication in the new system #118

Closed briri closed 3 weeks ago

briri commented 3 months ago

Cognito can provide us with out-of-the-box management for our authentication needs:

A significant problem we must address though is our use of the Shibboleth Service Provider (SP) and the InCommon Federation (which is essentially a registry of IdPs and SPs).

Our Shibboleth SP currently handles the SSO functionality in the system using SAML2. Here is how it all works:

This is very similar to what Cognito is doing except that Cognito cannot "look up" the IdP metadata based on the entityID.

I think we can accomplish this by building a Lambda that can perform this lookup for us. Here is an outline of how that might work:

In the new system's UI (nextJS app):

In the new Lambda function:

Scheduled Lambda function:

Outstanding questions:

ashleygould commented 3 months ago

Very interesting idea.

One feature to add that pops to mind is to somehow record all the idp metadata for backup use.

marisastrong commented 3 months ago

Idp metadata can refer to incommon for backup

briri commented 2 months ago

sounds like this is a non-starter if Cognito can only handle a single IdP definition. Here's the Confluence doc for more info.

So it looks like we'll want to setup our ShibSP on an ECS Cluster