Workload Secrets Vault Policies

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.

A Workload Secrets Vault policy is a JSON document that allows or denies actions for a set of subjects on a set of targets. Policies work together with Delinea Platform permissions. For how the two fit together, see Controlling Access to Workload Secrets Vault.

Here's a policy that lets one group read and list the secrets under payments/prod during working hours:

Copy
{
  "name": "payments-prod-read",
  "description": "Payments operators can read production secrets during working hours",
  "status": "enabled",
  "effect": "allow",
  "actions": ["read", "list"],
  "subjects": ["group:3f6c2b8e-1d4a-4f7b-9a51-2c8e7d0b4a19"],
  "targets": ["secret/payments/prod/*"],
  "conditions": [
    { "type": "timeRange", "data": { "startTimeInMinutes": 480, "endTimeInMinutes": 1080 } }
  ]
}

Policy Fields

Field Required Description
name Yes Up to 256 characters. Names don't have to be unique, so choose names you can tell apart.
description No Free text.
status No enabled or disabled. The default is enabled. A disabled policy has no effect. The API reference lists status as required, and the CLI requires --status, so always send it.
effect Yes allow or deny.
actions Yes One or more actions. See Actions.
subjects Yes The users, service users, and groups the policy applies to. See Subjects.
targets Yes The secrets, keys, shares, and leases the policy applies to. See Targets.
conditions No Restrictions on time, date, day of the week, or client IP address. See Conditions.

The service assigns each policy an id when you create it. An id in the body of an update is ignored. Other fields that aren't in this table are rejected, and so are unknown values in status, effect, actions, and condition types. Values are case-insensitive.

How Policies Are Evaluated

A policy applies to a request when all of the following are true:

  • The policy is enabled.

  • The requested action is in actions.

  • The caller matches one of the subjects.

  • The secret, key, share, or lease matches one of the targets.

  • Every condition holds.

The request is allowed when at least one applicable policy allows it and no applicable policy denies it. If no policy applies, the request is denied. Subjects, targets, and actions are compared without regard to case.

Actions

Use the actions that apply to the target's resource type. A policy that names an action on the wrong resource type is accepted but never applies.

Resource type Actions
Secrets
  • create: create a secret or write a new version
  • read: read or describe a secret, or mint a credential from a dynamic secret
  • list: list the secret names under a path. Without list, listing a path still returns the sub-paths that lead to the caller's read, list, or create grants.
  • update: roll back a secret
  • delete: soft-delete versions
  • restore: restore deleted versions
  • destroy: destroy versions or purge a secret
Leases list to list a dynamic secret's leases, read to look up a lease, revoke to revoke a lease before it expires. See Leases and Revocation.
Service-managed keys create, read, delete, restore, encrypt, decrypt, rotate, rewrap
Your own keys (BYOK) The same actions as service-managed keys, plus update to Replacing Key Material with a newly imported key, and read-wrapping-key to get the wrapping key for importing keys
Secret shares share to create shares, revoke to revoke them
Your own CA Secret actions on the paths where the CA and its certificates are stored. See Signing with Your Own CA.

Subjects

Subject Matches
user:<user-id> One user or service user.
group:<group-id> Every member of the group, including members of nested groups.
user:* Every user and service user in the tenant.
upn:<login-name> The user with that login name. It's looked up when you save the policy and stored as user:<user-id>. Exactly one user must match.
email:<address> The user with that email address. It's looked up and stored the same way as upn:.

There's no subject form for roles, and no wildcard for groups. To grant access to everyone who holds a role, assign the role to a group and name the group. For how to find IDs, see Finding User and Group IDs.

The service doesn't check that the ID in a user: or group: subject exists. A group name in place of a group ID, or a mistyped ID, saves without an error but never matches anyone. Requests that such a subject should allow get 403, and requests that it should deny aren't denied. group:* is also accepted but never matches anyone; user:* is the only wildcard that works.

Targets

Write a target as a resource type and a path. Don't include the tenant: the service adds it for you.

Resource Target Notes
Secrets secret/<path> Also covers dynamic secrets and the secrets that hold your own CA.
Leases lease/<dynamic-secret-path>/<lease-id> list is checked on lease/<dynamic-secret-path>/, with the trailing slash. A target such as lease/<dynamic-secret-path>/* covers listing, looking up, and revoking that dynamic secret's leases. See Leases and Revocation.
Service-managed keys cryptokey/<path> Doesn't cover BYOK keys at the same path.
Your own keys (BYOK) manualcryptokey/<path>
manualcryptokey/_wrapping-key
Grant read-wrapping-key on the exact target manualcryptokey/_wrapping-key.
Secret shares secretshare/
secretshare/*
Grant share on secretshare/, with the trailing slash, to allow creating shares. Grant revoke on secretshare/* to allow revoking them.

Policies for managed CAs and for policy administration aren't possible. Those operations are controlled by permissions only.

Wildcards

  • A * at the end of a target matches everything that starts with the text before it. secret/payments/* matches secret/payments/prod/orders-db.

  • A wildcard target doesn't match the path it's under. secret/payments/* doesn't match secret/payments, so add the exact target too only if a secret is stored at payments itself.

  • A wildcard target does cover listing the path it's under. The service checks list on the path with a trailing slash, as secret/payments/, so secret/payments/* allows secret list payments with or without the slash.

  • Always put a / before the *. Because matching is by prefix, secret/payments* also matches secret/payments-archive/....

  • A * anywhere but the end is treated as a literal character.

  • secret/* matches every secret in the tenant.

Conditions

Conditions narrow when a policy applies. Each condition has a type and a data object. A policy can have at most one condition of each type, and all its conditions must hold.

Type Data
timeRange startTimeInMinutes and endTimeInMinutes: whole numbers from 0 to 1439, counted in minutes after midnight UTC. If the end is before the start, the range wraps past midnight.
dateRange startDate and endDate: RFC 3339 timestamps, such as 2026-12-01T00:00:00Z. The end can't be before the start.
daysOfTheWeek daysOfTheWeek: a list of day names, monday through sunday.
ipRange cidrs: 1 to 50 IPv4 or IPv6 ranges in CIDR notation, such as 203.0.113.0/24. Each range must start at its network address, with all host bits zero: 10.0.0.0/8 is accepted, but 10.0.0.1/8 is rejected.
  • The time-based types also accept toleranceInSeconds (0 to 86400) to allow for clock differences.

  • All times are UTC. Local time zones aren't supported.

  • An ipRange condition checks the public IP address that the request comes from, as the Delinea Platform sees it. If the address can't be determined, an allow policy with an IP condition doesn't apply, and a deny policy with an IP condition still applies.

This policy lets a service user read production secrets only when its requests come from the build network:

Copy
{
  "name": "ci-prod-read-from-build-network",
  "effect": "allow",
  "actions": ["read"],
  "subjects": ["upn:ci-runner@example.com"],
  "targets": ["secret/payments/prod/*"],
  "conditions": [
    { "type": "ipRange", "data": { "cidrs": ["203.0.113.0/24", "2001:db8:42::/48"] } }
  ]
}

Conditions can't express "not in this range." To limit where an identity can work from, put the ipRange condition on the policies that allow it access, and don't give it other allow policies without the condition.

Managing Policies

You need the Authorization Policy permissions to manage policies. All commands start with delinea workload.

Task CLI REST API
List policies policy list GET policies
Read a policy policy get <id> GET policies/{id}
Create a policy policy create with a flag for each field POST policies
Change a policy policy update <id> with a flag for each field PUT policies/{id}
Delete a policy policy delete <id> DELETE policies/{id}

In the CLI, pass each policy field as a flag with the same name, such as --name and --effect. --actions, --subjects, --targets, and --conditions take JSON arrays. For example, this command creates the policy shown at the top of this topic:

Copy
delinea --json workload policy create \
  --name payments-prod-read \
  --description "Payments operators can read production secrets during working hours" \
  --status enabled \
  --effect allow \
  --actions '["read", "list"]' \
  --subjects '["group:3f6c2b8e-1d4a-4f7b-9a51-2c8e7d0b4a19"]' \
  --targets '["secret/payments/prod/*"]' \
  --conditions '[{"type": "timeRange", "data": {"startTimeInMinutes": 480, "endTimeInMinutes": 1080}}]'
  • Commands and requests use the policy ID. To find it, run policy list. There's no lookup by name, and the list isn't paged.

  • An update replaces the whole policy. Always send the complete document: get the policy, edit it, and send it back. A field you leave out goes back to its default. For example, an update without status enables a disabled policy, and an update without conditions removes the conditions.

  • Responses show subjects and targets in their full form, which includes your tenant ID. For example, secret/payments/* comes back as drn:dws:<tenant-id>:workloadsecrets:secret/payments/*, and a upn: subject comes back as drn:dws:<tenant-id>:identity:user:<user-id>. You can send either form.

  • In the API, GET policies/{id} returns an ETag header. Send it back in an If-Match header on PUT or DELETE to make sure nobody changed the policy in the meantime. If someone did, the request fails with 412. A successful PUT returns the policy's new ETag. The CLI doesn't send If-Match.

Policy Errors

Status Error code Cause
400 policy_invalid A field is missing or invalid, or a upn: or email: subject doesn't match exactly one user. The detail field explains the problem.
400 request_validation_failed The JSON is malformed, or it has an unknown field or value.
404 policy_not_found No policy has that ID.
412 policy_precondition_failed The If-Match value doesn't match the policy's current ETag.

Examples

Deny One Branch Inside a Broader Allow

If a pipeline can read everything under apps/, this policy keeps it out of the payroll secrets. The deny wins over the allow.

Copy
{
  "name": "ci-no-payroll",
  "effect": "deny",
  "actions": ["read", "list", "create", "update", "delete"],
  "subjects": ["upn:ci-runner@example.com"],
  "targets": ["secret/apps/payroll", "secret/apps/payroll/*"]
}

Write Without Read

A rotation job can write new versions of a secret without being able to read it:

Copy
{
  "name": "orders-db-rotator",
  "effect": "allow",
  "actions": ["create", "update"],
  "subjects": ["upn:db-rotator@example.com"],
  "targets": ["secret/payments/prod/orders-db"]
}

Encrypt in One Job, Decrypt in Another

Split encryption and decryption between two service users so that the build can't read what it encrypts:

Copy
{ "name": "deploy-config-encrypt", "effect": "allow", "actions": ["encrypt"],
  "subjects": ["upn:build@example.com"], "targets": ["cryptokey/payments/deploy-config"] }

{ "name": "deploy-config-decrypt", "effect": "allow", "actions": ["decrypt"],
  "subjects": ["upn:deploy@example.com"], "targets": ["cryptokey/payments/deploy-config"] }