--- title: "PingFederate account takeover protection | Darwinium" slug: "ping-federate" description: "Integrate Darwinium with PingFederate using CDN risk assessment, trusted request headers, authentication selectors and risk-based MFA." updated: 2026-10-16T05:57:21Z published: 2026-10-16T05:57:21Z canonical: "docs.darwinium.com/ping-federate" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.darwinium.com/llms.txt > Use this file to discover all available pages before exploring further. # PingFederate Integrate Darwinium with PingFederate to assess customer sign-in attempts for account takeover risk and apply risk-based authentication. Darwinium runs at your CDN, collects device and behavioural signals, and supplies a risk decision. PingFederate continues to validate credentials and enforce your authentication requirements. This guide describes an HTML Form login integration using PingFederate's built-in HTTP Header Authentication Selector and PingFederate 13.0 terminology. Confirm request timing, policy mappings and MFA adapter behaviour in a test environment before enabling enforcement. Existing sessions, passwordless authentication and other adapters need their own coverage checks. ## How the integration works ![Browser traffic passes through Darwinium at the CDN before reaching a protected PingFederate origin](https://cdn.document360.io/db6f7316-640d-4099-b5a1-b01b4dbd17fc/Images/Documentation/pingfederate-architecture.svg?sv=2026-02-06&spr=https&st=2026-12-01T03%3A44%3A22Z&se=2026-12-01T04%3A44%3A22Z&sr=b&sp=r&sig=vEKY%2B3ACuyBLUluvBQdq828Vx%2BuLvR0QajlaePqdxfk%3D) Darwinium injects JavaScript profiling into the login page response. On the form submission, it evaluates the collected signals and sets the origin request header `X-Darwinium-Risk`. Your PingFederate policy uses the value to select the authentication path. | Decision | Required behaviour | | --- | --- | | `pass` | Continue existing authentication requirements, including any baseline MFA. | | `challenge` | Require additional verification before completing authentication. | | `reject` | Deny the attempt; issue no successful authentication result. | | Missing or unexpected value | Deny at the risk checkpoint. Do not treat this as a pass. | These decision labels must agree with your Darwinium journey. Creating selectors alone does not implement denial or MFA. ## Before you start You need: - Administrative access to a test PingFederate environment with a working HTML Form adapter, credential validator and application connection. - A Darwinium deployment on [Cloudflare](/docs/cloudflare-deployment), [AWS CloudFront](/docs/cloudfront-deployment) or [Akamai](/docs/akamai-deployment), with permission to update the login journey. - An authentication hostname routed through the CDN and a protected TLS connection to the PingFederate origin. - A working MFA adapter for the challenge path, with enrolled test users. - A copy of the current authentication policy and a rollback plan. Risk routing changes which authentication paths applications can take. Identify the actual login HTML response and credential submission in a browser network trace. `/as/authorization.oauth2` and `/as/<transaction>/resume/as/authorization.ping` are illustrative OAuth paths, not universal match rules. Redirects, adapters and SAML flows can use different paths. ## 1. Configure Darwinium at the CDN 1. Route the authentication hostname through your Darwinium-enabled CDN deployment. Check that redirects, form actions and cookies keep the browser on the intended hostname. 2. [Insert JavaScript profiling](/docs/inserting-darwinium-js-profiling) into the response containing the login form. Verify that the browser loads the script and submits profiling data before assessment. 3. Configure a journey step for the credential submission, using the identifiers and signals needed for the assessment. Do not extract passwords into analytics attributes or logs. 4. Configure the decision strategy to produce `pass`, `challenge` or `reject`. 5. Set **one origin request header**, `X-Darwinium-Risk`, from that decision. For a journey using the corresponding champion strategy, the template may be `{{ outcome.CHAMPION.decision_strategy.result }}`. Confirm your actual strategy and output. 6. Use an injection mode that creates the header when absent and replaces an existing value, such as **OverwriteOrInsertContent**. Verify the outgoing request at the origin. A response header sent to the browser does not supply the selector's input. Remove caller-supplied copies of the risk header, including duplicate and differently cased names, before setting the trusted value. Restrict origin access to your authorised edge deployment using appropriate origin authentication and network restrictions. Close alternate public routes; DNS pointing at a CDN is insufficient. Ping warns that HTTP headers can be forged and that its header selector should not bypass a higher-assurance authentication source. Keep baseline requirements in place and review the trusted edge-to-origin design before using this pattern to select additional MFA. See [Ping's header selector guidance](https://docs.pingidentity.com/pingfederate/13.0/administrators_reference_guide/pf_config_http_header_auth_selector.html). ## 2. Choose the risk checkpoint The initial page request normally happens **before** credential submission and before its risk decision exists. A selector at the policy root may therefore run too early. ![Load the login page, assess submission, validate credentials, evaluate risk, then complete the authentication policy](https://cdn.document360.io/db6f7316-640d-4099-b5a1-b01b4dbd17fc/Images/Documentation/pingfederate-request-sequence.svg?sv=2026-02-06&spr=https&st=2026-12-01T03%3A44%3A22Z&se=2026-12-01T04%3A44%3A22Z&sr=b&sp=r&sig=fqiLP1DUZ3CAD7mIQfxRHP0Hg6NS2CTqtuIQFH0usKE%3D) For a fresh HTML Form login, use the adapter's successful credential-validation path as the candidate checkpoint for the selector chain. Verify that the selectors execute on the assessed form-submission request and can read its trusted header. If the adapter redirects, resumes on another request or reuses a session, the header might no longer be available. Agree a design that binds the decision to the authentication transaction with your Darwinium and PingFederate teams. Do not substitute a browser-provided header, URL parameter or unverified cookie to carry a trusted decision across requests. ## 3. Create the three selectors In **Authentication → Policies → Selectors**, create these instances: | Instance name | Instance ID | Match expression | | --- | --- | --- | | Darwinium Reject Selector | `DarwiniumReject` | `reject` | | Darwinium Challenge Selector | `DarwiniumChallenge` | `challenge` | | Darwinium Pass Selector | `DarwiniumPass` | `pass` | For each instance: 1. Choose **Create New Instance** and enter the name and ID. 2. Select **HTTP Header Authentication Selector** as the type. 3. Set **Header Name** to `X-Darwinium-Risk` and enable **Case-Sensitive Matching** for the value. 4. Add the exact match expression under **Results** and commit the row with **Update**. Do not add wildcards. 5. Review the summary, select **Done**, then **Save** the selector configuration. Each selector returns **Yes** for its configured value and **No** otherwise. The separate pass selector prevents missing or unknown values from becoming the allow path. ## 4. Connect the authentication policy Open **Authentication → Policies → Policies**. Enable **IdP Authentication Policies** for the applicable browser flows. **SP Authentication Policies** concerns PingFederate acting as a service provider; it is not a general switch for all SP-initiated logins to your IdP. Copy the relevant policy for testing. Keep credential validation and required baseline factors, then add the selector chain at the verified risk checkpoint. PingFederate supports selectors after an authentication source; see [configuring policy rules](https://docs.pingidentity.com/pingfederate/13.1/administrators_reference_guide/pf_config_rules_auth_policies.html). ![Reject goes to denial, challenge requires MFA, pass continues existing requirements, and any unmatched value is denied](https://cdn.document360.io/db6f7316-640d-4099-b5a1-b01b4dbd17fc/Images/Documentation/pingfederate-policy-routing.svg?sv=2026-02-06&spr=https&st=2026-12-01T03%3A44%3A22Z&se=2026-12-01T04%3A44%3A22Z&sr=b&sp=r&sig=GylIheJsZwtXId2dmizs6oCG5tYfc8%2FMLUlXlcpZZK0%3D) | Selector | Yes | No | | --- | --- | --- | | Darwinium Reject Selector | Deny through a failing contract mapping. | Darwinium Challenge Selector. | | Darwinium Challenge Selector | Invoke MFA. Only successful MFA may reach the normal completion mapping. | Darwinium Pass Selector. | | Darwinium Pass Selector | Continue existing requirements and the normal completion mapping. | Deny through a failing contract mapping. | Credential failure and MFA failure must terminate authentication. Map successful paths to the policy contract used by the intended application connection or OAuth configuration. Review policy ordering so another applicable policy cannot grant access first. ### Make rejection explicit For a branch after credential validation, use a dedicated authentication policy contract mapping whose issuance criteria always fail. One implementation to validate in your environment is: 1. End the reject and unmatched branches with the appropriate policy contract and open the mapping for **each** branch. 2. Fulfil the required contract attributes from the preceding authentication source. 3. Under **Issuance Criteria → Show Advanced Criteria**, add the Boolean expression `false` with an error result such as `darwiniumRiskDenied`. Attribute mapping expressions must be enabled for this option. 4. Use **Test** to confirm failure, then save. Keep this deny configuration separate from successful-path mappings. 5. Complete an actual rejected login and confirm that no authentication success, assertion or authorization code reaches the application. PingFederate rejects a request when contract issuance criteria fail; see [contract issuance criteria](https://docs.pingidentity.com/pingfederate/13.0/administrators_reference_guide/pf_defining_issuance_criteria_contract_or_local_identity_mapping.html). This is a reference design to validate, not an end-to-end tested configuration for every adapter. **Restart** retries a policy; it is not terminal denial. **Continue** can fall through to another policy. Enable **Fail if policy engine finds no authentication source** as appropriate, but also review default authentication sources: that setting alone does not make every unmatched branch fail closed. See [PingFederate policy behaviour](https://docs.pingidentity.com/pingfederate/12.3/administrators_reference_guide/pf_defining_auth_policies.html). ## 5. Verify the complete login flow Use a dedicated test application and accounts. Temporarily force each decision through test-only Darwinium rules, then restore the intended strategy. Observe the decision, selector branch and final application result for the same transaction. | Test | Expected result | | --- | --- | | Valid credentials + `pass` | Existing requirements complete; application sign-in succeeds. | | Invalid credentials + `pass` | Credentials are rejected. A risk pass cannot authenticate a user. | | Valid credentials + `challenge` | MFA is required before application sign-in completes. | | Cancelled or failed MFA | No successful authentication result reaches the application. | | Valid credentials + `reject` | Explicit denial, with no successful assertion or authorization code. | | Missing, empty or unknown decision | Explicit denial at the checkpoint; no fallback grants access. | | Client sends `X-Darwinium-Risk: pass` | The edge removes/replaces it; the actual Darwinium decision controls routing. | | Direct origin or alternate hostname | The untrusted route cannot bypass the protected flow. | | Assessment timeout or error | The agreed failure policy applies; for this design, no decision means denial at the checkpoint. | Repeat with fresh and existing PingFederate sessions, and for every application flow in scope. HTTP 200, an `AUTHN_ATTEMPT` entry or a selector match does not prove enforcement. Confirm the final sign-in result and correlate it with PingFederate audit logs and Darwinium events. Manually adding a header with cURL can test an isolated selector in a controlled environment. It does not prove profiling, assessment, trusted header handling or the complete login flow. ## Troubleshooting | Symptom | Check | | --- | --- | | All attempts reach the unmatched branch | Header direction and name, lowercase value, selector timing, or a redirect discarding the assessed request. | | Challenge signs in without MFA | The challenge branch must invoke MFA; only its success path may complete authentication. | | Rejected users see repeated login pages | Replace a restart loop with an explicitly failing contract mapping. | | Login succeeds with a missing decision | Policy order, default sources, existing sessions and alternate application mappings. | | Profiling is absent | HTML matching, script loading, Content Security Policy and collection requests. Check the response containing the form, not just the initial redirect. | When requesting help, share the PingFederate version, adapter type, application flow, redacted policy diagram and transaction timestamps. Remove credentials, cookies and tokens from network traces.