djangosaml2idp icon indicating copy to clipboard operation
djangosaml2idp copied to clipboard

Is there a way to capture 'SAMLResponse' without redirect to ACS URL

Open deokgonkim opened this issue 2 years ago • 0 comments

Is there a way to capture 'SAMLResponse' without redirect to ACS URL.

I'm using djangosaml2idp as Identity Provider for AWS IAM Federation SSO Login.

And I want to use AWS STS assume-role-with-saml to provide programatical way to access AWS using AWS API or AWS CLI.

For example, if I initiate SAML with my custom configuration as follows.

    saml_client = _get_saml_client()
    _, info = saml_client.prepare_for_authenticate()

    redirect_url = None

    for key, value in info['headers']:
        if key == 'Location':
            redirect_url = value
            break

    return HttpResponseRedirect(redirect_url)

Can I pass custom acs_url (not the AWS ACS_URL) to get SAMLResponse value?

deokgonkim avatar Feb 09 '22 03:02 deokgonkim