Skip to content

Require a second factor for administrative changes

Step-up makes an administrative role apply only to a sign-in that proved a second factor. A role binding carries a step-up condition, and the binding admits a person only when the acr claim of their token is a multi-factor level. A person who signed in with a password alone keeps their account and their own devices, and is asked to sign in again with a second factor at the moment they administer something.

This page covers the bindings in a tenant’s administration audience: which of them must carry the condition, how each tool asks for the second factor, and how an administrator sets one up.

  • Home administration turned on for the tenant. Turning it on creates the administration audience and its step-up condition. See Let your directory administer your tenant.
  • Identity server 1.97.0 or later for the write-time rule on Guard’s administrative roles.
  • Guard control plane 0.32.0 or later and console 0.55.0 or later for the changes that ask for a second factor when you make them.
  • awctl 0.45.1 or later for awctl auth login --acr-values.
  • Terraform provider 0.36.0 or later for step_up_condition_id on authwise_tenant_home_administration.
  • A second factor available in the realm your administrators sign in to. See Set up a second factor.

The administration audience of a tenant holds one step-up condition, named administration.stepUp. It admits a token whose acr claim is one of these values:

  • urn:authwise:acr:2
  • phr
  • phrh

A binding that carries the condition grants its role only to such a token. For a token below that level, the binding doesn’t apply, and the call is refused as if the person held no role.

The acr claim is the sign-in’s own. A request can’t claim a higher level than the sign-in proved.

Guard adds a second check on a short list of changes. Those changes refuse a person’s sign-in that has no second factor, whatever the binding says. For the list, see Changes that need a second factor.

In a tenant’s administration audience, the identity server checks every binding of a Guard administrative role when the binding is created or changed. The check applies to every writer: the console, awctl, Terraform, and Guard’s own API.

RoleWhere you bind itA user or a groupA service account
guardcontrol.tenantAdminThe tenant only: guardcontrol.tenant/TENANT_IDMust carry the tenant’s step-up conditionNo condition
guardcontrol.networkAdminOne network only: guardcontrol.network/NETWORK_IDMust carry the tenant’s step-up conditionNo condition
guardcontrol.viewerThe tenant or one networkNo condition, or the tenant’s step-up conditionNo condition

A binding that doesn’t fit is refused with INVALID_ARGUMENT, and the message names the anchor or the condition to use. A binding of guardcontrol.tenantAdmin or guardcontrol.networkAdmin to a person is also refused while the tenant has no step-up condition.

The rule is checked only when a binding is written. A binding that was written before the rule keeps working until you save it again.

The roles administration.admin, administration.identity, and administration.viewer take no condition or the same step-up condition. See Require multi-factor sign-in.

To grant a role from Guard’s own page, follow these steps:

  1. In the console, go to Guard’s People page.
  2. Under Roles, find Grant a role.
  3. Select the role: Tenant administrator, Network administrator, or Viewer.
  4. For a network administrator, select the network in Network. For a viewer, select The whole tenant or a network in Where.
  5. Select a person or a group.
  6. Click Grant, followed by the role’s name, for example Grant Tenant administrator.

Guard writes the binding with its anchor and, for an administrator, the step-up condition.

The Grant access dialog on the tenant’s Access page applies the same rule in its Condition field:

BindingWhat Condition offers
A person as tenant administrator or network administratorStep-up (second factor), fixed
A person as viewerNo condition or Step-up (second factor)
A service accountNo condition

If the tenant has no step-up condition, the field says so and the role can’t be granted to a person. Turn home administration on again for the tenant, and then grant the role.

Terminal window
awctl guard people grant-role --role tenantAdmin \
--subject-type group --subject-id GROUP_ID --tenant-id TENANT_ID
awctl guard people grant-role --role networkAdmin --network-id NETWORK_ID \
--subject-type user --subject-id USER_ID --tenant-id TENANT_ID
awctl guard people list-role-grants --tenant-id TENANT_ID

Replace GROUP_ID with the group’s ID (g-…), USER_ID with the user’s ID (u-…), TENANT_ID with the tenant, and NETWORK_ID with the network’s ID or short name.

--role takes tenantAdmin, networkAdmin, viewer, or the full guardcontrol.… name. tenantAdmin and networkAdmin carry the administration audience’s step-up condition. A role at the wrong kind of target is refused before anything is written.

The step-up condition’s ID is the step_up_condition_id attribute of authwise_tenant_home_administration. Pass it as the condition_id of the authwise_access_binding:

