Configuration

Configuration is stored in ~/.clauth/config.json. It is created by clauth init and can be edited manually.

Full Schema

{

"transport": "tcp",

"host": "127.0.0.1",

"port": 4317,

"socketPath": "/home/user/.clauth/clauth.sock",

"skillTokenSalt": "<auto-generated>",

"vaultSalt": "<auto-generated>",

"kdf": {

"memory": 65536,

"parallelism": 1,

"iterations": 3,

"tagLength": 32

},

"firewall": {

"minWarmupRequests": 10,

"rateSpikeMultiplier": 3,

"burstWindowMs": 10000,

"burstLimit": 20,

"offHoursStart": 1,

"offHoursEnd": 5

},

"alertChannels": [],

"advisoryFeeds": [

{

"name": "github",

"url": "https://api.github.com/advisories",

"type": "github"

}

],

"advisoryPollIntervalMs": 3600000,

"hardening": {

"enforceHttps": true,

"maxRequestBodyBytes": 1048576,

"sessionTtlSeconds": 3600,

"challengeTtlSeconds": 600,

"identityMaxVerifyAttempts": 5,

"identityVerifyPerSkillPerMinute": 30,

"identityVerifyPerIpPerMinute": 60,

"requireAdminTokenForIdentity": false

}

}

Transport

FieldTypeDefaultDescription

transport"tcp" or "unix""tcp"Daemon transport mode
hoststring"127.0.0.1"TCP listen address
portnumber4317TCP listen port
socketPathstring~/.clauth/clauth.sockUnix socket path

TCP Mode (default)

{

"transport": "tcp",

"host": "127.0.0.1",

"port": 4317

}

Unix Socket Mode

{

"transport": "unix",

"socketPath": "/home/user/.clauth/clauth.sock"

}

Socket is created with 0o600 permissions (owner only).

Authentication

FieldTypeDefaultDescription

skillTokenSaltstringauto-generatedSalt for skill token HMAC

Proxy and identity endpoints require either a valid x-clauth-skill-token header or Authorization: Bearer session token.

KDF (Key Derivation Function)

FieldTypeDefaultDescription

kdf.memorynumber65536Argon2id memory in KiB (64 MiB), when available
kdf.parallelismnumber1Argon2id/scrypt parallelism (scrypt uses this as p)
kdf.iterationsnumber3Argon2id time cost, when available
kdf.tagLengthnumber32Derived key length in bytes

Clauth prefers Argon2id when the runtime provides crypto.argon2Sync. On runtimes without Argon2id support (including Node.js 22), Clauth uses scrypt.

These parameters affect vault unlock time. Higher values increase security but slow down daemon startup.

Behavioral Firewall

FieldTypeDefaultDescription

firewall.minWarmupRequestsnumber10Requests before anomaly detection activates
firewall.rateSpikeMultipliernumber3Threshold multiplier vs average RPM
firewall.burstWindowMsnumber10000Burst detection window (10 seconds)
firewall.burstLimitnumber20Max requests in burst window
firewall.offHoursStartnumber1Off-hours start (hour, 24h format)
firewall.offHoursEndnumber5Off-hours end (hour, 24h format)

Tuning Examples

High-throughput skill:

{

"firewall": {

"burstLimit": 100,

"rateSpikeMultiplier": 5,

"minWarmupRequests": 50

}

}

Strict mode:

{

"firewall": {

"burstLimit": 5,

"rateSpikeMultiplier": 2,

"minWarmupRequests": 5

}

}

Alert Channels

{

"alertChannels": [

{

"type": "webhook",

"url": "https://hooks.slack.com/services/T00/B00/xxx",

"minSeverity": "warning"

},

{

"type": "webhook",

"url": "https://your-pagerduty-endpoint.com/alerts",

"minSeverity": "critical"

}

]

}

FieldTypeDescription

type"webhook"Channel type (only webhook supported)
urlstringWebhook endpoint URL
minSeverity"info", "warning", "critical"Minimum severity to dispatch

Severity ordering: info < warning < critical

Webhooks receive POST with JSON body:

{

"severity": "warning",

"category": "firewall",

"message": "Rate spike detected (15/min vs baseline 3.2/min).",

"timestamp": "2025-01-15T10:05:00.000Z",

"metadata": {

"skillId": "my-agent",

"provider": "github",

"allowed": true

}

}

Advisory Feeds

{

"advisoryFeeds": [

{

"name": "github",

"url": "https://api.github.com/advisories",

"type": "github"

}

],

"advisoryPollIntervalMs": 3600000

}

FieldTypeDefaultDescription

advisoryFeeds[].namestringFeed display name
advisoryFeeds[].urlstringFeed URL (returns JSON array)
advisoryFeeds[].type"github" or "custom"Feed format type
advisoryPollIntervalMsnumber3600000Polling interval (1 hour)

On critical advisory, clauth auto-revokes grants and deletes credentials for the affected provider.

Hardening

{

"hardening": {

"enforceHttps": true,

"maxRequestBodyBytes": 1048576,

"sessionTtlSeconds": 3600,

"challengeTtlSeconds": 600,

"identityMaxVerifyAttempts": 5,

"identityVerifyPerSkillPerMinute": 30,

"identityVerifyPerIpPerMinute": 60,

"requireAdminTokenForIdentity": false

}

}

FieldTypeDefaultDescription

hardening.enforceHttpsbooleantrueRequire HTTPS for outbound calls
hardening.maxRequestBodyBytesnumber1048576Max proxy request body (1 MiB)
hardening.sessionTtlSecondsnumber3600Session JWT lifetime (1 hour)
hardening.challengeTtlSecondsnumber600Identity challenge TTL (10 min)
hardening.identityMaxVerifyAttemptsnumber5Max verification attempts allowed per identity challenge before failing closed
hardening.identityVerifyPerSkillPerMinutenumber30Max identity verification requests per skill per minute
hardening.identityVerifyPerIpPerMinutenumber60Max identity verification requests per source IP per minute
hardening.requireAdminTokenForIdentitybooleanfalseRequire admin token for identity endpoints (except OAuth callback)

Identity Email Delivery

Email proof delivery is configured via environment variable, not config.json:

VariableRequiredDescription

CLAUTH_EMAIL_CHALLENGE_WEBHOOK_URLFor method: "email"Webhook that receives { challengeId, accountId, code, expiresAt, ... } for out-of-band delivery

Vault Salt

FieldTypeDefaultDescription

vaultSaltstringauto-generatedBase64url-encoded 16-byte salt

Generated at clauth init. Do not change after vault creation — the vault will become unreadable.

State File Locations

All state files are in the directory specified by CLAUTH_HOME (default: ~/.clauth/):

FileDescription

config.jsonThis configuration file
vault.encEncrypted credential vault
scopes.jsonScope grants
audit.ndjsonAudit log
firewall.jsonFirewall baselines
skill-auth.jsonSkill tokens
session-revocations.jsonRevoked session JWT IDs (jti)
oauth-tokens.jsonOAuth refresh metadata (encrypted with vault master key; invalid/tampered data is rejected on load)
advisory-state.jsonSeen advisory IDs
identity-state.jsonIdentity challenges and proofs