CedarV1Policy 스키마
CedarV1Policy 스키마
Cedar:V1 정책 본문이에요. PolicySummary.type이 cedar_v1일 때 Policy에 나타나요. Cedar 정책은 규칙 하위 리소스 대신 text에 규칙을 직접 인코딩하며, Cedar 정책에는 규칙 엔드포인트를 사용할 수 없어요.
출처: 문서
본문
스키마 — CedarV1Policy · 유형: object
Cedar:V1 정책 본문이에요. PolicySummary.type이 cedar_v1일 때 Policy에 나타나요. Cedar 정책은 규칙 하위 리소스 대신 text에 규칙을 직접 인코딩하며, Cedar 정책에는 규칙 엔드포인트를 사용할 수 없어요.
schema_url · 필수 — 유형: string — 이 정책을 작성할 때 기준이 된 Cedar 스키마의 URL. 평가기는 내장 레지스트리에서 이 URL로 스키마를 찾아요. MCP 정책에는 https://schemas.docker.com/policy/cedar/v1/mcp/v0을 사용하세요.
{
"description": "URL of the Cedar schema this policy was authored against. The evaluator looks up the schema by this URL from its built-in registry. Use `https://schemas.docker.com/policy/cedar/v1/mcp/v0` for MCP policies.\n",
"examples": [
"https://schemas.docker.com/policy/cedar/v1/mcp/v0"
],
"type": "string"
}
text · 필수 — 유형: string — 하나 이상의 Cedar permit 또는 forbid 문. 문법적으로 유효한 Cedar여야 하며 @id 어노테이션을 담아서는 안 돼요(ID는 서버가 지정).
{
"description": "One or more Cedar `permit` or `forbid` statements. Must be syntactically valid Cedar and must not carry an `@id` annotation (IDs are server-assigned).\n",
"examples": [
"permit(principal, action == MCP::Action::\"call_tool\", resource is MCP::Tool);"
],
"type": "string"
}
전체 스키마:
{
"description": "Cedar:V1 policy body. Present on `Policy` when `PolicySummary.type` is `cedar_v1`. Cedar policies encode their rules directly in `text` rather than in the rules sub-resource; the rules endpoints are not available for Cedar policies.\n",
"properties": {
"schema_url": {
"description": "URL of the Cedar schema this policy was authored against. The evaluator looks up the schema by this URL from its built-in registry. Use `https://schemas.docker.com/policy/cedar/v1/mcp/v0` for MCP policies.\n",
"examples": [
"https://schemas.docker.com/policy/cedar/v1/mcp/v0"
],
"type": "string"
},
"text": {
"description": "One or more Cedar `permit` or `forbid` statements. Must be syntactically valid Cedar and must not carry an `@id` annotation (IDs are server-assigned).\n",
"examples": [
"permit(principal, action == MCP::Action::\"call_tool\", resource is MCP::Tool);"
],
"type": "string"
}
},
"required": [
"text",
"schema_url"
],
"type": "object"
}