Skip to content

AWS IAM Identity Center SSO  #4554

Description

@peakematt

Describe your question/
I'm working on setting up Authentik as the identity provider for AWS IAM Identity Center (which is the rebranded name for AWS SSO). Neither app officially supports the other, but its just a SAML2 integration. I created the saml provider and app in Authentik and exchanged metadata files between the two apps. Both apps accepted the metadata and AWS redirects to Authentik. Both IdP and SP-initiated flows appear to start correctly. However, when redirected back to AWS, AWS' login screen presents a generic error message: We couldn't complete your request right now. Please try again later. When I look in CloudTrail logs for the corresponding event, I get messages like:

{
    "eventVersion": "1.08",
    "userIdentity": {
        "type": "Unknown",
        "principalId": "<AWS Account number>",
        "arn": "",
        "accountId": "<AWS Account number>",
        "accessKeyId": ""
    },
    "eventTime": "2023-01-28T17:16:48Z",
    "eventSource": "signin.amazonaws.com",
    "eventName": "ExternalIdPDirectoryLogin",
    "awsRegion": "us-east-2",
    "sourceIPAddress": "<my ip>",
    "userAgent": "<my user agent>",
    "errorMessage": "Response contains invalid name id policy format",
    "requestParameters": null,
    "responseElements": {
        "ExternalIdPDirectoryLogin": "Failure"
    },
    "requestID": "5d21c791-9132-4ea8-b6b7-5a07db654346",
    "eventID": "c148dedd-9057-4e63-b4ee-44c675f2353b",
    "readOnly": false,
    "eventType": "AwsConsoleSignIn",
    "managementEvent": true,
    "recipientAccountId": "<AWS Account number>",
    "eventCategory": "Management"
}

So - it seems like AWS is unhappy with the NameID being returned by Authentik. Based on AWS' documentation, AWS SSO wants NameID to be an email address. I did go in and update the NameID property mapping value to be the Authentik default email attribute mapping (see screenshot), but that does not seem to help. Auth also did not work with the NameID Property Mapping field left unassigned.

I haven't set up any SCIM functionality so I have to provision AWS IAM Identity Center users manually. I have confirmed that I have a user provisioned in AWS that matches the user information Authentik is asserting.

Any thoughts on what might be causing this? Or ideas on what I might try changing to get it working?

Relevant infos
using authentik version 2023.1.2 running from the official (ghcr.io/goauthentik/server:2023.1.2) container. My containers are scheduled by Hashicorp Nomad and HTTP traffic enters via a HAProxy reverse proxy that terminates TLS connections.

Screenshots
Screenshot 2023-01-28 at 12 31 20 PM

Logs
Not super relevant? I can provide details if needed, but Authentik shows a successful application authorization and AWS generates errors like above.

Version and Deployment (please complete the following information):

  • authentik version: 2023.1.2
  • Deployment: Official docker container running in HashiCorp Nomad behind HAproxy.

Additional context
None

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions