Skip to main content
An Access Policy grants apps, and optionally specific entitlements on them, to every identity that matches its condition. Each app on a policy can also be pre-approved, so requests the policy creates for the app and its listed entitlements skip approval.
The Access Policy object

Attributes

Each item in apps: A write body that includes label on an app or entitlement returns 400.

Grants

Each grant is an entitlement ID in apps[].entitlements[].id. It’s the same ID that Get Entitlement takes. To grant access to the app itself rather than to specific entitlements, omit entitlements or send an empty list. Migrate Access Policies covers moving existing grants to entitlement IDs. A policy needs at least one app, and an empty apps list returns 400. When you create or update a policy, Lumos checks every ID in apps: The 400 message calls grants “permissions”.

Drafts, publishing, and enabling

A policy grants access only while it’s both published and enabled.
  • Create returns 201 with the new policy. It makes a draft unless you send "status": "published", and it leaves the policy disabled unless you send "is_enabled": true. A draft can’t be enabled, so on create, "is_enabled": true returns 400 unless you also send "status": "published".
  • Publish a draft by sending "status": "published" on Update Access Policy. You can’t return a published policy to draft. Sending "status": "draft" for a published policy returns 400.
  • Approval. When your organization requires approval before publishing, creating a policy with "status": "published" returns 400, and so does publishing a draft whose changes aren’t approved. Create a draft and submit it for approval in the Lumos UI.
  • Update a published policy with PUT, which replaces every field, or with PATCH, where a field you omit keeps its value and no field can be null. The update takes effect immediately. If the policy also has a draft version saved in Lumos, either call returns 400 with “Access policy already has a draft version.”
  • Read returns the published version when there is one, and the draft version otherwise.
  • Delete removes the policy and the pre-approval it gave its apps, and returns 204.
status takes only draft or published, so an uppercase value such as PUBLISHED returns 400. Updating or deleting a policy doesn’t remove access that identities already received through it. When an identity stops matching a policy, Lumos removes the access that the policy granted only if your organization has enabled Auto Run in its Movers settings. Even then, Lumos keeps access that the identity requested through the AppStore.

Conditions

Send access_condition with the condition that identities must match, or send "is_everyone_condition": true to apply the policy to everyone. Sending both returns 400 on every write. The exception is the everyone condition that a read returns: Lumos reads it as "is_everyone_condition": true, so you can send a read’s access_condition back as is. Lumos checks the condition when you save it. What Lumos rejects lists what returns 400. Reads set is_everyone_condition to true only for this exact condition, label included. Any other condition that matches every identity reads back as is_everyone_condition: false. Conditions documents the format, and the stored form that a read returns. Two published policies can’t have the same condition. If creating, publishing, or updating a policy would give a published policy the same condition as another published policy, the call returns 400 with “An access policy with these conditions already exists.” Drafts can share a condition.

Who can do what

The built-in roles can do the following: A custom role can also allow these actions. On a PUT or PATCH, Lumos checks permission for each changed field on its own, so an owner can update a draft’s apps, but gets 403 for a change to its name, justification, or condition. A call you aren’t allowed to make returns 403.

Owners

List Access Policies and Get Access Policy add each policy’s owners when you send one of these expand values: With expand=owners.users, a policy’s owners look like this:
The group is {id} because only owners.users was sent. To get full users and full groups, send both, such as expand=owners.users,owners.groups. Without an owners expand, the response has no owners. A user that List Users treats as deleted isn’t listed. Any owners expand needs permission to call both List Users and List Groups. Without both, the call returns 403.
Lumos enables owners per organization. Until it’s enabled for yours, an owners expand returns 400. To enable it, contact your Lumos representative.

Listing

List Access Policies returns the policies you can read, newest first. name limits the list to policies whose name contains that text, ignoring case. A page can be empty while later pages still hold policies, as Short and empty pages describes.

Endpoints