How the topology works
The device-code flow (RFC 8628) splits authentication across two machines:
The container and the Mac host never share credentials directly. The device-code grant bridges them: the CLI generates a one-time code, the operator approves it in a browser, and C1 issues the device identity back to the polling CLI.
Device bootstrap versus vault bootstrap
Device registration establishes the device’s identity with C1 and binds its cryptographic keys. This is a prerequisite for vault operations but is not itself a vault operation. After device registration completes, the device can participate in vault membership workflows (invitations, key package exchange, and secret access) as a separate step.Prerequisites
- Docker installed on the macOS host.
- A C1 tenant URL (for example,
yourcompany.conductor.one). - The public OAuth client ID for device-code registration. Your C1 administrator provides this value.
- A browser on the Mac host to approve the device code.
- The
c1-vaultCLI binary, available inside your Docker image.
Register the device
The registration flow has three phases: create the volume, register the device identity, then activate it.Create a Docker volume for device state
The state directory holds the device’s generated key material. Use a named Docker volume so the state survives container recreation.Run device register in the container
Start the container with the state volume mounted and the required environment variables set. The CLI initiates the device-code grant and prints a verification URL and user code.
Approve the device code on the Mac host
1
Open the verification URL in a browser on the Mac host.
2
Sign in to C1 with your account if prompted.
If the browser redirects you to a different tenant or an authentication gate, confirm that the tenant URL in
LATCHKEY_C1_URL matches the tenant you intend to register with. A mismatch between the CLI’s configured tenant and your browser session causes a redirect loop. Sign out of the wrong tenant in the browser and sign in to the correct one.3
Confirm that the user code shown in the browser matches the code the CLI printed, then approve the device.
device_id field in the output identifies this device going forward.
Run device activate to complete registration
In a new container run against the same volume, activate the device. This step completes the server-side registration and publishes the device’s cryptographic key packages.
Verify the device
Confirm the device is registered and can authenticate:Environment variable reference
Troubleshooting
Wrong tenant or authentication redirect loop
If the browser redirects unexpectedly after opening the verification URL, theLATCHKEY_C1_URL value likely does not match the tenant your browser session is signed into. Sign out of the browser session and sign in to the correct tenant, then re-open the verification URL.
Device code expired
The device code is valid for a limited time (typically 15 minutes). If it expires before approval, re-runc1-vault device register to generate a new code.