Rebuilding Identity Federation After a SAML Token Theft
A SAML token theft turns an identity incident into a federation problem. The stolen object may be a signed assertion captured in transit, a browser session created after a successful login, or a downstream access token issued through an OpenID Connect flow. Many Australian organisations use SAML to enter Microsoft 365, Google Workspace, Atlassian, Salesforce and internal portals, so one compromised trust relationship can provide access across a large collection of applications.
Recovery must separate three questions: where the artefact came from, which sessions it can still activate, and whether federation trust itself was compromised. For teams in Sydney, Melbourne and Brisbane, that means coordinating cloud administrators, corporate IT, legal advisers and incident responders across different time zones and access paths. It also means preserving a defensible timeline without leaving active attacker sessions in place.
| Compromised element | Strongest clue | Immediate containment | Durable correction |
|---|---|---|---|
| Stolen SAML assertion | Replayed assertion or unusual service-provider login | Block replay, revoke the application session and require reauthentication | Enforce audience checks, replay detection and shorter assertion lifetimes |
| Stolen service-provider session | User remains logged in after signing out of the identity provider | Revoke local sessions and associated API tokens | Improve federated logout and session propagation |
| Compromised identity-provider session | Legitimate password reset does not end access | Revoke provider sessions, reset credentials and review recovery methods | Use device-bound sessions and phishing-resistant MFA |
| Exposed signing private key | Assertions appear valid but originate from an unexpected source | Remove trust in the old key and initiate emergency key rotation | Protect keys in HSMs and monitor every certificate transition |
| Stolen downstream OAuth token | API activity continues without a current browser session | Revoke refresh and access tokens at the authorisation server | Limit scopes and shorten token lifetimes |
Why token theft changes the risk
The term SAML token covers several different objects. A signed assertion is a short-lived XML statement, usually exchanged during browser authentication. A service provider may validate that assertion and create its own session cookie, which can then outlive the assertion. Session theft from a portal, phishing that captures an assertion and theft of an identity provider’s signing private key therefore create different blast radii even when investigators initially describe them with the same term.
Assertion theft is often time-bounded, but its consequences may not be. Possession of a valid assertion can be enough for an attacker to enter the associated application unless the service provider tightly validates its destination, audience, timestamps and single-use status. Poorly configured systems may also remain vulnerable to XML signature wrapping, where an attacker presents a genuine signature alongside altered assertion content. The endpoint that produced the token can look normal while a downstream application grants unauthorised access.
Scope should follow the token’s path rather than its name. Investigators need to identify the identity provider, service provider, authentication method, device, network and application session involved. They should compare provider logs with email, VPN, endpoint detection and application access records, then reconstruct the first and last malicious activity. An isolated assertion theft does not automatically prove that the identity provider was compromised, while a malicious assertion signed by a trusted issuer can indicate a deeper key or configuration failure.
Contain access while preserving critical services
Containment should move from evidence preservation to identity and session revocation. Teams should capture volatile logs while revoking affected identity-provider sessions, service-provider sessions, OAuth grants, refresh tokens and recovery codes. Password resets alone are insufficient because stolen cookies and access tokens can remain valid. Privileged accounts deserve immediate attention, particularly administrators able to change federation settings, create applications or approve access requests.
Emergency access must remain available without recreating the original weakness. Local break-glass accounts, separately controlled recovery credentials and documented provider outage procedures can protect critical payroll, healthcare or logistics services while normal federation is suspended. Certificate or key rotation is not the default response to every assertion theft; a targeted session revocation may be sufficient. A suspected private-key compromise is different because every assertion signed by that key must be treated as potentially forged.
The Australian enterprise market commonly combines Microsoft Entra ID or Okta with on-premises Active Directory and specialist privileged-access tools such as CyberArk. Containment must therefore include directory synchronisation accounts, privileged access vaults, non-human identities and API credentials. Revoking a human user’s browser session does little if an attacker retains a service principal capable of impersonating that user or changing a trust relationship.
Rebuild the federation trust chain
A sound recovery starts with an inventory of every relying party. For each service provider, record its owner, entity identifier, metadata source, signing and encryption certificates, required bindings, attribute mappings, NameID formats and business criticality. Include cloud suites, software-as-a-service platforms, supplier portals and forgotten internal applications. This inventory exposes hidden trust paths, certificates approaching expiry and systems that cannot tolerate a simultaneous cutover.
Where the signing private key may be exposed, the old key must lose trust. A controlled process creates a new key pair, publishes updated signed metadata, updates service-provider trust configuration and switches signing to the new key. Overlapping certificates can reduce outages when continuity is safe, but any period in which the compromised key remains trusted extends the attacker’s opportunity. Emergency rotation therefore needs heightened monitoring and a clear retirement time rather than an open-ended overlap.
Validation must be rebuilt alongside configuration. Service providers should verify the issuer, audience, destination, request correlation, signing certificate and validity window, while rejecting replayed or unexpected assertions. XML processing must reject dangerous namespaces and transformations, and assertions should be bound to the intended application rather than accepted from any request. Centralised logs should record issuance, validation failures, certificate changes and logout propagation without exposing raw assertions or sensitive attributes.
Test identity proofing and response controls
Behavioural evidence can separate replay from legitimate authentication. CARM Security’s user behaviour analytics connects identity events with endpoint, network and application signals, helping investigators identify unusual devices, impossible travel after normal proxy exclusions and access patterns that precede token misuse. Correlation is more valuable when it links the identity event to a specific application session and subsequent data access.
Recovered users should re-establish identity through proportionate, phishing-resistant controls. Step-up authentication, FIDO2 security keys or passkeys, device-bound sessions and tighter verification for help-desk resets can interrupt an attacker’s remaining access. New enrolments should follow a known pattern, with anomalous changes reviewed separately. For organisations where staff routinely move between suburban home connections, CBD offices and shared workspaces, network location alone must never become the deciding signal.
Australian legal and regulatory duties should shape the investigation and notification analysis. The Privacy Act 1988 and Australian Privacy Principles require covered organisations to protect personal information, while APP 3 governs assessment and notification of eligible data breaches involving the Office of the Australian Information Commissioner. The Australian Signals Directorate’s Essential Eight provides a useful baseline for identity and access controls, and APRA CPS 234 requires APRA-regulated entities to maintain information-security frameworks tailored to assessed risks. These obligations should inform evidence handling without delaying urgent containment.
Restore service while preserving trust
Applications should return through a staged sequence, beginning with lower-risk services and carefully monitored authentication flows. Each release needs checks for successful logins, rejected assertions, session creation, logout propagation and downstream API activity. Teams should verify that compromised cookies fail, new assertions carry the intended issuer and audience, and local sessions cannot survive the identity-provider response. Access to especially sensitive systems can remain restricted until those controls demonstrate consistent behaviour.
Assurance then becomes an operating routine rather than a one-time reconstruction. The federation inventory needs regular review, certificate expiry monitoring, periodic replay tests and exercises covering provider compromise and stolen assertions. A coordinated response capability such as CARM Security can combine vendor telemetry during a major event, while an external incident team can provide independent scoping when internal administrators may have been compromised. Useful measures include session-revocation time, certificate coverage, unverified applications and the percentage of privileged users using phishing-resistant MFA.
The durable lesson is that restoring sign-in does not restore identity trust. Recovery is complete only when federation relationships, session controls, key custody, user verification and operational evidence have been rebuilt and tested as one coherent security system.