{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://secretspec.dev/schema/ipc/v1/resolver.schema.json",
"title": "SecretSpec Secret Resolution Protocol version 1",
"$defs": {
"PathManifest": {
"type": "object",
"additionalProperties": false,
"required": ["kind", "path"],
"properties": {
"kind": { "const": "path" },
"path": { "type": "string", "minLength": 1, "maxLength": 32768 }
}
},
"InlineManifest": {
"type": "object",
"additionalProperties": false,
"required": ["kind", "toml", "base_dir"],
"properties": {
"kind": { "const": "inline" },
"toml": { "type": "string", "maxLength": 1048576 },
"base_dir": { "type": "string", "minLength": 1, "maxLength": 32768 }
}
},
"Manifest": {
"oneOf": [
{ "$ref": "#/$defs/PathManifest" },
{ "$ref": "#/$defs/InlineManifest" }
]
},
"InitializeApplication": {
"type": "object",
"additionalProperties": false,
"required": ["manifest", "provider", "profile", "scope", "reason"],
"properties": {
"manifest": { "$ref": "#/$defs/Manifest" },
"provider": { "type": ["string", "null"], "maxLength": 32768 },
"profile": { "type": ["string", "null"], "maxLength": 4096 },
"scope": { "type": ["string", "null"], "maxLength": 4096 },
"reason": { "type": ["string", "null"], "maxLength": 4096 },
"requested_authorization_duration_ms": { "type": "integer", "minimum": 1, "maximum": 18446744073709551615 }
}
},
"InitializedApplication": {
"type": "object",
"additionalProperties": false,
"required": ["manifest_kind", "supports_inline_manifest"],
"properties": {
"manifest_kind": { "type": "string", "enum": ["path", "inline"] },
"supports_inline_manifest": { "type": "boolean" }
}
},
"InitializeParams": {
"type": "object",
"additionalProperties": false,
"required": ["protocol", "versions", "client", "limits", "application"],
"properties": {
"protocol": { "const": "secretspec.resolver" },
"versions": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": { "type": "integer", "minimum": 1, "maximum": 4294967295 }
},
"client": { "$ref": "common.schema.json#/$defs/Product" },
"limits": { "$ref": "common.schema.json#/$defs/Limits" },
"client_methods": { "$ref": "common.schema.json#/$defs/Methods" },
"application": { "$ref": "#/$defs/InitializeApplication" }
}
},
"InitializeResult": {
"type": "object",
"additionalProperties": false,
"required": ["protocol", "version", "server", "methods", "capabilities", "limits", "application"],
"properties": {
"protocol": { "const": "secretspec.resolver" },
"version": { "const": 1 },
"server": { "$ref": "common.schema.json#/$defs/Product" },
"methods": { "$ref": "common.schema.json#/$defs/Methods" },
"capabilities": { "$ref": "common.schema.json#/$defs/Capabilities" },
"limits": { "$ref": "common.schema.json#/$defs/Limits" },
"application": { "$ref": "#/$defs/InitializedApplication" }
}
},
"Purpose": {
"type": "object",
"additionalProperties": false,
"required": ["consumer", "operation"],
"properties": {
"consumer": { "type": "string", "minLength": 1, "maxLength": 256 },
"operation": { "type": "string", "minLength": 1, "maxLength": 256 },
"host": { "type": "string", "maxLength": 4096 },
"path": { "type": "string", "maxLength": 4096 }
}
},
"GetParams": {
"type": "object",
"additionalProperties": false,
"required": ["name", "representation", "purpose"],
"properties": {
"name": { "type": "string", "minLength": 1, "maxLength": 4096 },
"representation": { "type": "string", "enum": ["auto", "value", "path"] },
"purpose": { "$ref": "#/$defs/Purpose" }
}
},
"UndeclaredResult": {
"type": "object",
"additionalProperties": false,
"required": ["status"],
"properties": { "status": { "const": "undeclared" } }
},
"MissingResult": {
"type": "object",
"additionalProperties": false,
"required": ["status", "required"],
"properties": {
"status": { "const": "missing" },
"required": { "type": "boolean" }
}
},
"ResolvedValueResult": {
"type": "object",
"additionalProperties": false,
"required": ["status", "representation", "value", "source", "expires_at_unix_ms", "refresh_at_unix_ms"],
"properties": {
"status": { "const": "resolved" },
"representation": { "const": "value" },
"value": { "type": "string" },
"source": { "description": "Origins a conforming version 1 resolver emits. Closed for the resolver, open for the client, like ErrorKind.", "type": "string", "enum": ["provider", "generated", "default", "composed"] },
"source_provider": { "type": "string", "maxLength": 32768 },
"revision": {
"description": "Optional non-secret identity/generation of the returned value (0.21+); absent or null means unknown.",
"type": ["string", "null"],
"minLength": 1,
"maxLength": 256,
"pattern": "^[A-Za-z0-9._:-]+$"
},
"expires_at_unix_ms": {
"description": "Provider-reported time at which the secret itself expires. Null means no bound is known, not that the secret is permanent.",
"oneOf": [
{ "$ref": "common.schema.json#/$defs/DeadlineUnixMs" },
{ "type": "null" }
]
},
"refresh_at_unix_ms": {
"description": "When the resolver stops considering its cached copy current and will consult the authoritative route again. Null means this result was not served from a resolver cache.",
"oneOf": [
{ "$ref": "common.schema.json#/$defs/DeadlineUnixMs" },
{ "type": "null" }
]
}
}
},
"ResolvedPathResult": {
"type": "object",
"additionalProperties": false,
"required": ["status", "representation", "path", "path_lease_id", "source", "expires_at_unix_ms", "refresh_at_unix_ms"],
"properties": {
"status": { "const": "resolved" },
"representation": { "const": "path" },
"path": { "type": "string", "minLength": 1, "maxLength": 32768 },
"path_lease_id": { "type": "string", "minLength": 22, "maxLength": 256 },
"source": { "description": "Origins a conforming version 1 resolver emits. Closed for the resolver, open for the client, like ErrorKind.", "type": "string", "enum": ["provider", "generated", "default", "composed"] },
"source_provider": { "type": "string", "maxLength": 32768 },
"revision": {
"description": "Optional non-secret identity/generation of the returned value (0.21+); absent or null means unknown.",
"type": ["string", "null"],
"minLength": 1,
"maxLength": 256,
"pattern": "^[A-Za-z0-9._:-]+$"
},
"expires_at_unix_ms": {
"description": "Provider-reported time at which the secret itself expires. Null means no bound is known, not that the secret is permanent.",
"oneOf": [
{ "$ref": "common.schema.json#/$defs/DeadlineUnixMs" },
{ "type": "null" }
]
},
"refresh_at_unix_ms": {
"description": "When the resolver stops considering its cached copy current and will consult the authoritative route again. Null means this result was not served from a resolver cache.",
"oneOf": [
{ "$ref": "common.schema.json#/$defs/DeadlineUnixMs" },
{ "type": "null" }
]
}
}
},
"GetResult": {
"oneOf": [
{ "$ref": "#/$defs/UndeclaredResult" },
{ "$ref": "#/$defs/MissingResult" },
{ "$ref": "#/$defs/ResolvedValueResult" },
{ "$ref": "#/$defs/ResolvedPathResult" }
]
},
"PromptParams": {
"type": "object",
"additionalProperties": false,
"required": ["name", "profile"],
"properties": {
"name": { "type": "string", "minLength": 1, "maxLength": 4096 },
"profile": { "type": "string", "minLength": 1, "maxLength": 4096 },
"target_provider": { "type": "string", "maxLength": 32768 }
}
},
"PromptResult": {
"type": "object",
"additionalProperties": false,
"required": ["value"],
"properties": {
"value": { "type": "string", "minLength": 1, "maxLength": 1048576 }
}
},
"SetParams": {
"type": "object",
"additionalProperties": false,
"required": ["name", "value", "purpose"],
"properties": {
"name": { "type": "string", "minLength": 1, "maxLength": 4096 },
"value": { "type": "string", "minLength": 1, "maxLength": 1048576 },
"purpose": { "$ref": "#/$defs/Purpose" }
}
},
"SetResult": {
"type": "object",
"additionalProperties": false,
"required": ["status"],
"properties": {
"status": { "const": "stored" },
"target_provider": { "type": "string", "maxLength": 32768 }
}
},
"DeleteParams": {
"type": "object",
"additionalProperties": false,
"required": ["name", "purpose"],
"properties": {
"name": { "type": "string", "minLength": 1, "maxLength": 4096 },
"purpose": { "$ref": "#/$defs/Purpose" }
}
},
"DeleteResult": {
"type": "object",
"additionalProperties": false,
"required": ["status", "deleted"],
"properties": {
"status": { "const": "deleted" },
"deleted": { "type": "boolean" },
"target_provider": { "type": "string", "maxLength": 32768 }
}
},
"ReleaseParams": {
"type": "object",
"additionalProperties": false,
"required": ["path_lease_ids"],
"properties": {
"path_lease_ids": {
"type": "array",
"maxItems": 256,
"items": { "type": "string", "minLength": 1, "maxLength": 256 }
}
}
},
"ReleaseResult": {
"type": "object",
"additionalProperties": false,
"required": ["released"],
"properties": {
"released": { "type": "integer", "minimum": 0, "maximum": 256 }
}
}
}
}