Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for custom attributes #156

Open
agiannone opened this issue Mar 23, 2023 · 3 comments
Open

Add support for custom attributes #156

agiannone opened this issue Mar 23, 2023 · 3 comments

Comments

@agiannone
Copy link

Is it possible to add support for custom attributes in the SAML response?
For example, givenName, lastName, email, and so on.

@deepakprabhakara
Copy link
Member

This is a great idea @agiannone and also ties in with #115. Thank you.

@NathanTarbert
Copy link
Contributor

Thanks for creating this issue @agiannone.

@nbennett25
Copy link

Wanted to also request support for custom attributes.

Currently I'm seeing the SAML response contain the following attributes:

 <saml:AttributeStatement xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">
            <saml:Attribute Name="id"
                            NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified"
                            >
                <saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
                                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                     xsi:type="xs:string"
                                     >1dda9fb491dc01bd24d2423ba2f22ae561f56ddf2376b29a11c80281d21201f9</saml:AttributeValue>
            </saml:Attribute>
            <saml:Attribute Name="email"
                            NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified"
                            >
                <saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
                                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                     xsi:type="xs:string"
                                     >[email protected]</saml:AttributeValue>
            </saml:Attribute>
            <saml:Attribute Name="firstName"
                            NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified"
                            >
                <saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
                                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                     xsi:type="xs:string"
                                     >jackson</saml:AttributeValue>
            </saml:Attribute>
            <saml:Attribute Name="lastName"
                            NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified"
                            >
                <saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
                                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                     xsi:type="xs:string"
                                     >jackson</saml:AttributeValue>
            </saml:Attribute>
        </saml:AttributeStatement>

so it looks like the firstName and lastName are returned, but the login form does not have fields for these values, so I guess they're just mapped to the email form field?

Given that there are a wide range of attribute names in various systems, it'd be super handy to be able to pass in key/value pairs somewhere (.env? some yaml config?) that would be output to the saml: AttributeStatement node.

Alternatively it'd at least be nice to have first name / last name fields in the login form : )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants