LoginRadius / go-saml

High Level API Implementation of SAML 2.0 (Currently Supported Identity Provider Implementation) Single Sign On
MIT License
11 stars 13 forks source link

Add Organization and Contact details in the Idp metadata #9

Closed mayankagwl closed 3 years ago

mayankagwl commented 4 years ago

Need to add organization details (like name, displayname, url, lang) and Contact Details (given_name,email_address for technical and Support both) in the Idp Metadata response

sccalabr commented 4 years ago

I'd like to give this a try. Can you point me to roughly where this would be?

mayankagwl commented 4 years ago

@sccalabr

We need to add below Organization and Contact information in the IDP Metadata These organizations and Contact Property need to add in the IdentityProvider struct, and by using these values we need to add these values to generated XML for Idp Metadata

Sample

<EntityDescriptor ...> 
    <IDPSSODescriptor ...>
         ...
    </IDPSSODescriptor>

    <Organization>
        <OrganizationName>Example</md:OrganizationName>
        <OrganizationDisplayName>Example Inc</md:OrganizationDisplayName>
    <OrganizationURL>https://example.com</md:OrganizationURL>
    </Organization>

    <ContactPerson contactType="technical">
        <GivenName>John Doe</GivenName>
        <SurName>support</SurName>
        <EmailAddress>johndoe@example.com</EmailAddress>
    </ContactPerson>

    <ContactPerson contactType="support">
        <GivenName>John Doe</md:GivenName>
        <SurName>support</md:SurName>
        <EmailAddress>johndoe@example.com</md:EmailAddress>
    </ContactPerson>

</EntityDescriptor>

Generate Metadata Example

https://github.com/LoginRadius/go-saml/blob/fa9f285de74b0771b4253e81e5a233641655e945/examples/metadata.go#L9-L34

mayankagwl commented 4 years ago

@sccalabr And LoginRadius is also giving swags to people who will be contributing, so please make sure to read our blog and submit your info to get free goodies.

https://www.loginradius.com/engineering/page/hacktoberfest2020

sccalabr commented 4 years ago

I have some comments on my pr https://github.com/LoginRadius/go-saml/pull/16/commits/c9f85d40d2092947d7b4a4cb29d3c784a03a62e9. I am not sure how to go about testing this. How do I get it running locally? Does the schema overall look ok? I know there are going to be a few more iterations.

mayankagwl commented 4 years ago

@sccalabr for testing you can install go-saml package in your project, and take reference from the example to test the metadata output. Thanks

mayankagwl commented 4 years ago

@sccalabr we have closed and commented in your PR https://github.com/LoginRadius/go-saml/pull/16 Thanks for your contributions

anujc4 commented 3 years ago

This has been addressed in #27. Please take a look and let me know your thoughts.

mayankagwl commented 3 years ago

@anujc4 LoginRadius is also giving swags to people who will be contributing, so please make sure to read our blog and submit your info to get free goodies.

https://www.loginradius.com/engineering/page/hacktoberfest2020