Metadata and certificates
Exchange and maintain federation configuration.
Connect your service provider to Unidy
Configure your application as a SAML service provider (SP) that trusts Unidy as its identity provider (IdP). You need access to your application's SAML settings and an administrator who can create its SAML configuration in Unidy.
Before setup, confirm that the assertion contract meets your application's identity, attribute, and logout requirements. Unidy provides email as NameID and three fixed attributes; per-connection claim mapping is not available.
1. Obtain and inspect IdP metadata
Agree the brand host people will use to sign in, then download:
https://login.example.com/saml/metadataNo Unidy login session is required. A brand with site lock enabled can require HTTP basic authentication; arrange authorized access or a metadata file with your Unidy contact if the SP cannot authenticate when importing a URL.
Save the document so you can inspect it and retain the configuration used for your test:
curl --fail --silent --show-error \
https://login.example.com/saml/metadata \
--output unidy-idp-metadata.xml
xmllint --format unidy-idp-metadata.xmlReplace the example host before running the command. If curl fails, check its status and metadata troubleshooting before importing the file.
| Metadata value | Use in the SP |
|---|---|
EntityDescriptor/@entityID | Trusted IdP entity ID. Copy the returned value exactly. |
SingleSignOnService/@Location | IdP sign-in URL, normally /saml/auth on the agreed host. HTTP-Redirect and HTTP-POST bindings are advertised. |
Signing KeyDescriptor certificate | Trust anchor for validating assertions. The current metadata publishes one signing certificate. |
NameIDFormat | Advertised formats; actual sign-in currently emits the email-address format described in the assertion contract. |
SingleLogoutService | Advertised endpoint, but not a complete SAML Single Logout implementation. Do not enable protocol SLO solely because it appears in metadata. |
For multiple brand hosts, verify the returned entity ID and endpoints against the agreed host. Ask Unidy to resolve an unexpected issuer before allowing it in the SP; do not widen issuer validation to work around a mismatch.
2. Import metadata and configure trust
Import the URL or saved XML into your SP using its supported SAML setup process. If manual configuration is necessary, use the exact entity ID, SSO URL, and signing certificate from that document.
- Require signed assertions. The response envelope is not separately signed, so an SP that requires a signed response envelope needs a compatibility decision before launch.
- Keep issuer, audience, recipient, destination, request-correlation, and time validation enabled.
- Trust the IdP signing certificate through your agreed metadata/bootstrap process. It is separate from the HTTPS certificate on the brand host. Inspect the actual certificate instead of assuming its issuer or public-CA status.
- Confirm whether your SP accepts the current email
NameIDformat URI:urn:oasis:names:tc:SAML:2.0:nameid-format:emailAddress. - Leave SAML Single Logout unconfigured unless Unidy confirms support for the required exchange. Your application still needs to end its own local session on sign-out.
The metadata is signed, but a downloaded signature alone does not establish initial trust in an otherwise unknown key. Obtain the metadata URL and confirm the certificate through your agreed Unidy onboarding channel.
3. Supply the SP registration details
Send these values to the administrator creating the Unidy connection:
| Value | What to provide |
|---|---|
| Issuer | Your application's entity ID, exactly as emitted in its AuthnRequest. This is the SP identifier, not Unidy's IdP entity ID. |
| ACS URL | The complete HTTPS assertion consumer URL, such as https://app.example.com/saml/acs. |
| SP certificate | Your service provider's certificate, in PEM format. The explicit setup requires both ACS URL and certificate. Never send the SP's private key. |
| Response hosts | Explicit bare ACS hostnames, such as app.example.com; separate multiple hosts with spaces in the dashboard field. Do not use a scheme, path, or wildcard. |
A connection can alternatively contain a complete SP metadata URL + fingerprint pair. These are two accepted configuration pairs; at least one must be complete, and both may coexist. An explicitly stored ACS URL takes precedence over the request's ACS URL. A metadata URL is not a promise of automatic metadata fetching or certificate refresh, so confirm the effective ACS and response hosts during testing. The explicit ACS URL and certificate path is the clearest setup when you control both values.
Request signing
The SP certificate and fingerprint do not currently enable AuthnRequest signature enforcement. Continue to require and validate Unidy's signed assertions. If your requirements also include Unidy rejecting unsigned or incorrectly signed requests, resolve that requirement with Unidy before launch.
4. Map the assertion attributes
Use these exact assertion attribute names:
Name | Map to | Expected value |
|---|---|---|
name | The person's email address. | |
fullName | Display name | First and last name; it may contain no value if both are blank. |
group | An optional constant marker | unidy for every person. It is not a role or entitlement. |
The current metadata's attribute declarations can have empty Name values. This does not mean the assertion names are empty: assertions emit name, fullName, and group. If an importer creates blank mappings, configure those assertion names explicitly and verify a real test response. The metadata's attribute-authority declaration does not provide an attribute-query endpoint.
5. Inspect and record the signing certificate
The following recipe uses Python 3 and OpenSSL to extract the first signing certificate from the saved metadata. It avoids platform-specific sed syntax and works with namespace-qualified XML. Use it only with metadata obtained from the agreed host.
python3 - <<'PYTHON'
import base64
import pathlib
import textwrap
import xml.etree.ElementTree as ET
ns = {
"md": "urn:oasis:names:tc:SAML:2.0:metadata",
"ds": "http://www.w3.org/2000/09/xmldsig#",
}
root = ET.parse("unidy-idp-metadata.xml").getroot()
certificate = root.find(
".//md:IDPSSODescriptor/md:KeyDescriptor[@use='signing']"
"/ds:KeyInfo/ds:X509Data/ds:X509Certificate", ns
)
if certificate is None or not certificate.text:
raise SystemExit("No IdP signing certificate found")
der = base64.b64decode("".join(certificate.text.split()), validate=True)
b64 = base64.b64encode(der).decode("ascii")
pem = "-----BEGIN CERTIFICATE-----\n" + "\n".join(textwrap.wrap(b64, 64))
pem += "\n-----END CERTIFICATE-----\n"
pathlib.Path("unidy-idp.crt").write_text(pem, encoding="ascii")
PYTHON
openssl x509 -in unidy-idp.crt -noout -subject -issuer -dates -fingerprint -sha256Record the SHA-256 fingerprint, validity dates, metadata URL, and SP owner in your integration runbook. The script extracts a certificate; it does not validate the metadata signature or establish trust by itself.
6. Test and agree certificate rollover
Run the SAML verification checklist with a dedicated test account in both signed-in and signed-out browser sessions. Successful metadata import alone does not prove that the connection works.
Unidy manages the IdP signing key. Agree these details before launch:
- Who notifies your SP owner about a key change and how much notice is required.
- Which tenant and connections are affected; do not assume every deployment shares the same key.
- Whether your SP can trust the new and old certificate together during a coordinated rollover. Unidy currently publishes one active signing certificate; SP-side overlap depends on the SP.
- How the updated certificate is verified and imported, how a fresh sign-in is tested, and when the old certificate is removed.
- Who to contact if the SP cannot accept both certificates or the planned change fails.
Changing the SP's own certificate is a separate task from rotating Unidy's IdP certificate. Keep the Unidy registration current, and confirm enforcement requirements rather than assuming a stored certificate is actively validating requests.
Related
- SAML overview: assertion fields, timing, and integration limits.
- SAML configurations: administer the Unidy-side registration.
- Test and troubleshoot SAML: acceptance criteria and failure diagnosis.