Automating identity compromise response with Shuffle

Learn how to build a Shuffle playbook that takes identity provider sign-in alerts, confirms activity with the user, and revokes sessions or forces a password reset when access was not legitimate.

On this page

Automating identity compromise response with Shuffle for anomalous sign-ins

An identity provider flags an impossible-travel or risky sign-in at an hour when the analyst on shift has to decide quickly whether the session is hostile. A Shuffle identity response playbook exists to make that decision faster and better documented, not to make it for the analyst. It is a SOAR workflow that receives the identity provider detection through the alert pipeline, enriches it with context such as the user's recent activity and device details, asks the user or the manager to confirm the sign-in, and then, only if the activity is not legitimate, calls the identity provider's API to revoke sessions or force a password reset. Shuffle does not replace the identity provider's own controls such as conditional access, risk policies or MFA enforcement, and the playbook should be designed so that those controls keep working if Shuffle is unavailable.

Several parts of this workflow depend on the identity provider you choose. Shuffle reaches the provider through apps, which are built from OpenAPI specifications or the Python SDK, so you need to confirm that an app exists or can be written for your provider's detection feed, session revocation endpoint and user lookup. Approval steps, such as a prompt before revocation, are handled by Shuffle's workflow features, and you should confirm how your provider authenticates API calls and what permissions the service account needs. Keycloak, for example, exposes session and user administration through its own admin interface, so a playbook built against it will differ in endpoint names and token handling from one built against a cloud directory. The identity platform's sign-in logs and session model should be mapped before the first playbook is drawn.

Before building this workflow, decide who may approve a revocation, how long a revoked user waits before a human reviews the outcome, and which actions require an analyst even when the sign-in score is high. Confirm which secrets the revocation step needs and where Shuffle stores them, since saved app credentials are encrypted with the SHUFFLE_ENCRYPTION_MODIFIER value and must be backed up with it. Test the playbook against a sandbox tenant and a set of known sign-ins, including a legitimate traveler, so the false positive path is exercised as carefully as the revocation path. Shuffle's own documentation describes the platform, but the identity provider's documentation is the authority for what a revocation actually does to tokens already issued.

How the identity response flow moves from alert to revocation

The flow starts when the identity provider raises a risk detection, which Shuffle receives through a webhook trigger in a workflow. The workflow then adds sign-in context from the provider and asks the user to confirm the activity before anything changes. Only a confirmed compromise leads to session revocation or a forced password reset through the provider's admin API, and every branch writes an audit record. Check that the admin API credential is stored in Shuffle's encrypted app authentication and that the Orborus runtime, which starts the app containers, sits where the trust boundary you intend places it.

Identity response path from provider detection through confirmation to revocation and audit.

Setting up the identity response playbook in Shuffle

This sequence takes an identity response playbook from a verified identity provider integration to tested, confirmed revocation in a non-production Shuffle instance. Each step closes with a check so the team knows the playbook behaves as designed before it touches a real account.

  1. Confirm identity provider detection and revocation APIs

    The identity engineer checks that the identity provider exposes sign-in risk detections (or equivalent anomalous sign-in events) through an API or push mechanism, and that it has an admin API endpoint capable of revoking sessions and forcing a password reset. Record the exact endpoints, the event fields that identify the user, the session identifier, and the event timestamp. Confirm these against the vendor's current documentation rather than assuming parity between products. Done when a manual API call in a lab tenant returns the detection payload and a revocation call is documented with its expected response.

  2. Create a least-privilege service account

    The identity administrator creates a dedicated service account in the identity provider with only the permissions needed to read sign-in risk detections and revoke sessions or reset passwords for users. Do not reuse a personal administrator account or a broad directory admin role. Document which roles or scopes were granted and why. Done when a test call using only this account succeeds for the revocation endpoint and fails for an out-of-scope admin action, which confirms the permission boundary.

  3. Store the credential in Shuffle app authentication

    The Shuffle administrator adds the service account credential to the relevant app authentication in Shuffle, so workflows reference the stored credential rather than a hardcoded value. Shuffle encrypts saved app credentials and API keys in OpenSearch with AES-256 using the SHUFFLE_ENCRYPTION_MODIFIER secret. Before you save, confirm that this secret is set in the deployment configuration, backed up in your secrets store, and will not change during upgrades or migrations, because changing or losing it breaks all saved app authentications. Done when a test action in the app authentication screen reports success against the identity provider.

  4. Ingest a test detection into Shuffle

    The SOC engineer triggers a sign-in risk detection for a designated test account in the non-production identity tenant, then confirms that the detection reaches Shuffle through the configured trigger, webhook or polling action. Inspect the execution output to verify that the user identifier, session identifier, risk level and timestamp are present and parsed correctly. Done when the test workflow execution shows the expected fields in each action output and the run is recorded in the execution history.

  5. Build and test the revocation branches

    The SOC engineer builds conditional branches for the outcomes the playbook must handle: session revocation, forced password reset, and no action when the risk is cleared or the event is a known false positive. Keep each branch as a separate, named path with explicit conditions on the risk level and the confirmation result. Run each branch against the non-production instance and the test account. Done when every branch produces the expected action in the identity provider and no branch fires on events that should be ignored.

  6. Add the user confirmation step

    The SOC engineer adds a step that asks the user, through the channel your organization already uses for identity verification, whether they recognize the sign-in. The workflow should wait for an answer, record it, and only proceed to revocation when the answer or the timeout result calls for it. Confirm the wording, the response options, and the timeout behavior with the identity and service desk teams before testing. Done when a test user's responses in each path lead to the correct branch and the answers are stored in the execution record.

  7. Verify each revocation in the identity provider

    After each test run, the SOC engineer checks the identity provider directly, not only the Shuffle execution log. Confirm that the target session is no longer active, that a password reset requirement is present where expected, and that the audit log in the identity provider records the action with the service account identity. Compare the result to the workflow output to find any gap between what Shuffle reports and what the provider did. Done when each branch has a matching provider-side record and the test results are saved with the playbook version for review before any production use.

