Skip to content
LogoLogo

Set up shared sign-in and access

An integrated scheduler uses the Users instance you select for sign-in and the Permissions instance you select for browser access decisions. No one receives a scheduler role automatically. Set up the first scheduler administrator through Permissions after the service is deployed.

Before you start

You need a deployment with Users and Permissions, an administrator who can change its service settings, and a deployment access administrator who can create and assign Permissions roles. Run the commands from the project connected to that deployment. Use saaslayer status --env dev to find the actual service instance references; the examples below use @internal and @mail as placeholders.

The selected Users instance must support browser sign-in. If you plan to use the separately hosted scheduler console, its URL must be able to occupy that Users instance's AdditionalAppUrl slot. The deployer refuses an occupied slot before creating the console.

1. Enable the Scheduling permission vocabulary

When adding Scheduling to an existing deployment, enable the extension on the selected Permissions instance and wait for the update to finish:

saaslayer deployment settings set --env dev --set permissions-service@internal.EnableSchedulingExtension=true

This registers the saaslayer:scheduling:instance resource type and its actions. A new deployment that creates Users, Permissions and Scheduling together enables the extension in its create plan.

2. Add the scheduler with explicit bindings

saaslayer deployment service add scheduling-service@mail --env dev \
  --set scheduling-service.BrowserAuthMode=saaslayer \
  --set scheduling-service.AdminEmails=owner@example.com \
  --bind scheduling-service@mail:user-service=user-service@internal \
  --bind scheduling-service@mail:permissions-service=permissions-service@internal

Replace the instance names with those from saaslayer status, and replace owner@example.com with the deployment's designated admin email. The managed setup checks that this email appears in AdminEmails; an empty list makes the seed fail. If two matching Users or Permissions instances exist, --bind selects the exact one. The deployer refuses a missing, ambiguous or incompatible binding before writing a stack.

To add the optional console, bind it to that scheduler:

saaslayer deployment service add scheduling-console@ops --env dev \
  --bind scheduling-console@ops:scheduling-service=scheduling-service@mail

After the console has a URL, the deployer registers that URL with the selected Users instance in a managed follow-up update. Wait until the deployment is active before signing in. A temporary DEPLOYED_UNVERIFIED status means the follow-up or another verification step has not finished.

3. Grant the first scheduler administrator

An existing deployment access administrator signs in through Users, creates an exact-resource role in Permissions, then assigns it to the intended Users principal. Use the scheduler deployment ID, instance, AWS region and the verified user's organization ID to build the resource:

xrn:saaslayer:scheduling:us-east-1:org_abc:instance/dep_123.mail

For this example, create an administrator role through the selected Permissions API. Replace the example IDs and use an ID token for an administrator who may create these grants:

POST /roles
Authorization: Bearer DEPLOYMENT_ADMIN_ID_TOKEN
Content-Type: application/json
 
{
  "id": "scheduler-dep_123-mail-admin",
  "permissions": [
    { "effect": "can", "service": "scheduling", "resource": "xrn:saaslayer:scheduling:us-east-1:org_abc:instance/dep_123.mail", "action": "jobs-read" },
    { "effect": "can", "service": "scheduling", "resource": "xrn:saaslayer:scheduling:us-east-1:org_abc:instance/dep_123.mail", "action": "jobs-write" },
    { "effect": "can", "service": "scheduling", "resource": "xrn:saaslayer:scheduling:us-east-1:org_abc:instance/dep_123.mail", "action": "jobs-review" },
    { "effect": "can", "service": "scheduling", "resource": "xrn:saaslayer:scheduling:us-east-1:org_abc:instance/dep_123.mail", "action": "jobs-activate" },
    { "effect": "can", "service": "scheduling", "resource": "xrn:saaslayer:scheduling:us-east-1:org_abc:instance/dep_123.mail", "action": "jobs-cancel" },
    { "effect": "can", "service": "scheduling", "resource": "xrn:saaslayer:scheduling:us-east-1:org_abc:instance/dep_123.mail", "action": "actions-read" },
    { "effect": "can", "service": "scheduling", "resource": "xrn:saaslayer:scheduling:us-east-1:org_abc:instance/dep_123.mail", "action": "actions-manage" },
    { "effect": "can", "service": "scheduling", "resource": "xrn:saaslayer:scheduling:us-east-1:org_abc:instance/dep_123.mail", "action": "access-manage" },
    { "effect": "can", "service": "scheduling", "resource": "xrn:saaslayer:scheduling:us-east-1:org_abc:instance/dep_123.mail", "action": "occurrences-reconcile" }
  ]
}

Assign the role to the intended Users principal at the organization scope:

POST /users/USER_ID/roles
Authorization: Bearer DEPLOYMENT_ADMIN_ID_TOKEN
Content-Type: application/json
 
{ "roleId": "scheduler-dep_123-mail-admin", "scope": "org_abc" }

USER_ID is the verified Users custom:suid, not the Cognito sub or an email address. A role scoped to this XRN does not authorize a second scheduler instance. Create narrower viewer or operator roles by granting only the actions those people need. See Model your authorization and Access admins for role administration.

4. Verify access

Sign in to the scheduler console with the selected Users account. The first administrator should see job and action management controls. A user without an exact-instance grant receives 403; an unavailable Users or Permissions authority returns retryable 503. Changes to Permissions take effect on the next scheduler request. For enterprise SSO users, the selected Users instance must have an active SSO connection and session; an expired or removed session is refused.