next-auth icon indicating copy to clipboard operation
next-auth copied to clipboard

SAML2 metadata.xml

Open xennialex opened this issue 5 years ago • 0 comments

Question 💬

Hi!

I need to use an existing SSO Identity Provider. They said we need to provide a metadata.xml file, but I can't seem to find something like this anywhere.

Here is a sample redacted metadata.xml file:

<EntityDescriptor cacheDuration="PT1H" entityID="[REDACTED]" xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" xmlns="urn:oasis:names:tc:SAML:2.0:metadata" ID="[REDACTED]">
    <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
        <SignedInfo>
            <CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
            <SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
            <Reference URI="#[REDACTED]">
                <Transforms>
                    <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
                    <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
                </Transforms>
                <DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
                <DigestValue>[REDACTED]</DigestValue>
            </Reference>
        </SignedInfo>
        <SignatureValue>
            [REDACTED]
        </SignatureValue>
        <KeyInfo>
            <X509Data>
                <X509Certificate>
                    [REDACTED]
                </X509Certificate>
            </X509Data>
        </KeyInfo>
    </Signature>
    <SPSSODescriptor AuthnRequestsSigned="false" WantAssertionsSigned="false" protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
        <KeyDescriptor>
            <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
                <X509Data>
                    <X509Certificate>
                        [REDACTED]
                    </X509Certificate>
                </X509Data>
            </KeyInfo>
        </KeyDescriptor>
        <SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://[REDACTED]/Saml2/Logout"/>
        <AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://[REDACTED]/Saml2/Acs" isDefault="true" index="0"/>
        <AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact" Location="https://[REDACTED]/Saml2/Acs" isDefault="false" index="1"/>
        <AttributeConsumingService index="0" isDefault="true">
            <ServiceName xml:lang="en">Saml2</ServiceName>
            <RequestedAttribute isRequired="true" Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" FriendlyName="[REDACTED] GID"/>
            <RequestedAttribute Name="Minimal"/>
        </AttributeConsumingService>
    </SPSSODescriptor>
</EntityDescriptor>

Generally I got SAML working with this sample: https://github.com/Jenyus-Org/next-auth-saml

Or has somebody another idea how I could implement SAML with my Next.JS project?

Thanks!

How to reproduce ☕️

Since I can't find it I can't offer any steps to reproduce this

Contributing 🙌🏽

No, I am afraid I cannot help regarding this

xennialex avatar Oct 26 '21 07:10 xennialex