Response options and when each fits

This table compares the main response paths for an identity compromise playbook in Shuffle, covering scope of action, ingestion method and approval model. Read each row for the risk it reduces, the cost of acting on a false positive and the dependency it creates in your stack. The main takeaway is that broad automatic revocation is fast but disruptive, so most teams start with user confirmation and narrow the automation as their detections prove reliable.

Response pathRisk it reducesFalse-positive cost and operational dependency
Revoke all sessions onlyStops an attacker holding a valid token or session cookie, without changing the passwordSigns the user out everywhere and may leave a stolen password valid. Depends on the identity provider's session revocation API and its permissions
Force password reset with session revocationRemoves both live sessions and the known credential, closing the most common takeover pathLocks out the real user and interrupts work, and may hit help desk queues. Depends on the identity provider, directory write rights and a reset channel the user can reach
User confirmation before actionPrevents wrongful lockouts by asking the user whether the sign-in was theirs before any change is madeSlower response while waiting on the user, and the attacker may act in the meantime. Depends on a reliable notification channel and a clear reply path
Automatic action for high-confidence detectionsContains clear cases such as impossible travel combined with a known-bad indicator, within minutes of detectionDisrupts legitimate users if the rule is noisy. Depends on tuning the detection source and testing the playbook against known-good sign-ins
Webhook push ingestionReduces time from detection to response because the identity provider sends the alert as it happensFailed deliveries can lose alerts without a retry or replay. Depends on an inbound endpoint reachable from the provider and on a shared secret to verify senders
Scheduled polling ingestionRecovers alerts missed during outages because each run queries the provider's log for a time windowAdds latency equal to the polling interval and can duplicate alerts. Depends on API quotas, a stored cursor or time marker and deduplication logic
Hybrid of push with periodic pollingKeeps fast response while catching alerts lost in transitMore moving parts to monitor. Depends on both paths being tested and on deduplication keyed on the provider's event identifier

How to confirm activity with the user before revoking

The core trade-off is simple to state: contacting the user gives the best evidence that the sign-in was not theirs, but every minute spent waiting is a minute a stolen session stays valid. Design the workflow so the confirmation request travels over a channel the attacker does not control. That usually means a phone call to a number already on file in the HR or directory record, or a push to a registered mobile app, never a reply to an email or message that the suspicious sign-in itself could have touched. Shuffle can send these requests through the messaging and paging apps your team already uses, and a human approval step in the workflow can hold execution until a reply arrives. Confirm with your identity team which out-of-band paths exist for each user group, including contractors and service accounts, which often have none.

Set the timeout deliberately. A timeout should default to containment, so that silence from the user, a failed notification or an unreachable approver results in session revocation or a forced password reset rather than a stalled case. Make the default explicit in the workflow branch, and decide which actions still run while waiting, such as pulling the sign-in log, recording the source address and tagging the account in the case. Ask your team to test the timeout path in a non-production tenant, because a branch that is never exercised is the one most likely to fail silently during a real incident.

