Skip to content

SAML metadata viewer

Paste SAML metadata to read its entity id, sign-in and logout endpoints with their bindings, NameID formats, signing flags and keys.

Runs in your browser. Nothing you paste is sent to us.

Metadata

A sample Keycloak realm descriptor is filled in. Paste metadata XML; the page does not fetch URLs, so open the metadata address in a tab and copy it.

Paste metadata to see its entity, endpoints and keys.

How to use it

  1. Open the metadata URL in a browser tab and copy the XML, or open the metadata file.
  2. Paste it here.
  3. For an aggregate with many entities, pick the one you need.
  4. Read the endpoints and keys you need to set up the other side.

What to know

Metadata is how two SAML parties describe themselves: the entity id, the endpoints for each binding, and the certificates used to sign and encrypt. An identity provider’s metadata has an IDPSSODescriptor; an app’s has an SPSSODescriptor.

Keycloak publishes a realm’s identity provider metadata at https://<host>/realms/<realm>/protocol/saml/descriptor. When Keycloak brokers another SAML identity provider, it publishes its own service provider metadata for that link under the realm’s broker endpoint.

The page does not fetch URLs: everything stays in your browser. Copy the XML and paste it.

What SAML metadata is

SAML metadata is an XML document in which a SAML party describes itself. It is defined in the SAML 2.0 metadata specification. Two parties that exchange metadata know each other’s entity ids, endpoints and certificates, which is everything they need to start exchanging messages.

Metadata replaces a long list of settings typed by hand. Instead of copying an SSO URL, a logout URL and a certificate from one console to another, you import one file or one URL. Most identity providers and SAML libraries can read it.

How a metadata document is built

The root is an md:EntityDescriptor with an entityID. Inside are one or more role descriptors. An identity provider has an IDPSSODescriptor; an app has an SPSSODescriptor. A federation that lists many parties wraps many entity descriptors in one md:EntitiesDescriptor.

Identity provider metadata (sample, shortened)
<md:EntityDescriptor entityID="https://auth.example.com/realms/acme">
  <md:IDPSSODescriptor WantAuthnRequestsSigned="true"
      protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
    <md:KeyDescriptor use="signing">
      <ds:KeyInfo><ds:X509Data>
        <ds:X509Certificate>MIICmjCCAYICCQ…</ds:X509Certificate>
      </ds:X509Data></ds:KeyInfo>
    </md:KeyDescriptor>
    <md:SingleLogoutService
        Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
        Location="https://auth.example.com/realms/acme/protocol/saml"/>
    <md:NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:persistent</md:NameIDFormat>
    <md:SingleSignOnService
        Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
        Location="https://auth.example.com/realms/acme/protocol/saml"/>
  </md:IDPSSODescriptor>
</md:EntityDescriptor>

Endpoints and bindings

Each endpoint names a binding and a location. An identity provider lists SingleSignOnService endpoints; an app lists AssertionConsumerService endpoints, each with an index and optionally isDefault. Both may list SingleLogoutService and ArtifactResolutionService endpoints.

Keys

A KeyDescriptor holds a certificate in ds:X509Certificate. Its use attribute is signing or encryption. When use is missing, the key serves both purposes. During a key rollover, metadata can list the old and the new certificate side by side.

Flags

  • WantAuthnRequestsSigned on an identity provider: it wants apps to sign their requests.
  • AuthnRequestsSigned on an app: the app signs its requests.
  • WantAssertionsSigned on an app: the app wants signed assertions.

Validity

validUntil is a date after which the metadata must not be trusted. cacheDuration is a hint for how long a copy may be kept before fetching it again. Both are optional.

What this tool does

Paste a metadata document and the tool shows the entity id, the validity, each role, every endpoint with its binding, the NameID formats, the flags and each key. For each certificate it shows the subject, the expiry date and the key type. Aggregates with many entities get a picker and a filter.

It warns when the metadata has expired, when a role does not list SAML 2.0 support, and when a role publishes no keys.

What it does not do

It does not fetch metadata from a URL. Open the URL in a browser tab, copy the XML and paste it. This keeps everything in your browser and avoids following links from a document you have not checked yet.

It does not check the metadata signature or validate the XML against the metadata schema. It shows whether a signature element is present.

How to use it

  1. Get the metadata: a URL from the identity provider or app, or a file someone sent you.
  2. Paste the XML into the tool.
  3. If it is an aggregate, filter by entity id and pick the entity you need.
  4. Copy the endpoints and check the keys and their expiry dates.
  5. To export the certificates as PEM with fingerprints, use the certificate extractor.

Use cases

Onboarding an enterprise customer’s identity provider

When a customer wants their staff to sign in to your app with their company identity provider, they usually send metadata. Read it to find their SSO URL, which bindings they accept, whether they want signed requests, which NameID formats they offer and when their signing certificate expires. Then send them your own app’s metadata in return.