resource "authwise_access_binding" "guard_admin" {
issuer_id = authwise_tenant_home_administration.this.issuer_id
audience_id = authwise_tenant_home_administration.this.audience_id
subject_type = "user"
subject_id = "USER_ID"
role_name = "guardcontrol.tenantAdmin"
resource_type = "guardcontrol.tenant"
resource_id = authwise_tenant_home_administration.this.tenant_id
condition_id = authwise_tenant_home_administration.this.step_up_condition_id
}

Replace USER_ID with the user’s ID (u-…).

For guardcontrol.networkAdmin, set resource_type to guardcontrol.network and resource_id to the network’s ID (n-…). guardcontrol.viewer takes either anchor, with or without condition_id.

step_up_condition_id is null for a tenant that has no step-up condition. The identity server then refuses the binding and says how to create the condition.

For a service account, set subject_type = "client" and leave condition_id out.

Sign in with a second factor in the console

Section titled “Sign in with a second factor in the console”

The console asks for the second factor only when you need it.

When you open Guard’s administration with a role that carries the step-up condition, and your sign-in has no second factor, the page shows Sign in again with a second factor in place of the administrative view. Click Sign in again. After the sign-in, the console returns you to the same page.

When you make one of the changes that need a second factor, the console asks before it sends the change:

  1. Start the change, for example revoking a trusted issuer. The console opens the Sign in again with a second factor dialog.
  2. Click Sign in again, and complete your second factor at your sign-in page.
  3. Back in the console, the same dialog or form opens again with what you entered. Confirm the change once more. Nothing runs by itself after the sign-in.

If you have no second factor yet, click Set up a second factor in the dialog. It opens your account page.

If the sign-in can’t prove a second factor, the console returns you to the page with the message Your organization couldn’t verify a second factor for this sign-in. If you have none set up, ask its administrator how to add one.

When a change needs a stepped-up sign-in, awctl stops with STEP_UP_REQUIRED and prints the sign-in to run:

Terminal window
awctl auth login --acr-values "urn:authwise:acr:2 phr phrh"

Complete your second factor in the browser, and then run the original command again. If you normally sign in with --issuer and --client-id, add the same two flags.

The login checks the result. If the token’s acr isn’t one of the values you asked for, the command fails with signed in, but not stepped up and names the acr it received. Check that your account has a second factor, and run the login again.

Reading never needs a stepped-up sign-in.

To add a second factor to your own account, follow these steps:

  1. Go to your account page at ISSUER_URL/account/, where ISSUER_URL is the address of the issuer you sign in at, for example https://login.example.com/account/.
  2. Open Two-step verification.
  3. Under Add a method, select a method and complete the setup.

If the page offers no method, the realm has no factor turned on. An administrator of the realm adds one:

  1. In the console, go to Realms and open the realm.
  2. Open the Factors tab.
  3. Click Add factor, and complete the form.

A service account signs in with client credentials, and its token has no acr. For that reason:

  • A service account’s binding carries no condition. The identity server refuses a Guard administrative binding to a client that names one.
  • A service account is never refused with STEP_UP_REQUIRED.

Run Terraform and other automation with a service account. When Terraform runs on a person’s awctl auth login sign-in that isn’t stepped up, the changes that need a second factor fail at apply with PERMISSION_DENIED and the reason STEP_UP_REQUIRED.

See Service accounts.

SymptomCause and fix
INVALID_ARGUMENT: a person bound … must carry the administration audience's step-up condition …The binding of guardcontrol.tenantAdmin or guardcontrol.networkAdmin to a user or a group has no condition, or a different one. Set the condition the message names.
INVALID_ARGUMENT: a person bound … must carry this tenant's step-up condition, and the tenant has noneThe tenant has no step-up condition. Enable home administration again to create it, and then write the binding.
INVALID_ARGUMENT: a client bound … carries no conditionThe binding of a service account names a condition. Remove the condition.
INVALID_ARGUMENT: … is bound at …, not at …The role is at the wrong anchor. Bind guardcontrol.tenantAdmin at the tenant and guardcontrol.networkAdmin at one network.
awctl stops with STEP_UP_REQUIREDThe change needs a stepped-up sign-in. Run the awctl auth login --acr-values command that the message prints, and then repeat the command.
awctl auth login --acr-values fails with signed in, but not stepped upThe issuer didn’t ask for a second factor. Set up a second factor on your account, and run the login again.
The console shows Sign in again with a second factor every time you open Guard’s administrationYour role carries the step-up condition and your sign-in has no second factor. Click Sign in again. If you have no second factor, set one up first.
A Terraform apply fails with STEP_UP_REQUIREDTerraform is running on a person’s sign-in. Run it with a service account.