Skip to content
AI GovernanceMarkdown

AI governance sign-in

A user of your realm approves a device with a code in any browser, and the device joins the realm's AI fleet as theirs.

AvailableAPIRFC 8628, OpenID Connect Core 1.0

An enrolled device reports its AI tools only once a user of your realm has approved it. The approval ties the device’s AI tools to a real user of the realm, so the fleet shows whose machine each tool runs on, and the device’s record lists who works on it.

  • An enrolled Linux or macOS device; see Get started with Endpoint Management. The AI tools agent comes with the device client.
  • A user of your realm who can sign in as usual. Approving needs no administrator privilege.
  • A shell on the device as root (with sudo) or as a member of the device client’s group, to print the code.
  • Nothing to set up in the realm. Every realm gets its AI governance sign-in when it’s created; it turns on the realm’s device authorization grant and adds an app for it to the realm’s clients. Leave both in place.
  • To read the result: any privilege that reads your realm’s configuration, such as RealmViewer or RealmOwner, through the API (Fleet records).

The sign-in uses the device authorization grant (RFC 8628) at your realm’s own OpenID Connect issuer.

  1. The AI tools agent asks for approval. On a newly enrolled device, the AI tools agent (the part of the device client that finds the device’s AI tools) starts a sign-in and waits, holding a sign-in address and a short code.
  2. A user approves it. The user opens the address in any browser, on any device, signs in to your realm as they always do, and approves the code.
  3. The device joins the fleet. The AI tools agent joins the realm’s AI fleet as that user, and the realm adds the user to the machine’s device record, in users (see Device records).

From then on the AI tools agent reports to the fleet on its own. Every report is tied to the device and to the user who approved it, and the agent’s private key never leaves the device.

One user per device. A device has one approving user, and its AI tools are attributed to them. The agent stays signed in as that user, and the fleet checks that sign-in again while the device is connected: if the user is disabled or their sign-in revoked, the fleet closes the device’s connection within five minutes and stops taking its reports, and the agent asks for a new approval.

On the device, print the waiting address and code with the AI tools agent’s command, cvyuh-aig on a standard install, in the same folder as the device client: /var/cvyuh on Linux, /Library/Cvyuh on macOS.

Terminal window
sudo /var/cvyuh/bin/cvyuh-aig --socket /var/cvyuh/var/run/aig.sock enrollment

On macOS, sudo /Library/Cvyuh/bin/cvyuh-aig --socket /Library/Cvyuh/var/run/aig.sock enrollment. It prints the state, the address and the code:

awaitingAuthentication
Sign in at: <sign-in address>
Code: <code>

Give the address and code to the user whose device it is. Once they’ve approved it, run the same command again: it prints enrolled. Run it with discover in place of enrollment to see what the agent finds on the device.

  1. Drop the device from the fleet: DELETE on its fleet record (Fleet records).
  2. The device leaves the fleet at once. Its agent starts a new approval the next time it reconnects to the fleet or its inventory changes; restart the device to make that happen now. Run the enrollment command again for the new code.
  3. The new user approves it. The device joins the fleet again, as theirs, under a new fleet device id.

The earlier user stays listed in the device record’s users; see Limits and defaults.

In the browser, the user sees your realm’s own sign-in page, with whatever second factor and policy the realm sets, then the page that asks for the code and whether to allow the device. On the device, the command prints one of these states:

StateWhat it meansWhat to do
notConfiguredThe device client hasn’t set the agent upFinish device enrollment
startingThe agent is starting a sign-in, or starting over after one failedRun the command again in a minute
awaitingAuthenticationA code is waiting, with its addressHave the user approve it
enrollingApproved; the agent is joining the fleetRun the command again
enrolledThe device is in your realm’s fleetNothing: it reports from now on
failedThe agent lost its connection to the fleetIt retries on its own; see Troubleshooting
WhatValueCan it change?
How long a code livesYour realm’s device code lifetime, 10 minutes by defaultYes: deviceCodeLifetimeSecs on Device authorization
Approving users per deviceOneNo
Sign-in checked againWithin five minutes while connectedNo
Users on the device recordEach user who has approved the device; none is taken off when the device is dropped or approved by someone elseNo
  • Only into its own realm. The device signs in at the issuer of the realm it was enrolled in, so only a user of that realm can approve it.
  • Any user of your realm can approve a code. Whoever approves it becomes the device’s user. Give a code only to the person whose device it is.
  • No listening port. The sign-in needs no local web server on the device; the code is approved in a browser anywhere.
  • Your sign-in rules apply. The user signs in through the realm’s usual sign-in, with whatever second factor and policy the realm sets.
SymptomCauseFix
The browser says the code is wrong or expiredThe code was mistyped, or it outlived its lifetimeRun the command again for a new code. After an expiry the agent starts over on its own, and prints a new code within a minute or two
The state stays starting and no code appearsThe realm’s device authorization grant was turned off, or the agent can’t reach the realmPut urn:ietf:params:oauth:grant-type:device_code back in the realm’s grantTypes (Device authorization); check the device is online
A user of another realm can’t sign in at the addressThe address is your realm’s own sign-inHave a user of your realm approve it
An approved device asks for approval againIt was dropped from the fleet, or its user was disabled or their sign-in revokedHave a user of your realm approve it again
A dropped device hasn’t asked for approvalIt’s still on its earlier connection, and nothing has changed on itRestart the device
The command can’t reach the agentThe device client isn’t running, or you ran it without sudoStart the device client; run the command with sudo

The approving user’s own trail shows the approval: their sign-in (LOGIN and its steps) and a TOKEN_ISSUED for the device authorization grant, then one each time the agent renews its token. Read it with Read a user’s or agent’s trail. The user’s addition to the device record isn’t recorded in the audit trail.