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",

"requireSkillToken": true,

"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": [],

"advisoryPollIntervalMs": 3600000,

"hardening": {

"enforceHttps": true,

"maxRequestBodyBytes": 1048576,

"sessionTtlSeconds": 3600,

"challengeTtlSeconds": 600,

"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

requireSkillTokenbooleantrueRequire skill token for proxy requests
skillTokenSaltstringauto-generatedSalt for skill token HMAC

When requireSkillToken is true, every proxy request must include a valid x-clauth-skill-token header or Authorization: Bearer session token.

KDF (Key Derivation Function)

FieldTypeDefaultDescription

kdf.memorynumber65536Argon2id memory in KiB (64 MiB)
kdf.parallelismnumber1Argon2id parallelism
kdf.iterationsnumber3Argon2id time cost
kdf.tagLengthnumber32Derived key length in bytes

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,

"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.requireAdminTokenForIdentitybooleanfalseRequire admin token for identity endpoints

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
oauth-tokens.jsonOAuth refresh metadata
advisory-state.jsonSeen advisory IDs
identity-state.jsonIdentity challenges and proofs