Documentation
¶
Overview ¶
Package config loads agentryd configuration from agentry.yaml plus AGENTRY_* environment overrides. Environment always wins over file values; defaults are safe for local development.
Index ¶
- Constants
- func InCIDRs(prefixes []netip.Prefix, addr netip.Addr) bool
- func ParseCIDRs(list []string) ([]netip.Prefix, error)
- type Audit
- type Auth
- type Brand
- type Config
- type Connectors
- type Database
- type Git
- type HTTP
- type Judge
- type Knowledge
- type Limits
- type Log
- type Notify
- type OIDCProvider
- type Orgs
- type Queue
- type RedTeam
- type Redis
- type SMTP
- type Scan
- type Signing
- type Storage
- type Telemetry
- type UI
- type VerificationKey
- type Web
- type WebSearch
Constants ¶
const ( // OIDCProviderID is the generic provider's id. OIDCProviderID = "oidc" // AuthentikProviderID is the id an authentik directory's provider is // registered under where its accounts are linked as "authentik:<sub>": // every identity carries its provider's id, so such a deployment keeps // it. AuthentikProviderID = "authentik" )
The ids the sign-in OIDC provider may have.
const ( // MaxSessionTTL — sessions are capped at 24 h absolute. MaxSessionTTL = 24 * time.Hour // MaxPATTTL — max token lifetime 1 year. MaxPATTTL = 365 * 24 * time.Hour // MaxPATOrgBoundTTL — 90 days if org-bound under enforced SSO. MaxPATOrgBoundTTL = 90 * 24 * time.Hour // MaxTrustedDeviceTTL bounds how long a remembered browser skips the // second factor. It exceeds MaxSessionTTL by design and is the second // browser credential class: PATs (1y) and org-bound PATs (90d) already // exceed the session cap the same way. What keeps this honest is that the // credential is narrow — it skips one factor on one sign-in path, mints // only after that factor was actually answered, expires absolutely // rather than sliding, and grants no session and no scope of its own. MaxTrustedDeviceTTL = 30 * 24 * time.Hour // MaxSSOMaxAge bounds the enforced-SSO freshness window. 8 h is // the DEFAULT and the value is org-configurable, so the ceiling is // derived rather than quoted: a freshness requirement longer than the // absolute session cap can never bind, because no session survives long // enough to violate it. Capping at the session cap keeps the knob honest. MaxSSOMaxAge = MaxSessionTTL )
TTL ceilings. These are hard product limits, not tunables: a deployment that raised them would still be an Agentry deployment by name while quietly issuing credentials the threat model never priced in.
Variables ¶
This section is empty.
Functions ¶
func InCIDRs ¶
InCIDRs reports whether addr falls in one of the ranges. An IPv4 address seen in its IPv6-mapped form (a dual-stack listener) matches its IPv4 range.
func ParseCIDRs ¶
ParseCIDRs parses a list of address ranges naming trusted proxies. Each entry is a CIDR ("10.0.0.0/8") or a bare address, which means that one address. A prefix with host bits set ("10.0.0.5/8") is refused rather than silently widened or narrowed: a typo in a trust list should fail loudly.
Types ¶
type Audit ¶
type Audit struct {
// StreamKind selects the archive sink: none | file | log | s3.
StreamKind string `yaml:"streamKind"`
// StreamDir is the directory file-kind streams write daily files into.
StreamDir string `yaml:"streamDir"`
// StreamFlush bounds how long an event may sit in the buffer. The stream
// promises delivery within about a minute; the default leaves headroom
// under that.
StreamFlush time.Duration `yaml:"streamFlush"`
// StreamS3Bucket is the destination for s3-kind streams.
StreamS3Bucket string `yaml:"streamS3Bucket"`
// RetentionDays is how long audit rows stay in the hot table (400
// days in a hosted deployment, configurable when self-hosted). 0
// disables pruning.
RetentionDays int `yaml:"retentionDays"`
}
Audit configures the continuous audit stream and its retention.
type Auth ¶
type Auth struct {
// SessionTTL is the absolute session lifetime (capped at 24h).
SessionTTL time.Duration `yaml:"sessionTTL"`
// PATMaxTTL is the maximum PAT lifetime (1y, 90d org-bound).
PATMaxTTL time.Duration `yaml:"patMaxTTL"`
// PATOrgBoundMaxTTL caps org-bound PAT lifetime under enforced SSO
// (90 days).
PATOrgBoundMaxTTL time.Duration `yaml:"patOrgBoundMaxTTL"`
// SSOMaxAge is how fresh a session's SSO assertion must be to act on an
// enforced-SSO org's resources (default 8h).
SSOMaxAge time.Duration `yaml:"ssoMaxAge"`
// TrustedDeviceTTL is how long a browser remembered at sign-in skips the
// second factor. This is a second
// browser credential class and it deliberately outlives the session cap:
// a session still has to be earned by a sign-in every time and is
// still capped at MaxSessionTTL, so raising this does not lengthen any
// session. The lifetime is absolute — using it does not extend it — and
// the ceiling below is a hard product limit like the others.
TrustedDeviceTTL time.Duration `yaml:"trustedDeviceTTL"`
// CookieSecure marks session cookies Secure (default true outside dev).
CookieSecure bool `yaml:"cookieSecure"`
// SealingKey is a base64 32-byte key encrypting small secrets at rest
// (webhook secrets, sign-in state). Empty is allowed only in dev (a fixed
// insecure key).
SealingKey string `yaml:"sealingKey"`
// IdPLogoutURL is the sign-in provider's sign-out URL: where sign-out
// sends the browser once the session is revoked, so the next sign-in
// asks again (the provider's end-session endpoint). Empty means sign-out
// ends on the home page.
IdPLogoutURL string `yaml:"idpLogoutURL"`
// StaffOrg is the handle of the staff organization:
// platform staff is exactly an active account with a verified address
// at StaffDomain that is an active member of this organization, and
// the organization admits nobody else. Membership is granted by the
// organization's admins; the address is verified by the sign-in
// provider. The
// flag is recomputed at every membership change, at sign-in and once
// when the server starts. Set both or neither; with neither the flag
// is left as it is.
StaffOrg string `yaml:"staffOrg"`
// StaffDomain is the staff organization's domain: a bare lower-case
// DNS name, matched exactly (no subdomain) against the account's
// verified address.
StaffDomain string `yaml:"staffDomain"`
// OIDC is the deployment's one "sign in with your OpenID provider": any
// OpenID Connect issuer the operator registers the registry with. See
// OIDCProvider.
OIDC OIDCProvider `yaml:"oidc"`
// RequireIdPMFA turns on the "2FA before public publish" gate,
// satisfied by evidence rather than trust: the account must have signed
// in at least once with an ID token whose `amr` names a second factor
// (users.idp_mfa_at). Off by default because it is only honest once the
// sign-in provider actually enforces MFA.
RequireIdPMFA bool `yaml:"requireIdpMFA"`
}
Auth holds authentication tunables.
type Brand ¶
type Brand struct {
Name string `yaml:"name"`
LogoURL string `yaml:"logoURL"`
CSSURL string `yaml:"cssURL"`
SupportEmail string `yaml:"supportEmail"`
SecurityEmail string `yaml:"securityEmail"`
PrivacyURL string `yaml:"privacyURL"`
TermsURL string `yaml:"termsURL"`
}
Brand is what this deployment calls itself and where it sends people for help. Nothing is required: a deployment without a name is called by its public host, then "Agentry" (see Config.DisplayName).
type Config ¶
type Config struct {
// Env names the deployment environment: dev | staging | prod.
Env string `yaml:"env"`
// DevMode enables development conveniences, and is opt-in: false unless
// the configuration says otherwise, and refused unless env is dev
// (Validate enforces both). One boolean switches five
// controls off at once — the at-rest sealing key (a public constant
// stands in), 2FA before a public publish, release signing (an
// ephemeral key at every start), the scan judge (none becomes static)
// and the S8 IP-cluster signal (a fixed literal) — so a deployment that
// did not ask for it must never get it.
DevMode bool `yaml:"devMode"`
HTTP HTTP `yaml:"http"`
Database Database `yaml:"database"`
Redis Redis `yaml:"redis"`
Storage Storage `yaml:"storage"`
Git Git `yaml:"git"`
Log Log `yaml:"log"`
Auth Auth `yaml:"auth"`
Limits Limits `yaml:"limits"`
Signing Signing `yaml:"signing"`
Judge Judge `yaml:"judge"`
WebSearch WebSearch `yaml:"webSearch"`
Scan Scan `yaml:"scan"`
Audit Audit `yaml:"audit"`
Orgs Orgs `yaml:"orgs"`
RedTeam RedTeam `yaml:"redTeam"`
Telemetry Telemetry `yaml:"telemetry"`
Queue Queue `yaml:"queue"`
Notify Notify `yaml:"notify"`
SMTP SMTP `yaml:"smtp"`
BaseURL string `yaml:"baseURL"` // public origin, e.g. https://agentry.example
Web Web `yaml:"web"`
UI UI `yaml:"ui"`
Brand Brand `yaml:"brand"`
Knowledge Knowledge `yaml:"knowledge"`
// Connectors is what the deployment configures for Agentry's
// connectors (pkg/connector).
Connectors Connectors `yaml:"connectors"`
// MinCLIVersion, when set, is advertised via GET /api/v1/meta so the CLI
// can warn (or refuse, on a major gap) before talking to an API it
// predates. Empty = no minimum advertised.
MinCLIVersion string `yaml:"minCLIVersion"`
}
Config is the full agentryd configuration tree.
func Default ¶
func Default() Config
Default returns the baseline configuration: a development environment with dev mode OFF. A config that names no sealing key and no signing key therefore fails at boot rather than running on public constants; a throwaway stack opts in with devMode: true.
func Load ¶
Load builds configuration: defaults ← optional YAML file ← AGENTRY_* env. path may be empty; then AGENTRY_CONFIG or ./agentry.yaml is used if present.
func (Config) DisplayName ¶
DisplayName is what notification bodies and the server's own pages call this deployment: brand.name, else the public origin's host, else "Agentry".
func (Config) SignInOIDC ¶
func (c Config) SignInOIDC() (OIDCProvider, bool)
SignInOIDC is the deployment's sign-in OpenID provider, when it has one: auth.oidc as configured, with its id defaulted.
type Connectors ¶
type Connectors struct {
// PublicClients maps a connector's id to the public client id of the
// app this deployment registered for it, which GET /api/v1/connectors
// serves to clients for their local sign-ins. Only a connector whose
// strategy is agentry-public takes one. A public client id is not a
// secret; a client secret is never configured here.
PublicClients map[string]string `yaml:"publicClients"`
}
Connectors configures Agentry's connectors for this deployment.
type Database ¶
type Database struct {
URL string `yaml:"url"`
// MigrateOnStart runs goose migrations at boot (self-host convenience).
MigrateOnStart bool `yaml:"migrateOnStart"`
}
Database configures the PostgreSQL system of record.
type Git ¶
type Git struct {
DataDir string `yaml:"dataDir"` // bare repos under {dataDir}/{uuid[0:2]}/{uuid}.git
BinPath string `yaml:"binPath"` // git binary; defaults to $PATH lookup
// HooksDir is where the git role makes the private directory git runs
// the pre-receive hook from; it must allow exec and be owned by the
// server (or sticky, like /tmp). Empty means the system temp directory.
// The repositories' own volume is not used, since it may not allow exec.
HooksDir string `yaml:"hooksDir"`
// SSHAddr, when set, is where the git and all roles listen for the SSH
// transport, e.g. ":2222". Empty disables it.
SSHAddr string `yaml:"sshAddr"`
// SSHHostKeyFile is the PEM host key; empty means {dataDir}/ssh_host_ed25519_key,
// generated on first start.
SSHHostKeyFile string `yaml:"sshHostKeyFile"`
// SSHPublicURL is the base clients use, e.g. "ssh://git@git.example.com:2222";
// when set, agent documents carry gitSshUrl.
SSHPublicURL string `yaml:"sshPublicUrl"`
// SSHProxyProtocolCIDRs, when set, says a TCP proxy fronts the SSH
// listener and names the addresses it connects from.
// Every connection must then come from one of these ranges and open
// with a PROXY protocol header (v1 or v2), whose source address becomes
// the client's: the key-offer budget and the log lines key on
// it. A connection from any other address is refused, header or
// not, so a client cannot name its own address. Empty (the default)
// reads no header and keys on the TCP peer. CIDRs or bare addresses.
SSHProxyProtocolCIDRs []string `yaml:"sshProxyProtocolCIDRs"`
}
Git configures bare-repo hosting.
type HTTP ¶
type HTTP struct {
Addr string `yaml:"addr"`
GitAddr string `yaml:"gitAddr"`
// TrustedProxies is how many reverse-proxy hops sit in front of agentryd.
// 0 (the default) means agentryd is addressed directly and
// X-Forwarded-For is ignored entirely — a header any client can forge is
// not evidence of anything.
//
// Behind CloudFront → ALB → agentryd, set 2: the per-IP rate limits then
// key on the 2nd-from-last XFF entry, which is the last address a
// *trusted* hop wrote. Setting this higher than the real hop count hands
// callers the ability to choose their own rate-limit bucket, so it must
// match the deployment exactly.
TrustedProxies int `yaml:"trustedProxies"`
// TrustedProxyCIDRs, when set, names the addresses the trusted hop
// connects from. X-Forwarded-For is then read only on a
// request whose TCP peer is inside one of these ranges; every other
// request resolves to its peer, whatever the header says. Without it
// the hop count trusts the header's tail from whoever connects, so a
// client that reaches agentryd directly names its own address; with
// it that is a property of the code, not of which ports a deployment
// happens to expose. CIDRs or bare addresses. Used only when
// trustedProxies >= 1; the hop count keeps its meaning for the entries
// the trusted hops wrote.
TrustedProxyCIDRs []string `yaml:"trustedProxyCIDRs"`
// ProxyRequestID says the hop in front SETS X-Request-Id on every request
// it forwards (the compose edge does; an ALB does not), so an inbound id
// is honoured (docs/logging.md). Off (the default) means the server mints
// its own and ignores the header. A trusted hop count is not enough on
// its own: a hop that forwards the header without overwriting it lets
// any client choose the id stamped on its lines and audit rows.
ProxyRequestID bool `yaml:"proxyRequestID"`
}
HTTP configures listeners. Git traffic may share Addr (self-host) or use GitAddr (a separate hostname in a hosted deployment).
type Judge ¶
type Judge struct {
Provider string `yaml:"provider"` // openai | anthropic | bedrock | typesafe | classifier | static | none
Model string `yaml:"model"`
Region string `yaml:"region"`
BaseURL string `yaml:"baseUrl"`
APIKey string `yaml:"apiKey"`
}
Judge selects the S5 LLM adjudication provider.
openai and anthropic talk to any endpoint speaking the matching wire protocol (hosted APIs or self-hosted gateways alike): set BaseURL to the API root and APIKey to the credential. The AGENTRY_JUDGE_TYPE, AGENTRY_JUDGE_BASE_URL and AGENTRY_JUDGE_API_KEY environment variables configure the same three values. The key is sent to BaseURL, so Validate refuses a BaseURL that is not https; plain http is accepted only for a loopback address, for a test server on the same machine.
type Knowledge ¶
type Knowledge struct {
// SealingKey is a base64 32-byte key the core wraps packs' data keys
// under (AGENTRY_KNOWLEDGE_SEALING_KEY): a key of its own, refused when
// it is the auth sealing key. Empty outside dev mode leaves the store
// off (its routes answer 503) unless an extension wraps the keys; in
// dev mode a fixed insecure key stands in, as for the auth sealer.
SealingKey string `yaml:"sealingKey"`
}
Knowledge configures the store of knowledge packs.
type Limits ¶
type Limits struct {
AuthedPerHour int `yaml:"authedPerHour"` // sustained authed budget
AuthedBurstPerMin int `yaml:"authedBurstPerMin"` // authed burst
AnonymousPerMin int `yaml:"anonymousPerMin"` // anonymous per-IP
LoginPerMin int `yaml:"loginPerMin"` // login/register per-IP
// ModelInputPerMin is the model-input routes' budget per caller, per
// minute and as its burst (120): a platform staff member,
// or one hosted job. An address presenting job credentials may spend
// ten times that, which bounds guessing at credentials without
// starving the sandbox hosts behind one NAT.
ModelInputPerMin int `yaml:"modelInputPerMin"`
// Git/repo quotas: 100 MB hard, 25 MB warn (the pre-receive hook
// tells the pusher), 25 MB single-object cap.
RepoQuotaBytes int `yaml:"repoQuotaBytes"`
RepoWarnBytes int `yaml:"repoWarnBytes"`
RepoMaxBlobBytes int `yaml:"repoMaxBlobBytes"`
// GitPushesPerHour is the per-repo push budget (60/h), one number
// on both transports.
GitPushesPerHour int `yaml:"gitPushesPerHour"`
// SSHKeyOffersPerMin bounds the public keys one source address may
// offer the git SSH listener per minute, spent before the key is looked
// up (60/min).
SSHKeyOffersPerMin int `yaml:"sshKeyOffersPerMin"`
// GitConcurrentPerIP is the budget of concurrent git operations per
// client address (20), on both transports, keyed on the trusted client
// address (http.trustedProxyCIDRs, git.sshProxyProtocolCIDRs). An
// address at it is refused at once rather than queued.
GitConcurrentPerIP int `yaml:"gitConcurrentPerIP"`
// Namespace + publish-velocity quotas.
AgentsPerUserNamespace int `yaml:"agentsPerUserNamespace"` // 200
AgentsPerOrgNamespace int `yaml:"agentsPerOrgNamespace"` // 500
VersionsPerDay int `yaml:"versionsPerDay"` // 20 per agent
// Webhook quotas: 20 endpoints per org, 5 deliveries/s per org.
WebhookEndpointsPerOrg int `yaml:"webhookEndpointsPerOrg"`
WebhookDeliveriesPerSecond int `yaml:"webhookDeliveriesPerSecond"`
// Release-archive quotas, enforced by manifest validation (V8).
ArchiveMaxBytes int64 `yaml:"archiveMaxBytes"` // 10 MiB
ArchiveMaxFiles int `yaml:"archiveMaxFiles"` // 2000
ArchiveMaxFileBytes int64 `yaml:"archiveMaxFileBytes"` // 2 MiB
ArchiveMaxImageFileBytes int64 `yaml:"archiveMaxImageFileBytes"` // 5 MiB
ArchiveMaxTextBytes int64 `yaml:"archiveMaxTextBytes"` // 1 MiB: the text files in total
// KnowledgeBytesPerAccount caps the knowledge an account keeps in the
// registry, in bytes of its packs' trees. 0, the default, is no cap: a
// self-hoster sets one. A cap never deletes: over it, no pack is added or
// grown.
KnowledgeBytesPerAccount int64 `yaml:"knowledgeBytesPerAccount"`
}
Limits tunes the quotas. These are the values internal/entitlements' config-backed default Resolver hands out; a hosted overlay swaps in a Resolver that reads them per-org instead. Nothing in the open-source tree reads a limit except through that Resolver.
type Log ¶
type Log struct {
Level string `yaml:"level"` // debug | info | warn | error
}
Log configures structured logging.
type Notify ¶
type Notify struct {
// Kind is log | smtp. log stays the default so a fresh install never
// silently fails to deliver: it says so, in the log.
Kind string `yaml:"kind"`
}
Notify selects the notification transport (SES in a hosted deployment, mailpit in the compose dev stack).
type OIDCProvider ¶
type OIDCProvider struct {
// ID names the provider: the segment of its sign-in routes and the
// prefix of every identity it links ("<id>:<sub>"). "oidc" by default;
// "authentik" for a deployment whose accounts are linked under that
// prefix already. Changing it on a deployment with accounts unlinks
// every one of them.
ID string `yaml:"id"`
Issuer string `yaml:"issuer"`
ClientID string `yaml:"clientId"`
ClientSecret string `yaml:"clientSecret"`
// Scopes are asked for at sign-in; empty asks for openid, email and
// profile.
Scopes []string `yaml:"scopes"`
// DisplayName is what the sign-in page calls it ("Continue with …");
// empty calls it "your OpenID provider".
DisplayName string `yaml:"displayName"`
}
OIDCProvider is the sign-in OpenID provider: an issuer with a discovery document, and the client the registry is registered there as. Its redirect URI is <baseURL>/api/v1/auth/oidc/<id>/callback.
func (OIDCProvider) Configured ¶
func (p OIDCProvider) Configured() bool
Configured reports whether the provider can be offered.
type Orgs ¶
type Orgs struct {
// DecommissionHold is how long a decommissioned organization stays
// readable — members keep read and export — before the erasure job
// deletes its agents, repositories, blobs and invitations and releases
// its handle and domain. Zero erases at the next hourly sweep.
DecommissionHold time.Duration `yaml:"decommissionHold"`
// PendingDigestEvery is how often the worker mails each organization's
// admins the pending members they have not been told about:
// the domain fold-in and the IdP's provisioning are batched into one mail
// per admin, and a person is named once. Zero keeps the default of a day;
// the sweep that runs when an organization gains a domain sends one
// digest at once regardless.
PendingDigestEvery time.Duration `yaml:"pendingDigestEvery"`
}
Orgs configures the organization lifecycle.
type Queue ¶
type Queue struct {
// Driver is "river" (the default and the only driver: River,
// Postgres-backed, its tables created by the migrator). "pg", a driver
// built on SELECT … FOR UPDATE SKIP LOCKED, is refused: its jobs table
// no longer exists.
Driver string `yaml:"driver"`
// Workers is how many jobs one worker process runs at once per queue.
// 1 keeps the serial behaviour.
Workers int `yaml:"workers"`
}
Queue selects the async job driver.
type RedTeam ¶
type RedTeam struct {
// Interval is how often a worker runs the job; 0 disables it.
Interval time.Duration `yaml:"interval"`
// CorpusDir overrides where the attack corpus is read from (default:
// the image's /srv/agentry/attack-corpus, else testdata/attack-corpus).
CorpusDir string `yaml:"corpusDir"`
}
RedTeam configures the scheduled red-team job: corpus rewrites scanned against the S3/S4 bundle, report-only.
type Redis ¶
type Redis struct {
URL string `yaml:"url"`
}
Redis is an optional dependency, and nothing in the core reads the URL today: it is reported as features.redis on GET /api/v1/meta and that is all. The state a replica set must share lives in Postgres — sessions and the queue — so there is no in-memory fallback this would replace. The rate-limit buckets stay per process either way (docs/self-hosting.md).
type SMTP ¶
type SMTP struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
Username string `yaml:"username"`
Password string `yaml:"password"`
// From is the envelope + header sender, e.g. "Agentry <no-reply@example>".
From string `yaml:"from"`
// StartTLS upgrades the connection before authenticating. Required
// against SES; mailpit speaks plaintext on 1025, so dev sets it false.
StartTLS bool `yaml:"startTLS"`
// Timeout bounds a single send (dial + handshake + data).
Timeout time.Duration `yaml:"timeout"`
}
SMTP configures the smtp notifier. Point it at SES's SMTP endpoint on AWS (see docs/ops/deployment.md) or at mailpit on :1025 in dev.
type Scan ¶
type Scan struct {
// GitleaksBin is the path of a gitleaks binary S2 execs in addition to
// its native ruleset. "auto" resolves it from PATH; empty disables.
GitleaksBin string `yaml:"gitleaksBin"`
// ToolTimeout bounds one external tool invocation; 0 means two minutes.
ToolTimeout time.Duration `yaml:"toolTimeout"`
// OSVURL is the vulnerability database S7 asks about declared MCP
// servers. Empty means https://api.osv.dev; "none"
// switches the lookup off (S7 then reports "not checked").
OSVURL string `yaml:"osvUrl"`
// NPMRegistryURL and PyPIURL are where S7 asks whether a declared
// server's pinned version is published. Empty means
// https://registry.npmjs.org and https://pypi.org; "none" in
// NPMRegistryURL stops S7 asking either, and the report says it did not
// check.
NPMRegistryURL string `yaml:"npmRegistryUrl"`
PyPIURL string `yaml:"pypiUrl"`
}
Scan configures the external scanner tools behind the scanner seams. Every field is optional: unset, the native Go scanners run alone.
type Signing ¶
type Signing struct {
Kind string `yaml:"kind"` // kms | file | none
KMSKeyARN string `yaml:"kmsKeyARN"`
// KMSRegion overrides the ambient AWS region for the KMS client. Empty
// uses the credential chain's region.
KMSRegion string `yaml:"kmsRegion"`
KeyFile string `yaml:"keyFile"`
// NotBefore/NotAfter bound the ACTIVE key's validity window, RFC3339
// (the discovery document carries a validity window per key). Both
// optional; an empty side is unbounded.
NotBefore string `yaml:"notBefore"`
NotAfter string `yaml:"notAfter"`
// AdditionalKeys are verification-only public keys published alongside
// the active one. Rotation works by OVERLAPPING validity windows, which
// is only representable if the endpoint can serve more than one key:
// during a rotation the outgoing key stays listed, with a notAfter, until
// every attestation it signed has been re-verified or aged out.
//
// YAML/file only — a list does not map onto a single env var, and the
// values are public keys, not secrets.
AdditionalKeys []VerificationKey `yaml:"additionalKeys"`
}
Signing configures attestation signing: kms | file | none(dev).
type Storage ¶
type Storage struct {
Kind string `yaml:"kind"` // local | s3
LocalDir string `yaml:"localDir"`
S3Bucket string `yaml:"s3Bucket"`
S3Region string `yaml:"s3Region"`
// S3Prefix is an optional key prefix inside the bucket, letting one
// bucket host several environments.
S3Prefix string `yaml:"s3Prefix"`
// S3Endpoint overrides the AWS endpoint (MinIO in the compose dev stack,
// or an S3-compatible store self-hosted). Empty uses AWS.
S3Endpoint string `yaml:"s3Endpoint"`
// S3UsePathStyle addresses buckets as {endpoint}/{bucket}/{key} rather
// than by virtual host. Required by MinIO; AWS does not need it.
S3UsePathStyle bool `yaml:"s3UsePathStyle"`
}
Storage selects the archive/evidence object store: local FS (self-host, dev) or S3 (SaaS).
type Telemetry ¶
type Telemetry struct {
// OTLPEndpoint is the collector base URL, e.g. http://localhost:4318 for
// the ADOT sidecar. Empty disables OTLP export; /metrics stays on either
// way, so a self-hosted instance is never dark.
OTLPEndpoint string `yaml:"otlpEndpoint"`
// ExportInterval is the OTLP flush period (default 30s, matching the
// collector's batch timeout).
ExportInterval time.Duration `yaml:"exportInterval"`
// QueueSampleInterval is how often the worker publishes queue depth and
// oldest-job age. It bounds how stale the queue-age page alarm can
// be, so it must stay well under the 15-minute alarm threshold.
QueueSampleInterval time.Duration `yaml:"queueSampleInterval"`
}
Telemetry configures the metric exporters.
type UI ¶
type UI struct {
Mode string `yaml:"mode"`
}
UI selects how much of the server's own browser surface (/ui/…) is served: full (device authorize, sign-in, account, review, staff, org admin), authorize (only the device-authorize page — what a deployment with a site in front uses), or off.
type VerificationKey ¶
type VerificationKey struct {
KeyID string `yaml:"keyId"`
Algorithm string `yaml:"algorithm"` // default ecdsa-p256-sha256
// Exactly one of PublicKeyPEM (inline) or PublicKeyFile (path) is used.
PublicKeyPEM string `yaml:"publicKeyPem"`
PublicKeyFile string `yaml:"publicKeyFile"`
NotBefore string `yaml:"notBefore"` // RFC3339, optional
NotAfter string `yaml:"notAfter"` // RFC3339, optional
}
VerificationKey is one published entry in signing-keys.json.
type Web ¶
type Web struct {
// URL is the site's origin, e.g. https://agentry.example (no path).
URL string `yaml:"url"`
}
Web names a front end that fronts this server: the hosted site, or any other. When URL is set, every browser destination the API writes (where a failed sign-in lands, where a signed-in browser goes, where an email link points, where sign-out ends) is a page of that site. When it is unset the server points at its own pages under /ui/.
type WebSearch ¶
type WebSearch struct {
Provider string `yaml:"provider"`
BaseURL string `yaml:"baseUrl"`
APIKey string `yaml:"apiKey"`
}
WebSearch is the web search provider the registry brokers for the model-input search route: the Drafter's `web_search`, with the key held here beside the judge's so no sandbox host gains one. Provider is none (the default: the route answers 503), youcom (You.com's Web Search API), brave (Brave's LLM Context API), or tavily, exa or perplexity, which are there for a person's own key. AGENTRY_WEB_SEARCH_PROVIDER, AGENTRY_WEB_SEARCH_BASE_URL and AGENTRY_WEB_SEARCH_API_KEY set them; the key is never logged.