How OAuth2 authentication in custom Shuffle apps works
A custom Shuffle app often has to call a system that expects OAuth2, a bearer token or an API key, and the team needs those credentials stored safely and reused across many workflows instead of being pasted into each one. Shuffle handles this by saving app authentication as a credential object on the platform. According to the configuration documentation, saved app credentials and API keys are encrypted in OpenSearch with AES-256 using the SHUFFLE_ENCRYPTION_MODIFIER secret. The encrypted value lives in the database, not in the app code or the workflow definition, so the app package itself should never contain a client secret or a long-lived token. This is the main reason to build the authentication once and attach it to the app, rather than repeating it in each playbook.
At run time, the workflow worker starts the app container for each action, and the authentication the workflow selects is supplied to that container when it runs. The app code reads the values it needs through the action parameters and the authentication fields defined in its OpenAPI specification or Python definition, then makes the outbound call. Because the container is short-lived and versioned, a token refresh has to be handled inside the app logic for each execution, not stored in a local file that will disappear. A team needs this work when a target system requires OAuth2 client credentials or a refresh flow, when several workflows must share one service account, or when a security review asks where credentials live and who can read them. Before building, confirm which grant types the target supports, how long tokens last, and whether the service account is allowed to be shared across workflows.
The encryption setting carries an operational risk that teams should plan for before any credential is saved. The configuration documentation warns that losing or changing SHUFFLE_ENCRYPTION_MODIFIER breaks every saved app authentication, so the value must be stored in your secrets manager, backed up with the OpenSearch data, and kept unchanged through upgrades and migrations. Test a restore on a non-production instance to confirm that saved authentications still decrypt. Also confirm with your Shuffle version that the authentication types you need, such as OAuth2 or bearer, are supported by the App Creator or the Python SDK you intend to use.
Which authentication method fits which target API
This table compares OAuth2 client credentials, OAuth2 authorization code, bearer tokens and API keys as configuration choices in a custom Shuffle app. Read each row against the target API's own auth model, then check what the workflow must store and who owns rotation.
| Method | Fits when the target API | What the app and workflow must store | Refresh and rotation burden |
|---|---|---|---|
| OAuth2 client credentials | Issues tokens to a service identity and needs no user sign-in during automated runs | Client ID, client secret and token endpoint, with the access token cached or re-requested per run | Access tokens expire and are re-issued automatically, but the client secret must be rotated on a schedule set by the vendor and your policy |
| OAuth2 authorization code | Acts on behalf of a named user, or limits access to what that user may see | Client ID, client secret, authorization and token URLs, and a refresh token tied to one user's grant | Highest burden: refresh tokens can be revoked when the user leaves or changes roles, so a re-consent path is needed |
| Bearer token (static) | Vendor issues a long-lived token that you supply directly, with no token endpoint | The token value only, held as an encrypted credential in Shuffle | Manual rotation: when the token is replaced, every workflow using it fails until the stored value is updated |
| API key in header or query | The API accepts a single key per client or account and has no token exchange | The key value, plus the header or parameter name the API expects | Manual rotation like a static bearer token, with extra care if keys can appear in logs when placed in query strings |
| Mutual TLS or other non-OAuth method | The API requires client certificates or a method outside the forms above | Certificate material and passphrases, which need handling outside a plain text field | Certificate expiry and renewal, usually the longest lead time; confirm how your Shuffle version stores these before relying on them |
| Shared credential for many workflows | Several workflows need the same target system under one identity | One stored authentication reused across workflows, so one owner controls changes | Rotation touches every workflow at once; plan a single update step and a test run after each change |
Setting up one reusable authentication in a custom app
This sequence turns one set of OAuth2, bearer or API key credentials into a single saved authentication that several workflows can reference, with each step confirmed before the next one starts.
Define the authentication in the app definition
The app developer declares how the target API authenticates in the app's OpenAPI definition for an App Creator app, or in the app's api.yaml and app.py for a Python app. Name the auth type (OAuth2, bearer token or API key), the token endpoint or header location, and the scopes the actions need, then build the app as a versioned container. Done when the app builds without errors and the authentication fields appear in the app's configuration screen in the Shuffle interface. Confirm the exact field names against the Shuffle apps documentation for the version you run.
Store the credential once in the interface
An administrator or the app owner enters the client ID, secret, token or key once through the Shuffle interface to create a saved authentication for the app. Shuffle encrypts it in OpenSearch with AES-256 using the SHUFFLE_ENCRYPTION_MODIFIER secret, so confirm that secret is set, backed up and unchanged before saving anything. Done when the saved authentication appears in the app's authentication list with a name your team recognizes. Do not paste the secret into workflow fields or step notes, since that defeats the point of a single stored credential.
Confirm the token exchange completes
For OAuth2, trigger the authentication flow from the interface if the app supports it, and confirm that the provider issues an access token and, where offered, a refresh token. Check the token lifetime with the target API's documentation, since that decides how often refresh runs. Done when the authentication status shows as valid. If it does not, verify the redirect URL, scopes and client settings with the provider before changing anything in Shuffle.
Test one action against the target API
Run a single read-only action from the app in a test workflow, using the saved authentication. Choose an action that is harmless to execute, such as one that lists or retrieves a record. Done when the execution result shows a success status and the returned data matches what you see when you query the same endpoint directly in the provider's console or with a trusted client. Keep the test workflow separate from production workflows so failures do not affect live playbooks.
Check the result fields your playbooks depend on
Review the JSON output of the successful test and record the field names and structures that downstream steps will read, such as identifiers, status values and pagination markers. Write them down in the app's documentation or the team runbook. Done when a second person can read the output and name the fields they would use. If a field is missing or differs from the provider's documentation, correct the action definition and rebuild the app before reusing it.
Point several workflows at the saved authentication
In each production or staging workflow that needs the app, select the saved authentication in the app action rather than entering new credentials. Keep one authentication per target system so that rotation touches one object. Done when the saved authentication is visible as the selected option in every workflow that uses the app, and a run of each workflow returns data without prompting for credentials. If a workflow shows an empty or missing option, confirm it was built against the same app version.
Verify refresh and rotation before relying on them
Confirm how the app behaves when the token expires or the credential is rotated. For OAuth2, let the token expire in a controlled test or wait for a refresh event, then run the test action again. For a rotated key or secret, update the saved authentication in one place and rerun a test. Done when the action succeeds after refresh or update without editing any workflow. Confirm the refresh behavior of your app version with the Shuffle apps documentation, since it depends on how the app is written.
Record the authentication in the operations runbook
Document the saved authentication name, the owning team, the target API, the scopes, the expected token lifetime, the rotation procedure and the list of workflows that reference it. Note that losing or changing the encryption modifier breaks every saved authentication, so include the backup location for that secret. Done when the runbook entry is reviewed by the operations owner and each listed workflow has been checked against it. Repeat the sequence when you upgrade Shuffle, because behavior can change between versions.
How token refresh is handled and where it can break
The first question for any OAuth2 app is who renews the access token: the app code, or the platform. Before you write a single action, open the app configuration and confirm which one applies to your Shuffle version. Do not assume built-in refresh behavior from another SOAR product or from a generic tutorial. If the app stores a refresh token and expects the platform to exchange it, you need to confirm that the platform performs that exchange and where the new access token is saved. If the app code performs the exchange, the refresh call, its error handling and the write-back of the new token all live in your Python or OpenAPI definition, and they become part of your release review. Either way, write down the token lifetime your identity provider issues, the refresh token lifetime, and whether refresh tokens rotate on each use.
Refresh fails in predictable situations. A refresh token expires or is revoked, often after a password reset, a session policy change or an administrator disabling the service account. A client secret rotates in the identity provider but not in the Shuffle authentication record, which is encrypted at rest with the SHUFFLE_ENCRYPTION_MODIFIER value, so the old secret keeps failing until someone updates it. Rotating the encryption modifier itself breaks every saved authentication, as the configuration docs warn. In a workflow run, these failures usually surface as an action that returns an authorization error or an empty result, and downstream actions then run on bad or missing data. Set workflows to report action errors, and make sure a failed authentication stops the playbook instead of letting it close a ticket or block an indicator on incomplete input.
Test the refresh path before production, not only the first successful call. In a non-production Shuffle instance, force the conditions you expect: let the access token expire, revoke the refresh token, rotate the client secret, and run each workflow that uses the authentication. Record what the run shows and whether the alert or case is left in a recoverable state. Confirm the provider's audit log records the failed exchange so the failure is visible to whoever owns the service account. Ask your team to name an owner for each service credential and a documented renewal step. Re-run these tests after every app version change and after upgrading Shuffle, because the app container and the platform both handle credentials.
A saved credential is decrypted only inside the run, never sent to the workflow editor
The diagram starts when a workflow execution reaches an app action. The Shuffle backend holds the encrypted authentication in OpenSearch and uses the encryption secret to decrypt it, while Orborus starts the app container for that run. Check the boundary between the backend and the runtime, since the credential crosses it during the run, and confirm which component receives the decrypted value and which external API it is sent to.
Path of a saved credential from a workflow action to the external API.
Protecting credentials and the encryption secret
Saved app authentications are only as safe as the encryption secret, the people who can read them and the container that uses them. The cards below cover the controls that connect those pieces, from the AES-256 encryption Shuffle applies in OpenSearch to scoping, rotation, container access and audit.
AES-256 encryption of saved credentials
Shuffle encrypts saved app credentials and API keys in OpenSearch with AES-256, keyed by the SHUFFLE_ENCRYPTION_MODIFIER value. Stored OAuth2 client secrets, refresh tokens and bearer tokens therefore sit encrypted at rest in the database rather than in plain text. Check that your backups of OpenSearch are encrypted and access-controlled, because a copied database is only protected while the key stays separate from it.
The encryption modifier must never change
Losing or changing SHUFFLE_ENCRYPTION_MODIFIER breaks every saved app authentication, and the workflows that depend on them stop running until each one is re-entered. Set the value once during installation, store it in your secrets manager with a documented owner, and include it in every backup and restore runbook. Confirm with the vendor how a restored instance must be configured so the value matches the data it reads.
Least-privilege API scopes
Request the narrowest OAuth2 scopes the app needs for each action, and create a separate client for each integration instead of sharing one broad credential. Read-only enrichment actions should never hold write scopes on the same authentication. Review scope lists with the service owner before building, because scopes granted later are harder to trace back to a workflow.
Secret rotation planning
Plan rotation for client secrets, API keys and refresh-capable tokens before the first workflow goes live. Decide who rotates each credential, how long a rotated secret stays valid, and which workflows must be retested after the change. Rotation is a recurring task, so assign it to a named team and track it in the same system as other change records.
Access to the app container
Credentials are decrypted and passed into the app container at execution time, so anyone who can run commands in that container or inspect its environment can reach the secret. Restrict Docker host and container access to the platform operators who need it, and confirm which runtime locations hold app images. Review logs and debug output so tokens do not appear in execution results.
Audit of saved authentications
Record who can view, create, edit and delete saved authentications, and review that list on a schedule. Shuffle user roles and SSO mappings determine these permissions, so changes to them should go through the same review as the credentials themselves. Confirm which audit events the platform writes and where you forward them before relying on them for an investigation.
Reusing one authentication across workflows and tenants
On a Shuffle instance run by one security or platform team, the main questions are about ownership and change control rather than isolation between customers. One authentication saved for an app can be selected by any workflow the team builds, so the team should decide in advance which credentials are shared and which belong to a single playbook. Confirm how your installed version lists and selects saved authentications, and whether a workflow owner can edit the credential or only use it.
- Ownership: Name one person or group responsible for each saved authentication and for rotating its secret.
- Change control: Decide who may edit or replace a credential, since a change affects every workflow that uses it.
- Naming: Use names that show the target system and the purpose, so a reviewer can tell apart a read-only token from a write token.
- Access to the instance: Limit admin and workflow-edit roles to people who need them, because those roles can read or select saved credentials.
- Encryption key: Keep the
SHUFFLE_ENCRYPTION_MODIFIERvalue recorded in your secrets process, because changing it breaks every saved authentication.
Before reuse spreads, check the ownership record and the role list for each saved authentication against the people who should hold them.
A single saved authentication is useful when several playbooks call the same system, such as an EDR API or a ticketing system. The benefit is one place to rotate a secret. The risk is that a change or a revoked token stops every dependent workflow at once. Treat a shared authentication as a dependency with an owner, a list of consumers and a rotation procedure, and confirm the consumer list through the Shuffle interface or your own workflow inventory before rotating.
- Consumer inventory: Record which workflows and apps use each shared authentication so rotation can be planned.
- Scope of token: Give each shared credential the narrowest permissions the target API offers, since every workflow inherits them.
- Rotation window: Plan rotations for quiet periods and test one workflow with the new secret before changing others.
- Refresh behavior: Confirm how your custom app handles an expired access token and whether a refresh token is stored and encrypted with the other saved values.
- Test workflows: Run a test execution after each change to confirm that consumers still authenticate.
Ask the target system's administrator whether one credential can be scoped per workflow, and whether revoking it affects other integrations that share the same client.
When one Shuffle instance serves several customers or business units, a credential belonging to one customer must never be selectable or readable by another customer's team. Shuffle documents sub-tenants, shared credentials and workflows, per-tenant SSO and runtime locations for multi-tenant use. Before you rely on any of these, read the current multi-tenancy documentation for your version and test the boundary yourself with a non-production credential, because the docs define what is shared and what is isolated.
- Shared versus per-tenant: Decide which authentications are provider-level and which must exist only inside one customer's sub-tenant.
- Verification test: Log in as a user from one tenant and confirm they cannot list, select or run another tenant's authentication.
- Runtime placement: Confirm where each customer's executions run, since an Orborus location can determine where a credential is used.
- Who can change credentials: Restrict edit rights for shared authentications to the operator team, and keep customer admins to their own sub-tenant.
- Evidence: Keep dated test results and the role configuration so an auditor or customer can review the boundary.
Ask the vendor or your implementation partner to show, in a test environment, how a credential is scoped to a tenant before any customer data is connected.
Limits to confirm in your environment
The auth design in a custom Shuffle app depends on details that vary by installed version and by how your instance is run. Confirm these items against your own environment before you commit to a credential model, because each one changes what your team has to build and operate.
Confirm the Shuffle version first
Shuffle versions older than v2.1.1 stopped being supported after January 31, 2026, so an older install may not be a safe base for new app authentication work. Check the running version in your admin view and against the release list before reading any auth behavior off the docs. Pin the tag you test against and record it with the app, since the docs recommend the latest Docker tag for stable releases and the nightly tag only for experimental changes. Confirm the version before anything else.
Configuration docsAuth types the App Creator supports
The set of authentication types offered in the App Creator can differ between releases, so do not assume OAuth2, bearer and API key options all appear in your build. Open the authentication step of a test app on your installed version and list each type it offers. Note which ones you can configure fully in the UI and which need a hand-written Python app to handle the token exchange. Record the result in your design document.
Apps docsRefresh handling for each auth type
Refresh behavior is the part most likely to differ between auth types. Ask whether the platform refreshes an OAuth2 access token automatically, whether a bearer token must be replaced by a workflow step, and whether an API key ever expires. Test each type with a token lifetime short enough to force a refresh during a run, then check that a long-running workflow still completes. Document who owns rotation when the upstream vendor changes its policy.
Encryption modifier backup
Saved app credentials and API keys are encrypted in OpenSearch with AES-256 using the SHUFFLE_ENCRYPTION_MODIFIER secret. The docs warn that losing or changing this value breaks every saved app authentication. Confirm where the value is stored, who can read it, and that a copy is kept in your secrets system with a tested restore path. Include it in the same backup rotation as OpenSearch, because a database restore without the matching modifier leaves credentials unreadable.
Configuration docsAuthentication survival across app versions
Confirm whether a saved authentication stays attached to a workflow when the underlying app gets a new version. Create an authentication, use it in a workflow, publish a new app version with a changed action, and rerun the workflow. Also test an app reload, since hot loading can change what the runtime sees. Record the result for each auth type, because a version change that drops the link forces every workflow to be reconfigured by hand.
Reuse across workflows and tenants
Check whether one saved authentication can be selected from several workflows and whether its access is limited to the owning user or organization. If you run more than one tenant or business unit, confirm that credentials from one tenant cannot be read or used by another. Run a negative test with a second account to prove the boundary. Note that the open-source and paid editions can differ in limits, so verify this on the edition you deploy.
Open source articleQuestions teams ask before building OAuth2 app authentication
How much effort does a custom app with OAuth2 authentication take?
Effort depends mostly on how many endpoints the app exposes, how many distinct auth methods the target API uses, and how much of the token lifecycle you need to automate. A single API key header is a small task. OAuth2 with authorization code or client credentials, refresh handling, scope mapping and a test tenant adds design, build and test work on top of the actions themselves. No duration or price is given here because it depends on the target API. Ask any partner or internal lead to break the estimate into authentication setup, action build, refresh and error handling, and testing against real credentials.
Can our own team build OAuth2 authentication for a Shuffle app in-house?
Yes, if at least one engineer understands OAuth2 grant types, token expiry and secret storage, and can read the target vendor's documentation carefully. Shuffle stores saved app credentials and API keys encrypted in OpenSearch with AES-256 using the SHUFFLE_ENCRYPTION_MODIFIER secret, so your team also needs a plan for that secret's custody and rotation. The common gaps are refresh token edge cases, revoked consent, and tokens that expire during a long workflow run. Teams without this experience usually benefit from a short review of the design before the build.
What do we need to provide for an authenticated app build?
Plan to provide the following before work starts:
- API documentation or an OpenAPI definition for the endpoints the workflows will call
- A dedicated test account or service principal with the least permissions the workflows need
- A written policy for where client secrets and refresh tokens may be stored and who can read them
- A place to register the OAuth2 client, with the redirect or callback settings the vendor requires
- Access to a non-production Shuffle instance where the app can be loaded and tested
Why does the timeline depend on the target API and review cycles?
Timelines hinge on vendor-side steps you do not control: registering OAuth2 clients, approving scopes, issuing test credentials, and getting security reviewers to sign off on how secrets are stored. Each approval can add waiting time that no build effort shortens. Ask for the list of approvals each step needs and who owns it. Confirm the API's token lifetime, refresh behavior and rate limits early, because these change how the app must be tested before anyone can estimate the rest of the work.
What goes wrong with tokens once a custom app is in production?
The most frequent failures are expired access tokens during long executions, refresh tokens revoked by an administrator, and a secret rotated in one place but not in the Shuffle app configuration. Changing or losing SHUFFLE_ENCRYPTION_MODIFIER breaks every saved app authentication, so treat it as a controlled secret with a documented recovery path. Ask your partner or internal team to show how a failed refresh surfaces in execution results and who gets alerted.
Is a partner worth the cost for authenticated app work?
A partner is worth considering when the target API has complex grant flows, your security team requires documented secret handling, or your internal team is short on time. Ask for a quote built from a written scope that names the auth methods, the actions, the test plan and the handover. Ask what is one-time, such as the initial build and review, and what recurs, such as updates when the vendor changes its API or when credentials rotate. DeployOpen plans and builds fixed-scope engagements, and ongoing support is available as a retainer.
Should we reuse one authentication across many workflows?
Yes, when the workflows call the same API with the same identity and permissions. Defining authentication once in a Shuffle app and reusing it keeps credentials in one encrypted location and makes rotation simpler. Reuse becomes a risk when workflows need different permission levels, because one shared identity then carries the broadest access. Map each workflow to the smallest identity it needs, and confirm with your security team how that mapping is reviewed.
What DeployOpen delivers for authenticated custom apps
DeployOpen's work on authenticated custom apps starts with scoping the target API's authentication model before any code or app definition is written. That means identifying which grant type the API uses, how access tokens expire, whether refresh tokens are issued and rotated, which scopes each workflow needs, and whether the vendor limits concurrent sessions. The output is a written authentication design that names each credential, its owner, its lifetime and the failure behavior expected from the API. Whether the app is built in the App Creator or written in Python, DeployOpen builds or reviews the authentication block so it matches that design, rather than copying defaults from an example app.
The second part of the work covers storage and secret handling. DeployOpen confirms that the self-hosted Shuffle instance encrypts saved app credentials and API keys in OpenSearch using the SHUFFLE_ENCRYPTION_MODIFIER secret, and that this value is generated, stored and backed up under your existing secrets process. Because losing or changing that value breaks every saved app authentication, the runbook covers who holds it, how it is rotated safely, and how it is restored. DeployOpen also reviews where credentials appear in logs, workflow variables and exported workflow files, and documents the controls that keep them out of those places.
The third part tests the paths that fail in production: token expiry during a running execution, refresh failures, revoked credentials, rate limiting and a changed scope on the vendor side. Each failure is exercised in a test environment and the expected workflow behavior is recorded. DeployOpen then documents how one authentication is reused across several workflows, including ownership, change control and how to tell which workflows break when a credential is rotated. Scope, deliverables and timelines are agreed in writing before work starts, and the agreed document lists which vendor-specific behaviors your team must confirm with the API owner.
How DeployOpen scopes and supports Shuffle app authentication
DeployOpen approaches OAuth2 and token handling in custom Shuffle apps as a fixed-scope piece of work: the authentication model is agreed in writing, built into the app, tested against the target API, and documented for your team. DeployOpen plans, implements, tests, documents and supports self-hosted open-source platforms inside your own infrastructure.
How we scope
- Inventory every target API, its auth method, token lifetime and refresh behavior before any build starts
- Agree in writing which apps, workflows and environments the authentication design covers
- Record where the Shuffle encryption key is stored, who holds it and how it is backed up
- Confirm with your identity team which OAuth2 grant types and client registrations are permitted
How we build
- Configure OAuth2, bearer or API key authentication in the App Creator or Python app, as the scope specifies
- Implement refresh handling so expired tokens are renewed without manual steps in workflows
- Keep client secrets and tokens inside Shuffle's encrypted credential storage, never in app code
- Reuse one authentication definition across workflows and document which workflows depend on it
How we hand over
- Deliver a written configuration record listing each app, auth method, scopes and rotation steps
- Provide test workflows and results showing successful authentication, refresh and failure paths
- Document the procedure for rotating client secrets and changing the encryption modifier safely
- Train your administrators on updating credentials without breaking saved app authentications
How we support
- Ongoing support, upgrades and continuous testing are available as retainers after handover
- Retest authentication flows after Shuffle upgrades, identity provider changes or API version changes
- Review token handling again when a new app or workflow reuses an existing authentication
- Scope retainers in writing so response expectations and included testing are clear before work starts