Record every decision so that the reviewer can reconstruct it later. Store the identity provider detection, the time and channel of each confirmation attempt, the approver's answer or the timeout result, and the revocation action taken, in the Shuffle execution record or the case that the workflow opens. Keep the reason field short but mandatory, and include the approver identity. Confirm with your compliance lead how long these records must be kept and whether they fall under your own retention policy, since Shuffle retention depends on how you configure its database.

Security considerations for automated session revocation

An automated revocation playbook holds powerful identity permissions, so it needs its own security controls. The six cards below cover the credential it uses, the secrets it stores, who can change it, what it logs, how it limits blast radius and how it treats alert data it does not control.

Scope the identity admin credential

The playbook needs a credential that can revoke sessions or reset passwords in your identity provider, and that is the most sensitive account in the workflow. Create a dedicated service account with only the revoke and reset permissions the playbook uses, not a general administrator role. Confirm in your identity provider's documentation which permissions a session revocation actually requires, and restrict the account to the groups or realms it must act on.

Keycloak admin docs

Protect the encryption modifier

Shuffle encrypts saved app credentials and API keys in OpenSearch with AES-256 using the SHUFFLE_ENCRYPTION_MODIFIER secret. Store this value in your secrets manager, restrict who can read the environment file, and back it up in a separate controlled location. Losing or changing it breaks every saved app authentication, including the identity provider connection, so a rotation needs a planned re-entry of credentials.

Shuffle configuration docs

Restrict who edits and approves

A playbook that can end a user's sessions should not be editable by everyone who can open the workflow editor. Separate the people who build the revocation workflow from those who approve revocations, and limit edit rights to a small named group. Review each workflow change through your normal change process and confirm that role mapping in Shuffle matches that separation before go-live.

Shuffle SSO docs

Log every revocation action

Each revocation, password reset and approval decision should leave a record that links the alert, the analyst, the target account and the result. Send Shuffle execution history and identity provider admin events to your central log platform, and keep them longer than the workflow's own retention. Test that a sample revocation can be traced end to end from the identity provider log back to the originating alert.

Cap mass revocation from one run

A compromised Shuffle instance or a faulty loop could revoke sessions for far more users than an incident warrants. Build a hard ceiling into the workflow on the number of accounts a single run may touch, and require a human decision above it. Keep the identity provider's own rate limits and a documented break-glass path for restoring access if revocations go out in error.

Treat alert fields as untrusted input

Usernames, IP addresses and user agents in identity alerts can be attacker-controlled. Validate and normalize these fields before they reach a revocation call or a Liquid template, and reject values that do not match the expected account format. Test the workflow with crafted alert payloads so an injected value cannot change the target account or the action taken.

Questions teams ask before automating identity response

What drives the cost of automating identity compromise response?

The main cost driver is how many identity sources and response actions the playbook must cover. Effort rises with each identity provider integration, because each needs its own authentication, field mapping and test data. Approval design adds work when analysts must confirm activity with the user before a session is revoked or a password is reset. Testing and hardening add further effort, including checking that saved credentials are encrypted, that the SHUFFLE_ENCRYPTION_MODIFIER secret is backed up and that the runtime has restricted access. Costs are one-time for the build and recur for upgrades and retesting. Ask any quote to itemize integrations, approval paths, test cases and hardening steps separately.

How long does an identity response automation project take?

Duration depends on scope, not on a fixed template. A single identity provider with one detection source and one revocation action is a smaller project than several providers, multiple approval routes and a tested rollback path. The factors that lengthen work most often are access to administrator APIs, the number of sample detections needed for testing and how many people must sign off on approval steps. Shuffle's own licensing and versioning do not set the timeline. Ask for a written schedule with milestones for integration, approval testing, staging validation and go-live, and confirm which of those steps assume your environment is ready.

What does our team need to provide before the work starts?

Plan to provide four things. First, administrator API access to the identity provider, with a service account scoped to the actions the playbook will take, such as listing sessions, revoking tokens and forcing a password reset. Second, sample detections from your identity provider, including legitimate and suspicious sign-ins, so the logic can be tested against real field formats. Third, on-call rules and escalation contacts for after-hours events. Fourth, named approval owners who can confirm or deny that a sign-in was legitimate. Ask the implementation partner to list these inputs in the scope document with an owner and due date for each.

Can our own team build identity response automation in-house?

Many teams can, provided they have engineers who understand both the identity provider's API and Shuffle's workflow model. Shuffle is licensed under AGPL-3.0 and its features are available in the open-source edition, so the platform itself is not the barrier. The harder parts are usually secure credential handling, tested approval paths, safe revocation logic that avoids locking out legitimate users and a runtime hardened for production. Assess your team against those skills honestly. A partner can build the first version, document it and hand over the runbooks so your staff can maintain it.