Checking a Keycloak realm before sharing it

A Keycloak realm publishes its identity provider metadata at https://<host>/realms/<realm>/protocol/saml/descriptor. Before you give that URL to an app vendor, read it to confirm the host name is the public one, not an internal address. A wrong host name here usually means Keycloak’s hostname setting or the reverse proxy headers are not set correctly.

Debugging a failed connection

Many SAML errors are metadata mismatches: the app posts to an SSO URL that is not listed, or expects a binding the other side does not offer, or holds a certificate that is no longer in the metadata. Reading both sides’ metadata next to each other finds these quickly.

Keycloak as a broker

When Keycloak signs users in through another SAML identity provider, you can import that provider’s metadata when you add it in the admin console, instead of typing its URLs. Keycloak also publishes service provider metadata for that link, under the realm’s broker endpoint for the identity provider’s alias, which you give to the other side.

Reading the result

You seeIt means
Only HTTP-POST under single sign-onApps must post their requests; redirect-only apps cannot use it
No KeyDescriptorSignatures cannot be checked from this metadata alone
Two signing certificatesProbably a key rollover; trust both until the old one is removed
validUntil in the pastSoftware that honors it will refuse the metadata
Several ACS endpointsThe app can receive responses at more than one URL; isDefault marks the main one

Common problems

  • Entity id with or without a trailing slash: the two strings differ, and SAML compares them exactly.
  • Metadata generated behind a proxy that shows http or an internal host in every location.
  • An expired signing certificate that the identity provider still uses. Many apps accept it, some do not.
  • Metadata that was edited by hand after signing, which breaks its signature.
  • An aggregate with thousands of entities where the one you need is missing because it is published in another feed.

Security notes

Metadata decides which certificates you trust. Get it over https from the party itself, or verify its signature when a federation signs it. A changed certificate in metadata should be expected and announced; if it is not, ask before you trust it.

Metadata is public by design. It contains no private keys, so publishing it is safe.

Best practices

  • Refresh metadata on a schedule when both sides support metadata URLs, so key rollovers do not break sign-in.
  • Keep entity ids stable. Changing one is a migration on both sides.
  • Publish only the bindings you really support.
  • Track certificate expiry dates and roll keys before they expire.

Exchanging metadata: URL or file

There are two ways to hand metadata to the other side, and they behave differently over time.

Metadata URLMetadata file
Key rolloverThe other side can fetch the new key itself, if it refreshesSomeone must send and import a new file
Endpoint changesPicked up on the next refreshManual again
Network accessThe other side must reach the URLNone needed
TrustComes from https and the host nameComes from how the file was sent

A URL is better when both sides support refreshing. Many products, however, read the URL once at setup and never again. Ask how the other side uses it before you rely on automatic rollover.

Aggregates and federations

Research and education federations publish one signed EntitiesDescriptor that lists all their members, often thousands of entities and many megabytes. Members fetch it regularly, check its signature with the federation’s certificate, and trust the entities in it.

Paste an aggregate into the tool to find one member: filter by part of its entity id, pick it, and read its endpoints and keys. For very large files, your browser needs a moment to parse them, but nothing is uploaded.

Entities in an aggregate often carry extensions, such as registration information or entity categories, in the md:Extensions element. The tool does not show them; open the XML for those.

Questions

Frequently asked questions

What is SAML metadata?

An XML document that describes a SAML party: its entity id, endpoints, supported bindings, NameID formats and certificates. Both sides exchange metadata to set up single sign-on.

Where is the Keycloak SAML metadata URL?

For a realm acting as identity provider it is https://<host>/realms/<realm>/protocol/saml/descriptor. The realm settings page links it under its endpoints as SAML 2.0 Identity Provider Metadata.

What is the difference between IDPSSODescriptor and SPSSODescriptor?

IDPSSODescriptor describes an identity provider: its sign-in and logout endpoints and signing keys. SPSSODescriptor describes an app: where it receives responses and which keys it uses.

What does validUntil mean in SAML metadata?

It is the time after which the metadata must not be used. Federations use it to force consumers to fetch fresh, signed copies.

What if KeyDescriptor has no use attribute?

Then the key is meant for both signing and encryption. Many identity providers publish their certificate this way.

Why does my metadata show http or an internal host name?

The software built the URLs from how it was reached, often behind a reverse proxy. Fix the public host name setting or the forwarded headers so the metadata shows the public https address.

Can I view metadata from a URL?

The tool does not fetch URLs. Open the metadata URL in a tab, copy the XML and paste it.

What is an EntitiesDescriptor?

A metadata document that wraps many EntityDescriptor elements. Federations publish one to list all their members in a single signed file.

Rather not run Keycloak yourself?

We run it for you on a cluster of your own, with backups, upgrades and written support. Starter and Premium begin with a 7-day trial.