Identity and authentication
See which directory identities DefenseClaw attributes agent activity to on Linux, Windows and macOS, check what it knows about a user, and turn it off.
DefenseClaw ties each agent action to the person who ran it and to the agent that did it. Guardrail profiles can then give a group, a user, a connector or a single agent its own policy, and every decision records which profile applied.
Attribution, not authentication
DefenseClaw reads identity only from the operating system the agent runs on.
- It never calls an identity provider (no Entra, Okta or LDAP API calls).
- It holds no identity credentials: no passwords, tokens, tickets or keys.
- It adds no new secrets and no sign-in step.
- Okta and Entra ID appear only through what the OS already knows: a joined device, Platform SSO, or a directory synced into AD or LDAP.
Each fact has an assurance level, sent as defenseclaw.user.principal.assurance:
| Assurance | Meaning |
|---|---|
verified | The gateway or the root guardian resolved it from how it authenticated the caller (kernel peer credentials or a per-user credential). |
claimed | The hook reported it from the user's own session, which the user could change. |
What is read on each OS is in How DefenseClaw knows who a user is.
Do not grant access from these fields
Identity in DefenseClaw records answers "who ran this agent". It is not an authenticated assertion for another system. Only verified facts can select a guardrail profile; headers, hook payloads and claimed facts never do.
Supported identity types
Per-user is the OSS install in the user's own home. Enterprise is the standalone enterprise profile with its root guardian or SYSTEM enumerator. Everything in the table is verified unless it says claimed.
| Identity | Linux | Windows | macOS |
|---|---|---|---|
| Local account | uid, name and groups from NSS files | SID and name from LookupAccountSid | uid, name and groups from Open Directory, directory local |
| LDAP or SSSD | Account, domain, groups and the directory type of the joined realm, also per-user. Enterprise adds the UPN from SSSD InfoPipe | Not applicable | The directory of an LDAP-bound account from dscl /Search (enterprise) |
| Active Directory over Kerberos | SSSD or winbind: principal, domain and groups. Without InfoPipe the principal is account@realm. The ticket cache's Kerberos principal is claimed | Account, domain and the AD UPN. Groups from the sign-in token (enterprise only): a domain group applies only while the user has a desktop session (Windows groups). The logon session's UPN and Kerberos principal are claimed | AD-bound Mac: the Kerberos principal and domain (enterprise). The session's Kerberos principal is claimed |
| Entra ID (Preview) | aad NSS module or Himmelblau: directory entra_id with the UPN, also per-user. Himmelblau gives Entra groups; aad does not. Entra Domain Services gives an AD account | Entra-joined or hybrid-joined: UPN, provider and tenant, also per-user. Entra group SIDs only for groups a built-in local group lists (enterprise only) | Platform SSO with Company Portal: directory entra_id and the login UPN (enterprise). No Entra groups |
| Okta (Preview) | Okta LDAP Interface and SSSD: uid, name and Okta groups, also per-user. Enterprise adds directory ldap | As the AD account Okta syncs to | Platform SSO or Okta Device Access with Okta Verify: SSO provider and login UPN (enterprise) |
Setup guides: Active Directory on Linux, Microsoft Entra ID, Okta on Linux.
What differs between installs and platforms:
- Linux per-user and enterprise. Both resolve the account, domain, groups and directory type. Only enterprise reads the UPN from InfoPipe, so a per-user SSSD principal is
account@realm. - Windows per-user. It resolves the account, the AD UPN and the Entra UPN and tenant, but has no group list. Only
users,connectorsandagentsassignments can match there. - macOS per-user. It reports the account and its groups with directory
local. A bound Mac's directory, domain and SSO provider need the enterprise root enumerator. - Kerberos ticket location on Linux. RHEL 9 keeps the ticket in a
KCM:cache. Ubuntu 24.04 keeps a delegated ticket in aFILE:cache named byKRB5CCNAME. DefenseClaw reads the default principal from either and never runsklist. - Okta is never an Okta lookup. On Linux and Windows an Okta user is the AD or LDAP account the OS gets from Okta. The directory value
oktacomes only from a Mac's Platform SSO or Okta Device Access provider.
Agent identity
Each agent gets an identity of its own, not only the person's. The identities are digests of facts the gateway already holds, so they need no credential and stay the same across sessions and gateway restarts.
| Level | Attribute | How the ID is made |
|---|---|---|
| Person | user.id, defenseclaw.user.principal | From the OS |
| Agent | defenseclaw.agent.identity.id | agt- plus 16 hex digits of a SHA-256 over the machine ID, the verified user, the connector and its config root in the user's home |
| Session | defenseclaw.agent.instance_id | ais- plus 16 hex digits over the agent ID and the session ID |
| Sub-agent | defenseclaw.agent.instance_id | ais- over the parent instance and the sub-agent ID. It shares its parent's agt- |
List the identities the gateway has seen, most recently seen first:
defenseclaw agent identities
defenseclaw agent identities --user alice --connector codex --jsonUser Connector Agent identity Sessions Last seen Config root
alice@corp.example.com codex agt-3f9c0a1b2c3d4e5f 4 2m ago /home/alice@corp.example.com/.codex--limit N lists only the N most recent and says on stderr how many there are in all. The gateway API returns 1000 identities a page (limit and cursor). The TUI Agents tab shows the 1000 most recent as Agents (1000+).
Agent identity rules
Sandboxed agents
An agent that runs in an OpenShell sandbox is attributed like a host agent, with four differences.
- The user is the host user on the sandbox binding, the account that started the sandbox. The binding is attribution, not proof of the calling process, so it supplies no verified directory facts or groups. A request whose assignment needs a fact no other verified record supplies is refused and names that fact. Otherwise a proven connector-only assignment or the default profile applies. Identity headers the sandbox sends are ignored.
- Each sandbox has its own
agt-. A project run in two sandboxes is two agents.defenseclaw agent identitieslists one per sandbox, and they stay listed after the sandbox is gone. - Its hooks enforce unless the profile says observe. A sandbox's hooks run in
actionmode whateverguardrail.modesays. A mode the person's own guardrail profile sets (mode, orconnectors.<agent>.mode) applies in their managed sandboxes as on their host. Agent Substrate actors always enforce (Agent Substrate: managed enterprise). - Its web egress follows the sandbox's network profile (
open,balancedorstrict) and its policy pack, not a guardrail profile (Network and egress).
Check what DefenseClaw knows about a user
Ask the gateway how it resolves a user, the same way it does for a live request. --user takes the account name as getent passwd or id shows it, a uid or a SID, in any case.
defenseclaw guardrail profile explain --user alice@corp.example.com --json | jq .subject
defenseclaw agent identities --user alice
defenseclaw agent ide-plugins --user alice --ai-onlyA per-user install explains only the account that runs it. --user with another account is refused (lookup_error, exit 1) before any lookup. A per-user gateway run as root explains every account.
Run as root. The package does not put defenseclaw-gateway on root's PATH, so use the full path:
sudo /opt/defenseclaw/bin/defenseclaw-gateway enterprise linux profile-explain --user alice@corp.example.com --connector codex
sudo /opt/defenseclaw/bin/defenseclaw-gateway enterprise linux agent-identities --user alice@corp.example.com
sudo /opt/defenseclaw/bin/defenseclaw-gateway enterprise linux ide-plugins --user alice@corp.example.com --ai-onlysudo /opt/cisco/defenseclaw/bin/defenseclaw-gateway enterprise macos profile-explain --user alice --connector codex
sudo /opt/cisco/defenseclaw/bin/defenseclaw-gateway enterprise macos agent-identities --user alice
sudo /opt/cisco/defenseclaw/bin/defenseclaw-gateway enterprise macos ide-plugins --user alice --ai-onlyFrom an elevated PowerShell prompt, or as LocalSystem from an MDM script:
& 'C:\Program Files\Cisco\DefenseClaw\bin\defenseclaw.exe' enterprise windows profile-explain --user CORP\alice --connector codex
& 'C:\Program Files\Cisco\DefenseClaw\bin\defenseclaw.exe' enterprise windows agent-identities
& 'C:\Program Files\Cisco\DefenseClaw\bin\defenseclaw.exe' enterprise windows ide-plugins --user aliceOn a managed install, defenseclaw runs only the commands in Managed command availability. A standard user on managed Linux or macOS can run defenseclaw guardrail profile explain for their own account; another account's profile stays an administrator view.
What the answers contain:
subjectshows the user ID, the principal, the UPN and the groups.profile-explainalso lists every configured profile with its digest underprofiles, in place ofprofile listandprofile show.- Each
agent-identitiesrow carries the same fields on every OS, including the account'supnwhen its current verified facts hold one, andsubagents_seenandlast_subagent_id. - Each hook replaces the row's UPN. An expired or failed directory answer, or a UPN kept through an outage, leaves
upnout of the row; profile matching still uses that last good UPN. - A cold Windows Active Directory lookup may leave
upnout of the first row; it appears only if another hook runs after the directory cache has a current UPN. The row changes only when the agent hooks again. - After an account is deleted,
agent-identities --userstill finds its identities by name, uid or SID.
For fleet-wide views, use the Grafana Identity & Users board. Sandboxes users registered are listed with enterprise linux|macos sandbox list (Sandboxes on managed computers).
Refresh a managed macOS account
enterprise macos profile-explain refreshes the named account's cached identity facts when its lookup succeeds, so its hooks use the explained profile from their next call. Its JSON output shows the resolved subject and groups. Open Directory keeps its own membership cache. After a directory group change, flush it, then explain the account again:
sudo dscacheutil -flushcache; sudo dsmemberutil flushcache
sudo /opt/cisco/defenseclaw/bin/defenseclaw-gateway enterprise macos profile-explain --user aliceAfter a directory outage the guardian flushes these caches itself once the directory answers.
Refresh every account now
To apply a directory change to every cached account without waiting up to 15 minutes, run as root (Windows: elevated, or as SYSTEM):
sudo /opt/defenseclaw/bin/defenseclaw-gateway enterprise identity refresh --flush-os-cache --jsonchanges[]lists each account whose profile changed, with the old and the new profile. Its hooks use the new one from their next call.--user alicerefreshes one account; on Linux it then flushes only that account from SSSD.- Managed macOS hooks already ask Open Directory on each call. There the command reports the changes and, without
--user, flushes the Open Directory caches. - On Windows, signed-in accounts keep their sign-in groups until they sign in again. They are listed in
windows_token_groups_pending.
See enterprise identity refresh.
Turn off the principal or the IDE inventory
Two settings decide how much personal data leaves the host.
| Setting | Default | Effect |
|---|---|---|
ai_discovery.include_user_principal | false | Adds defenseclaw.user.principal and defenseclaw.session.kerberos_principal to every record that carries identity. Off by default, like include_user_email, because a principal names a person across systems. |
ai_discovery.ide_inventory | all | all, ai_only or off. ai_only keeps only AI plugins; off collects no IDE inventory. |
config_version: 9
ai_discovery:
include_user_principal: false # the default; true sends the principal
ide_inventory: ai_only # all | ai_only | offOn a per-user install, check the file with defenseclaw config validate; the running gateway reloads it. On a managed host, change the machine configuration and apply it with ensure (Change the config). To validate the installed file on managed Windows, from an elevated PowerShell:
& 'C:\Program Files\Cisco\DefenseClaw\bin\defenseclaw.exe' config validate --config 'C:\ProgramData\Cisco\DefenseClaw\etc\config.yaml' --jsonWhat stays on
While the setting is off, the projected principal and kerberos_principal values are null in the audit export. These stay on in either case, with no separate switch: user.id, the account name, the domain, the directory type, the assurance, the session kind and the client address. Choose destinations accordingly.
- The principal, the Kerberos principal, the client address and the tenant ID are marked sensitive. The
strictredaction profile, and a custom profile that extends it, removes them;none,sensitiveandcontentkeep them (Redaction). - A home-directory path can still contain the UPN on SSSD hosts with fully qualified names (End-user identity).
- The
identity.observedrecord carries a group count, never group names.
The IDE plugin inventory is part of AI discovery (IDE plugin inventory).
Troubleshooting
Identity problems and their fixes, for every directory, are in Troubleshooting: Identity.
Next steps
Active Directory on Linux
Join a host with SSSD, turn on InfoPipe and assign a profile to an AD group.
How DefenseClaw knows who a user is
What the OS tells us, where it is read, and the limits.
User- and group-based policies
Write assignments, read the audit record, ship to managed hosts.
Microsoft Entra ID
Entra-joined Windows, Linux and macOS (Preview).
Sandbox troubleshooting on managed computers
Fix managed OpenShell sandboxes on Linux and macOS: symptoms and fixes, why a sandbox is unavailable, registration alerts, status codes and relay refusals.
How DefenseClaw knows who a user is
See how DefenseClaw learns who ran an agent from the operating system alone on Linux, Windows and macOS, what is verified or claimed, and the limits.