Sharing Secrets with Secret Share

This feature is currently available only to customers participating in a Private Preview. If you'd like to participate and be among the first to try this feature, ask our support or account team for details.

Secret Share hands a single value, such as an initial password or a recovery code, to someone without pasting it into chat or email. You create a share and get back a token. The recipient uses the token to redeem the value. A share expires after a set time and can be redeemed only a limited number of times, once by default.

To redeem a share, the recipient must be signed in to the same Delinea Platform tenant as the person who created it. Shares can't be redeemed anonymously or from another tenant, and there's no web link to open. You send the recipient the token itself.

Creating a Share

Read the value and the passphrase into variables so that they don't end up in your shell history:

Copy
read -rs VALUE
read -rs PASSPHRASE
delinea --json workload crypto share create --plaintext="$VALUE" --passphrase="$PASSPHRASE" \
  --ttl-seconds 3600 --max-views 1

The values of --plaintext and --passphrase are still visible to other processes on the same computer while the command runs, so on a shared computer, create the share through the API.

Copy
{
  "token": "rZr2l1m1QpY0x7n4nGJ1bVg3o8TQd8m0x1vC7mXq5hE",
  "shareId": "9b1d0a3c6f8e2b47d5a19c0e3f6b8d2a7c4e1f0b9a8d7c6e5f4a3b2c1d0e9f8a",
  "expiresAt": "2026-11-05T19:12:03.441Z"
}
Field Description
plaintext Required. The value to share, as text, up to 64 KiB. The limit counts the value's bytes in UTF-8, so a character outside ASCII counts as more than one byte.
ttlSeconds How long the share lasts, in seconds. The minimum is 1, the default is 86400 (24 hours), and the maximum is 604800 (7 days).
maxViews How many times the share can be redeemed, from 1 to 10. The default is 1.
passphrase Optional. 8 to 1,024 characters that the recipient must also provide. To create a share without a passphrase, leave the field out; an empty string isn't accepted.

The response contains:

  • token: what the recipient needs to redeem the share. It's returned only this once. Keep a copy if you want to check the share's status later.

  • shareId: what you need to revoke the share.

  • expiresAt: when the share expires.

Send the token to the recipient, and send the passphrase through a different channel.

Don't retry a create request automatically. Each request makes a new share, so if the first attempt reached the service, a retry makes a second share.

Redeeming a Share

The recipient signs in to the tenant and runs:

Copy
delinea --json workload crypto share unwrap --token='<token>' --passphrase='<passphrase>' | jq -r '.plaintext'

Join the token to --token with =, as shown. A token can start with --, and the CLI would otherwise read it as a flag.

  • Each successful redemption uses one view. When no views are left, the share can't be redeemed again.

  • A wrong or missing passphrase doesn't use a view. After five wrong or missing passphrases, the share can't be redeemed at all.

  • Every failed redemption returns the same 410 response with the error code secret_share_gone, whether the token is wrong, the share expired, was already redeemed or revoked, or the passphrase was wrong. This keeps the response from revealing anything about the share.

  • A missing or empty token, a token longer than 512 characters, or a passphrase longer than 1,024 characters returns 400 with the error code request_validation_failed, not 410.

Checking a Share

Anyone with the token can check a share's status without using a view or seeing the value:

Copy
delinea --json workload crypto share get --token='<token>'
Copy
{
  "consumed": false,
  "viewsRemaining": 1,
  "expiresAt": "2026-11-05T19:12:03.441Z"
}
  • Use this as a tripwire. If the share shows consumed: true before your recipient says they've redeemed it, someone else redeemed it. Change the shared value. If the share allows more than one view, consumed turns true only after the last view, so watch viewsRemaining instead.

  • consumed is also true after the share is revoked or after five wrong passphrases.

  • An expired share that nobody redeemed still shows consumed: false. Compare expiresAt with the current time.

  • An unknown token returns 410.

Revoking a Share

To stop a share from being redeemed, revoke it with its share ID:

Copy
delinea workload crypto share delete <share-id>

Only the identity that created a share can revoke it. For anyone else, the request returns 404, as it does for a share that doesn't exist. Revoking a share that's already been redeemed succeeds and has no effect. There's no command to list your shares, so keep the share ID.

How Shares Are Protected

  • Each share has its own data key, which encrypts the shared value.

  • The token is never stored. Only a hash of it is kept.

  • A passphrase is stored only as a salted, slow hash.

Permissions and Policy Actions

Operation Permission Policy action and target
Create a share Create Secret Share (delinea.workloadsecrets/secretshare/create) share on secretshare/
Revoke a share Delete Secret Share (delinea.workloadsecrets/secretshare/delete) revoke on secretshare/*
Redeem or check a share None None. The caller must be signed in to the tenant and hold the token.

A share token works like a password: any signed-in identity in the tenant that has the token, and the passphrase if there is one, can redeem the share. Shares aren't tied to a named recipient. Use a passphrase, a short lifetime, and one view for sensitive values.

REST API Reference

Paths are relative to https://<your-tenant>/workload-secrets/api/v1/.

Operation Request CLI (delinea workload crypto share ...)
Create POST crypto/share create --plaintext <text> [--passphrase <text>] [--ttl-seconds <n>] [--max-views <n>]
Check status POST crypto/share/lookup with {"token"} get --token <token>
Redeem POST crypto/share/unwrap with {"token", "passphrase"} unwrap --token <token> [--passphrase <text>]
Revoke DELETE crypto/share/{shareId} delete <share-id>

An invalid ttlSeconds, maxViews, passphrase, or plaintext size returns 400 with the error code secret_share_invalid_argument or request_validation_failed.