Search code examples
metadatasaml-2.0keycloak

Keycloak SAML adapter: how to export SP XML metadata?


After deploying Keycloak 3.4 SAML adapter (as tomcat valve for instance), I am looking for the proper way to get SP XML metadata file generated from certificate and services URL.

A question about exporting Keycloak IdP XML metadata is answered but I found no equivalent for SP metadata.

Note: I am used to export such SP metadata from OIOSAML, Shibboleth and Spring Security SAML, and find it strange Keycloak does not document it.


Solution

  • If you have your SP registered in a keycloak server instance there is an endpoint. See org.keycloak.broker.saml.getSPDescriptor()

    I am afraid that there is no way of getting it directly from the SP. You always can use org.keycloak.saml.SPMetadataDescriptor.getSPDescriptor() as a helper for building it.

    Me I end creating a template from another installation (WebLogic).

    Hope it helps,

    Luis