Search code examples
asp.netowinsaml-2.0kentor-authservices

Kentor Auth - Configure Idp with metadata stored in a database


We need to configure the IdentityProvider from metadata stored in a database. It would seem though that the only way to specify the metadata to IdentityProvider is through metadataLocation property which supports a URL or file path.

Is there anyway, which I've missed, to pass a stream object that holds the metadata to the IdentityProvider?

Thanks


Solution

  • I'm not aware of any way using the standard code. The Load method that takes a stream is marked as internal, see here: https://github.com/KentorIT/authservices/blob/master/Kentor.AuthServices/Metadata/MetadataLoader.cs

    You could:

    1. Write your database value to a temporary location and give this file path to load
    2. Write an api route that serves up the metadata for a given Idp as a url
    3. Make an open source contribution to add support for this
    4. Don't use MetadataLocation but instead construct the IdentityProvider object and separately set signing key, entity id, binding etc.
    5. etc.