What recurs after the identity response playbooks go live?

Several things recur after launch. Shuffle releases new versions, and the Shuffle documentation recommends the latest Docker tag for stable releases, so you will need a regular upgrade cycle and version pinning. Identity provider APIs change, which can break app definitions and field mappings. Apps and workflows need review when detection formats change. The playbooks also need retesting after any change to approval owners, identity sources or the Shuffle runtime. Ask any proposal to name who performs upgrades, how often app updates are reviewed and whether retesting is included in a retainer or priced separately.

What security risks should we review before automating session revocation?

The main risks are an automated action that revokes a legitimate user's access, a service account with more privilege than it needs and credentials stored in the automation platform. Review who can approve a revocation, whether the playbook logs each action and who receives the audit trail. Confirm that the identity provider's own admin controls remain available if the automation fails. Shuffle encrypts saved app credentials in OpenSearch with AES-256, but losing or changing the encryption secret breaks every saved authentication, so the secret needs a documented backup and rotation plan. Keycloak and other identity providers have their own admin roles that should be scoped separately from Shuffle roles.

How is a fixed-scope identity automation engagement agreed?

Most DeployOpen engagements are fixed-scope, which means the scope, deliverables and timeline are agreed in writing before work starts. For this topic, the written scope should list the identity providers in scope, the detection types and response actions, the approval design, the test cases, the hardening controls and the handover items. It should also state the client inputs and the owner of each. Ask for the quote to follow directly from that written scope, and confirm how changes after kickoff are handled. Ongoing upgrades, app updates and continuous testing can be added as a retainer if you want them.

Testing the playbook against a self-managed Keycloak realm

Teams running Keycloak as their identity provider should exercise the session revocation and password reset paths in a lab realm before any production playbook touches live accounts. A dedicated test realm with a few synthetic users, a test client registered for the Shuffle workflow, and a known set of active sessions lets you confirm that the playbook revokes what it should and nothing else. Use the Keycloak admin console and the metrics endpoints described in the Keycloak observability guide to check session counts before and after each run, so the evidence comes from the identity provider itself rather than from the workflow's own output.

Database and high availability choices determine how quickly a revocation is honored across nodes, so test against a topology that resembles production. Keycloak's supported high availability designs depend on a synchronously replicated database, and the Keycloak database guide lists the supported production databases. Only the dev-file default is intended for development. Run the same revocation test on a single node and on a multi-node cluster, record the interval between the Shuffle action and the first rejected token request on each node, and treat any node that keeps accepting the old session as a finding to fix before go-live.

Confirm the exact Keycloak version in your lab and production environments before you build against its admin API, because endpoint paths, required permissions and session representations can change between releases. Keycloak's current release notes and the upgrading guide are the places to check whether the admin calls in your playbook still apply. If you run Red Hat build of Keycloak instead of the upstream project, confirm the version your subscription supports, since it can trail the upstream release. Pin the version in the lab, rerun the full test set after any upgrade, and keep a copy of the test results with the playbook version they cover.

How DeployOpen delivers Shuffle identity response automation

DeployOpen plans, builds and hands over Shuffle identity response playbooks inside infrastructure you control, from the identity provider detection feed to revocation and password reset steps. Each engagement is fixed-scope, with the playbook logic, approval gates, secrets handling and runtime agreed in writing before work starts.

How we scope

  • Confirm which identity provider detections feed Shuffle and whether they arrive by webhook or polling.
  • Define which sign-in signals trigger the playbook and which actions require analyst approval first.
  • Agree in writing which session revocation and password reset actions the identity system must expose and permit.

How we build

  • Build the Shuffle workflow with tested branches for confirmed activity, unconfirmed activity and failed user contact.
  • Store identity provider credentials in Shuffle's encrypted app authentication, with the encryption secret kept under your control.
  • Test each branch against replayed sign-in events in a non-production Shuffle environment before any live revocation is enabled.

How we hand over

  • Document the trigger logic, decision points, approval steps and audit trail so your security team can review the workflow.
  • Deliver version-controlled workflow exports and a runbook covering rollback, disabled steps and key rotation.
  • Walk your analysts and identity administrators through the workflow and the manual fallback for revocation.

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer after handover.
  • Review the workflow when the identity provider changes its detection schema or API.
  • Retest the playbook after Shuffle upgrades so revocation actions keep working as designed.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.