PingFederate SAML errors: where to look in the logs and how to fix the common failures
When SAML sign-in through PingFederate breaks, the reason is usually sitting in server.log or transaction.log. Here's how to find the message that failed, read what it's telling you and fix it.
part 18 of 18 · Identity security, from the ground upthe ideaStart from the tracking ID. The log usually says which side refused.
after reading, you can- Find one failed SAML sign-in in server.log and transaction.log using its tracking ID
- Spot from the logs when an old certificate, a new hostname or a drifting clock is to blame
- Set up warnings and rotation so certificate changes stop causing outages
When a SAMLdefinitionSecurity Assertion Markup Language. It's one way an app can take sign-ins from a central login server: a signed XML message that says who you are, so you don't type a second password. sign-in through PingFederate fails, the user sees an error page and the app owner sees nothing useful. The answer is nearly always in PingFederate's own logs, if you know which file to open and which connection to turn up. This guide covers where to look, what the common errors mean and how to fix each one.
Someone clicked an app, PingFederate sent them back with an error, and nobody knows which side broke
PingFederate is a server many companies run to sign their people in to other apps, and to let partners' people sign in to theirs. SAML is the standard it uses for most of those sign-ins. When you open an app, your browser carries a signed note from PingFederate saying who you are. The app checks the note before it lets you in. If the signature, the address on the note, the timing or the expected format is off, the app throws the note away and you get an error. PingFederate writes down what it sent and received, so the fix starts in its logs.
Think of a building pass sent by courier. The pass has to carry the right stamp, be addressed to the right reception desk and still be in date when it arrives. If any of those is wrong, reception turns you away, and the courier's delivery log is where you find out why.
- Teams running PingFederate on premises
- App owners whose SSO goes through Ping
- Help desks fielding sign-in tickets
- Security teams who audit SSO
A failed SAML sign-in costs more than one ticket
One user who can't get in raises a ticket. When a whole partner's users can't get in, that's an outage, and it usually follows a change somebody made on one side without telling the other: a new signing certificate, a new hostname or an app upgrade.
The longer path is the quiet one. If someone switches off a check to get sign-in working again, the problem stops showing up and the risk stays. Ping's docs say the AssertiondefinitionThe part of a SAML response that actually says who you are, plus details like email or groups. If its signature or dates don't check out, the app throws it away. Replay Prevention Service can be swapped for a null implementation that switches replay protection off. Ping warns you to use it with caution. That kind of change should never be how a ticket gets closed.
-
01 User opens the app
The app has no session for this person, so it builds a SAML AuthnRequest and sends the browser to PingFederate.
-
02 PingFederate checks the request
PingFederate finds the app's connection and makes sure it's switched on. Then it checks the binding, the request signature if one's required, and the ACS URL. Several errors in the table below come from this step.
-
03 The user signs in
An adapter or authentication policy checks who the person is, usually a password form and MFA. Failures here are login problems, not SAML ones.
-
04 PingFederate builds the assertion
PingFederate fills in the user's attributes and signs the response or the assertion with that connection's certificate. Some apps also want it encrypted.
-
05 The browser posts it to the app
The assertion goes to the app's assertion consumer service (ACS) URL, usually through an auto-submitting form.
-
06 The app validates it
Now it's the app's turn. It checks the signature, the audience, the Destination and the dates, and if any of them is off the user lands on the app's error page, not PingFederate's.
For engineers: when PingFederate is the SP the roles swap, and PingFederate runs the step 6 checks itself. Ping's virtual host namesdefinitionExtra hostnames PingFederate accepts as its own when it checks the Destination and Recipient values in inbound SAML messages. page says PingFederate validates the Destination and Recipient values in inbound SAML messages against the Base URL on the Federation Info tab, plus any virtual host names you've configured. That one rule explains a lot of failures that start the day someone puts a new load balancer name in front of the server.
Where the evidence sits
Start with the browser and server.log together. Ping's monitoring guide calls server.log the primary troubleshooting log and pairs it with an HTTP trace from the browser. Every file below sits in <pf_install>/pingfederate/log unless someone moved it with pf.log.dir in run.properties.
| Where | What it tells you | When to open it |
|---|---|---|
| Browser developer tools (network tab) | The AuthnRequest or SAMLResponse as it left one side, the PF cookie and the error page URL | First, while reproducing the failure |
| server.log | Runtime errors with a tracking ID prefix. WARN, ERROR and Caused by lines matter most | Every time |
| transaction.log | One line per SAML message: connection ID, SAML status code, SAML ID, and at Enhanced level the binding and signature status | When you need to know which message failed |
| audit.log | A chosen subset of transaction data for security and compliance | When security asks who signed in where |
| admin.log and admin-api.log | Who changed what in the console or through the admin API | When it worked yesterday |
| init.log | Jetty messages from before PingFederate starts | When the server won't come up at all |
Ask the user for the tracking IDdefinitionAn ID PingFederate puts in front of nearly every server.log line for one transaction, though not the raw request and response contents. Shown on error pages once you turn on $TrackingId. first. Ping's docs say every server.log message carries its transaction's tracking ID, except the raw contents of inbound requests and outbound responses, so one ID pulls the whole story out of a busy log. Error pages don't show it by default. Switch on the $TrackingId variable in templates such as sp.sso.error.page.template.html and idp.sso.error.page.template.html under server/default/conf/template. Ping says that doesn't need a restart, though in a cluster you repeat it on each engine node.
If the template isn't changed yet, capture the browser traffic and search server.log for the PF cookie value instead. A message on the generic error page that reads Unexpected System Error comes with a reference code. Search for that code too.
# example output from Ping's docs. The ref code is what users see on the error page, so search for yours ERROR [org.sourceid.servlet.ErrorServlet] Top level error (ref#kwlqbn): ... org.sourceid.saml20.bindings.BindingException: Incoming binding urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect is not enabled for (SP) ::: sp1
You set transaction logging per connection, in the Logging Mode field on its General Info tab. Standard is the default and gives you the SAML status code. Enhanced adds the binding, the relay state and the signature status, which is usually enough for a signature problem. Full writes the whole XML of every message, so use it briefly. If you need every connection turned up at once, there's an override in System > Server > General Settings.
For signature problems turn on verbose logging for one category instead of the whole server. Under System > Server > Log Settings, the XML Signatures category and Protocol Requests and Responses category switch server.log from INFO to DEBUG or TRACE for just that area. Ping warns that verbose messages can include sensitive information and slow the server, so switch them off when you're done.
The errors people actually hit, and what usually causes them
The table pulls together messages from Ping's troubleshooting pages and settings that Ping and app vendors document. The order is ours, roughly from the cheapest check to the slowest.
| What you see | Usual cause | Fix it in |
|---|---|---|
| "partner not active" | The connection was saved but never switched on, or someone switched it off | Connection > Activation & Summary: set Connection Status to Active and save |
| 404 Not Found on startSSO.ping | An IdP-initiated link uses & instead of ? before the first parameter | The link: startSSO.ping?PartnerSpId=...&TargetResource=... |
| "System Error" on startSSO.ping | A second ? where an & belongs, or a TargetResource value that isn't URL-encoded | The link: & between parameters, encode the values |
| Unexpected System Error with a ref code, BindingException in server.log | The SP sent the request over a binding the SP connection doesn't allow | The SP connection: allow that binding for inbound messages, if both sides agreed it |
| The app says the signature is invalid after a certificate change | The app still trusts the old signing certificate | Send the new certificate or metadata, and use a secondary signing certificate next time |
| The app says the signature is invalid and the certificate matches | The app wants the assertion signed, and PingFederate signs the response by default | Signature Policy: tick Always Sign Assertion, clear Sign Response As Required |
| The app can't find a key to check the signature | The app expects the certificate inside the message | Digital Signature Settings: include the certificate in the KeyInfo element |
| PingFederate as SP rejects a partner's signature after they rotated | Your IdP connection trusts only their old certificate | IdP connection: add the new certificate to the signature verification list |
| Destination or Recipient rejected by PingFederate as SP | Users reach PingFederate on a hostname that isn't its Base URL | System > Server > Protocol Settings > Federation Info, or Virtual Host Names |
| Certificates or assertions look expired too early | Server clocks on the two sides have drifted | NTP on both servers. The SSO token lifetime only papers over it |
Signature errors often come down to a mismatch in what each side expects. Ping's signature policy page says that for SAML 2.0 the default is Sign Response As Required, which signs the whole response. Atlassian's knowledge base describes Confluence Data Center rejecting exactly that, because its SAML module expects the assertion inside the response to be signed. The fix there is to sign only the assertion: tick Always Sign Assertion and clear Sign Response As Required. If an app wants both signed, leave both ticked.
Missing key errors come from apps that read the certificate out of the message. Citrix's knowledge base describes StoreFront users getting "There was a failure with the mapped account" because the PingFederate response didn't include the public key. On the SP connection's Digital Signature Settings tab, the Include the certificate in the signature KeyInfo element checkbox sends it. Only tick it if you and the partner agreed to send the key that way.
Certificate rotation breaks things on both sides. When PingFederate is the SP and the partner's certificate is unanchored, Ping's docs say any change must be passed on, because PingFederate only trusts the certificates you've imported. You can add more than one, and PingFederate accepts a signature that any of them verifies, which lets the partner switch over without an outage. With the anchored model the partner can change certificates without telling you, as long as the new one chains to a trusted CA and its Subject DN matches. Ping notes one catch: anchored certificates don't work with the redirect binding for single logout, because the certificate can't travel with the message.
Time problems show up as assertions that are already expired or not yet valid. Ping's runtime issues page lists certificates that seem to expire unexpectedly and points at server clocks on both sides of the federation. On an SP connection, Minutes Before and Minutes After set the validity window either side of issue, and both default to 5. Widening it hides drift without fixing it, so fix the clocks first.
Encrypted assertions fail in their own way. When PingFederate as SP can't decrypt with its primary encryption certificate, Ping's release notes say it logs XMLCipher::decryptElement called without a key and unable to resolve at WARN level. That usually means the partner encrypted to an old certificate of yours, so check what your metadata gave them.
From a vague ticket to the failing message
Trace one failure end to end before you change anything
- 01Get one user, one app, one time
Ask who failed, on which app, at roughly what time, and whether the sign-in started at the app or at a PingFederate link. Get the tracking ID or reference code off the error page if it shows one.
- 02Work out which side you're on
If PingFederate sent the assertion, you're looking at an SP connection. If it received one, an IdP connection. The settings you'll change live on that connection.
- 03Turn up logging for that connection only
Set Logging Mode to Full on the connection's General Info tab. For signature trouble, also enable the XML Signatures category under System > Server > Log Settings.
- 04Reproduce it with the browser open
Keep the network tab recording through the whole sign-in. Save the SAMLRequest or SAMLResponse and note the PF cookie value.
- 05Read server.log by tracking ID
Search for the tracking ID, then read the WARN, ERROR and Caused by lines for that transaction. Ping's docs name those as the useful ones.
- 06Check transaction.log for the same message
Match on connection ID and SAML ID. The SAML status code and, at Enhanced or above, the signature status tell you whether PingFederate saw the problem or the app did.
- 07Fix one setting and retest
Change only what the evidence points at, test with the same user, and then with a second user from another group.
- 08Put the logging back
Return the connection to Standard and switch off the verbose category. Note what you changed and why in the change record.
If the failure happens at the app after PingFederate logs a clean send, the app's own logs come next. Atlassian, for example, tells admins to raise logging for its authentication plugin and read the product log. Bring the saved SAMLResponse to that conversation, since it shows exactly what was signed and where it was sent.
What differs by role and by version
The same symptom points at different screens depending on which side PingFederate plays. This table is the short map.
| Area | PingFederate as IdP (SP connection) | PingFederate as SP (IdP connection) |
|---|---|---|
| Signing | Digital Signature Settings: signing certificate, secondary certificate, algorithm | Not used for assertions. It verifies the partner's signature |
| Verifying | When signed AuthnRequests or signed back-channel messages are required | Signature Verification Settings: anchored or unanchored trust, certificate list |
| What gets signed | Signature Policy: Sign Response As Required, Always Sign Assertion, or both | Signature Policy: Require signed SAML Assertions, if agreed |
| Addresses | ACS URLs on the Assertion Consumer Service URL tab | Base URL and virtual host names, checked against Destination |
| Logging mode | General Info > Logging Mode on the SP connection | General Info > Logging Mode on the IdP connection |
Version matters too. Ping's release notes show that 13.1.5 changes SP metadata for SAML 2.0 IdP connections: it now includes AuthnRequestsSigned and WantAssertionsSigned when the connection signs requests or requires signed assertions. If you hand a partner fresh metadata after upgrading, they'll see those flags, so check that they match what you actually do.
Older upgrades left their own marks. Ping's notes for 11.3 and 11.2.5 describe a change to SP-initiated session tracking that can affect connections relying on several session states in one transaction. In 13.0, Ping fixed audit log entries for Invalid signature failures that were missing the connection ID. If you're on an older line, don't expect that field in those entries.
One more that catches .NET teams. A developer on Stack Overflow reports an ASP.NET Core app using the ITfoxtec SAML library rejecting PingFederate responses as having an invalid signature. They trace it to carriage-return characters PingFederate 11 and later writes into SAML messages, and to an open .NET issue about XML signatures that fail to verify. The suggested workaround is to sign only the assertion and not the whole response. If a .NET app fails on signatures that verify fine elsewhere, test that first.
Set it up so failures are rare and loud
- Signing certificate expires and nobody gets an email
- Partner certificates imported once by hand, with no metadata URL
- The only signing certificate gets swapped overnight and partners find out at login
- Error pages show no tracking ID
- Full logging left on after the last incident
- Load balancer name differs from the Base URL
- Admins get an email weeks before any certificate runs out
- Partner certificates update themselves from signed metadata
- By switch day, partners already trust the new certificate
- $TrackingId switched on in the SSO error templates
- Standard logging day to day. Errors go to the SIEM from their own log
- Each public hostname added as a virtual host name
Certificate expiry is the failure you can schedule away. Under System > Monitoring & Notifications > Runtime Notifications, turn on Notification for Certificate Events and set the Initial Warning Event and Final Warning Event days. Ping can email those warnings or, with Logging Only, write them to server.log for your monitoring to pick up. The email includes the connections that use the certificate, which tells you which partners to call.
A secondary signing certificate takes most of the drama out of rotation. PingFederate puts it in the connection's metadata, so partners can start trusting the new certificate before you switch to it. If you'd rather not handle it by hand, self-signed certificates can rotate on their own, and Ping emails you when the pending one is created and again when it goes live. You just can't use both on the same primary certificate.
Partner metadata URLs keep the other direction current. Under Security > Certificate & Key Management > Partner Metadata URLs you can tie a connection to the partner's metadata and let it update. Ping says PingFederate validates signed metadata before committing changes. It also notes that PingFederate doesn't report an error when metadata carries neither validUntil nor cacheDuration, so unsigned, undated metadata needs a person watching it.
Before: SSO that fails the day a certificate changes
Partner certificates were imported once by hand. The signing certificate is single and close to expiry, nobody gets warnings, and errors land in a server.log nobody watches.
After: certificate changes stop being outages
Partners pick up the secondary certificate from metadata before anyone switches. Their certificates come in from a signed metadata URL, every public hostname is a virtual host name, and errors land in the SIEM where someone looks.
For monitoring, Ping's guide shows how to add a second appender to log4j2.xml that writes only ERROR and above to its own file, server.error.log, for a SIEM such as Splunk. It means removing additivity="false" from the loggers that use the file appender, repeating the change on every node and restarting.
Who does what when SAML sign-in fails
- Name an owner for every SAML connection, on your side and the partner's, with a way to reach them
- Ask for a list of signing and encryption certificates with expiry dates and the connections each one serves
- Make it a rule that nobody switches off a security check just to close a sign-in ticket
- Turn on certificate event notifications and pick the initial and final warning days, so expiry never comes as news
- Switch on $TrackingId in the SSO error templates on every engine node
- Check that every public hostname users reach is the Base URL or a virtual host name
- Move partners that publish metadata onto Partner Metadata URLs
- Write down what your app expects: response or assertion signed, certificate in KeyInfo, encryption
- Log the reason your app rejects an assertion, not just that it did
- For .NET apps, test signature checks against a real PingFederate response early
- Confirm the Assertion Replay Prevention Service isn't set to its null implementation
- Send PingFederate errors and certificate warnings to the SIEM
- Read admin.log after every connection change. Signature and logging edits are the ones to question
If SSO breaks for every user of one partner
Mass failures almost always follow a change: a certificate, a hostname, an upgrade or a partner's own release. Find the latest change on both sides before you touch settings.
- 01Containfirst hour
- Work out whether one connection or all of them fail. One points at that partner, all of them at your server, certificates or network
- Give the help desk a script for what users see. Promise a time for the next update and keep it
- Hold every other change to that connection. Two changes at once hide the cause
- 02Find the causefirst hours
- Set the connection to Full logging and reproduce once with the browser open
- Pull the tracking ID out of server.log first. Then find the same connection ID in transaction.log
- Check admin.log and the partner's change log for anything since the last good sign-in
- 03Fixsame day
- If a certificate changed, exchange the new one or metadata, then retest
- If a hostname changed, add it as a virtual host name or route users back to the Base URL
- Roll back a connection change from admin.log if that's faster and safer
- 04Verifysame day
- Test with users from at least two groups, SP-initiated and IdP-initiated if both are used
- Return logging to Standard and switch off verbose categories
- 05Learnnext sprint
- Add whatever warning would have caught it, a certificate notice or an alert on the error log, and test it once
- Record the certificate owner, expiry and partner contact where the team will find them
Failures you might recognise (illustrations, not clients)
- the setup
- An admin replaced an expiring signing certificate on a busy SP connection in one change. The SaaS app pins the certificate it was given at setup.
- what happens
- Every user of that app gets a signature error from the app the next morning. PingFederate's logs show clean sends, so the first hour goes on looking in the wrong place.
- what to do
- Send the app the new certificate or fresh metadata now. Next time publish it as the secondary signing certificate first and switch once the app trusts both.
- the setup
- A team hooks a Data Center app up to PingFederate and leaves the defaults alone. They've checked twice that the app has the right certificate.
- what happens
- The app logs signature validation failed on every sign-in. PingFederate signs the whole response by default, and the app only accepts a signed assertion.
- what to do
- In the SP connection's Signature Policy, tick Always Sign Assertion and clear Sign Response As Required, then retest. Add the app's signing expectations to the connection's notes.
- the setup
- PingFederate acts as SP for a partner's users. A new load balancer publishes it as sso.brand.example, while the Base URL still names the old host.
- what happens
- The partner's IdP sends assertions with Destination set to the new name. PingFederate compares it to its Base URL, finds no match and rejects the message.
- what to do
- Add the new name under Virtual Host Names, or update the Base URL if the old one is retired. Then test SSO through every public hostname.
- the setup
- An engine node was restored from a snapshot and its time sync service didn't come back. Its clock drifts a few minutes away from the partner's servers.
- what happens
- Sign-ins that land on that node fail as not yet valid or expired, while other nodes work. Users report it as random.
- what to do
- Fix time sync on the node and check every node's clock against the same source. Leave the SSO token lifetime at its agreed values.
When to hand it to someone else
If PingFederate logs a clean send and the app still rejects the assertion, the app's vendor has to explain what it checked. Send them the saved SAMLResponse, the time, the user and the exact error text. If PingFederate itself throws errors you can't explain, open a case with Ping. Ping's docs describe the collect-support-data tool in pingfederate/bin, which packages logs, configuration and certificate data for Support, and it can encrypt the output.
How Cohash helps
We configure, upgrade and run PingFederate, from SP and IdP connections to certificate rotation plans and authentication policies. If a partner's SSO keeps breaking or a certificate is about to expire on a busy connection, see our Ping Identity page and our identity and access management practice, or start with an identity assessment.
What to take from this
- 01
Work out first whether PingFederate is the IdP or the SP for the failing sign-in. The settings live on that connection.
- 02
Get the tracking ID onto your error pages. It pulls one transaction out of server.log.
- 03
Raise logging on one connection, reproduce once, then put it back to Standard.
- 04
Most signature errors are a mismatch: an old certificate, response versus assertion signing, or a missing KeyInfo.
- 05
Publish a secondary signing certificate before you switch, and turn on certificate warnings.
- 06
Never close a sign-in ticket by switching off replay protection or metadata signature checks.
01Where are the PingFederate log files?
By default in <pf_install>/pingfederate/log. server.log is the main troubleshooting log, transaction.log records each federation message, and audit.log keeps a subset for security. You can move them with the pf.log.dir property in run.properties.
02How do I see the full SAML message in PingFederate?
Set the connection's Logging Mode to Full on its General Info tab, and transaction.log records the complete XML of every message. You can also capture it in the browser's network tab. Put the connection back to Standard afterwards.
03Why does an app say the PingFederate signature is invalid when the certificate is right?
Often the app expects the assertion to be signed and PingFederate signs the response, which is its default. In the SP connection's Signature Policy, tick Always Sign Assertion and clear Sign Response As Required, so only the assertion is signed. Some apps also need the certificate included in the KeyInfo element.
04Users get partner not active from PingFederate. What do I fix?
Someone saved the connection and never switched it on, or switched it off later. Open it, go to Activation & Summary, set Connection Status to Active and save. Then try the sign-in again.
05How do I change a PingFederate signing certificate without an outage?
Add the new certificate as the Secondary Signing Certificate so it appears in your metadata, wait for partners to trust it, then make it primary. Turn on certificate event notifications so you see expiry coming.
06How do I turn on debug logging for SAML signature errors in PingFederate?
Go to System > Server > Log Settings and enable verbose logging for the XML Signatures category, and Protocol Requests and Responses if you need the messages. Switch them off after troubleshooting, because they can log sensitive data and slow the server.
Three questions, about a minute
Pick an answer and we'll tell you if it's right, and why it is or isn't. The score stays in this browser.
-
Q1A SaaS app rejects every PingFederate sign-in with a signature error the morning after you renewed the signing certificate. What do you check first?
show the answer
B. Whether the app still trusts the old certificate A certificate change on your side and a signature error on theirs usually means the app pinned the old certificate. Send the new one or fresh metadata.
-
Q2PingFederate as SP starts rejecting a partner's assertions right after users begin reaching it through a new hostname. What's the likely cause?
show the answer
C. PingFederate doesn't know the new hostname, so the Destination check fails PingFederate checks Destination and Recipient against its Base URL and any virtual host names. A new public name has to be one of them.
-
Q3A user reports a PingFederate error page with a tracking ID on it. What's the quickest next step?
show the answer
A. Search server.log for that tracking ID Nearly every server.log line for that transaction carries the tracking ID, so one search shows the WARN, ERROR and Caused by lines that explain it.