mirror of
https://github.com/mcloh/Enterprise-MCP-Service-Bus.git
synced 2026-11-06 06:24:12 +00:00
M0 e M1 revisados e fixes implementados
This commit is contained in:
60
RI/schemas/approval-request.schema.json
Normal file
60
RI/schemas/approval-request.schema.json
Normal file
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"properties": {
|
||||
"approval_id": {
|
||||
"title": "Approval Id",
|
||||
"type": "string"
|
||||
},
|
||||
"arguments_summary": {
|
||||
"additionalProperties": true,
|
||||
"title": "Arguments Summary",
|
||||
"type": "object"
|
||||
},
|
||||
"client_profile": {
|
||||
"title": "Client Profile",
|
||||
"type": "string"
|
||||
},
|
||||
"expires_at": {
|
||||
"format": "date-time",
|
||||
"title": "Expires At",
|
||||
"type": "string"
|
||||
},
|
||||
"operation_hash": {
|
||||
"title": "Operation Hash",
|
||||
"type": "string"
|
||||
},
|
||||
"reason_code": {
|
||||
"title": "Reason Code",
|
||||
"type": "string"
|
||||
},
|
||||
"requested_at": {
|
||||
"format": "date-time",
|
||||
"title": "Requested At",
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"default": "pending",
|
||||
"enum": [
|
||||
"pending",
|
||||
"granted",
|
||||
"denied",
|
||||
"consumed"
|
||||
],
|
||||
"title": "Status",
|
||||
"type": "string"
|
||||
},
|
||||
"tool": {
|
||||
"title": "Tool",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"operation_hash",
|
||||
"client_profile",
|
||||
"tool",
|
||||
"arguments_summary",
|
||||
"reason_code",
|
||||
"expires_at"
|
||||
],
|
||||
"title": "ApprovalRequest",
|
||||
"type": "object"
|
||||
}
|
||||
56
RI/schemas/backend-credentials.schema.json
Normal file
56
RI/schemas/backend-credentials.schema.json
Normal file
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"properties": {
|
||||
"audience": {
|
||||
"title": "Audience",
|
||||
"type": "string"
|
||||
},
|
||||
"backend": {
|
||||
"title": "Backend",
|
||||
"type": "string"
|
||||
},
|
||||
"credential_mode": {
|
||||
"default": "service_account",
|
||||
"enum": [
|
||||
"service_account",
|
||||
"token_exchange"
|
||||
],
|
||||
"title": "Credential Mode",
|
||||
"type": "string"
|
||||
},
|
||||
"service_account_token_env_var": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null,
|
||||
"title": "Service Account Token Env Var"
|
||||
},
|
||||
"token_exchange_endpoint": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null,
|
||||
"title": "Token Exchange Endpoint"
|
||||
},
|
||||
"url": {
|
||||
"title": "Url",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"backend",
|
||||
"url",
|
||||
"audience"
|
||||
],
|
||||
"title": "BackendConfig",
|
||||
"type": "object"
|
||||
}
|
||||
199
RI/schemas/capability-manifest.schema.json
Normal file
199
RI/schemas/capability-manifest.schema.json
Normal file
@@ -0,0 +1,199 @@
|
||||
{
|
||||
"$defs": {
|
||||
"ApprovalPolicy": {
|
||||
"properties": {
|
||||
"required": {
|
||||
"default": false,
|
||||
"title": "Required",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"title": "ApprovalPolicy",
|
||||
"type": "object"
|
||||
},
|
||||
"BackendRef": {
|
||||
"description": "Where the Fabric (EP-06-T01) routes a capability once authorized.",
|
||||
"properties": {
|
||||
"operation": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null,
|
||||
"description": "Informational, e.g. 'GET /v2/customers/{id}' (README.md \u00a76.8).",
|
||||
"title": "Operation"
|
||||
},
|
||||
"service": {
|
||||
"description": "Adapter/service id the Fabric router resolves, e.g. 'sales-domain'.",
|
||||
"title": "Service",
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"default": "mcp",
|
||||
"enum": [
|
||||
"rest",
|
||||
"mcp",
|
||||
"grpc"
|
||||
],
|
||||
"title": "Type",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"service"
|
||||
],
|
||||
"title": "BackendRef",
|
||||
"type": "object"
|
||||
},
|
||||
"DataClassification": {
|
||||
"enum": [
|
||||
"public",
|
||||
"internal",
|
||||
"confidential",
|
||||
"restricted"
|
||||
],
|
||||
"title": "DataClassification",
|
||||
"type": "string"
|
||||
},
|
||||
"LifecycleInfo": {
|
||||
"properties": {
|
||||
"status": {
|
||||
"$ref": "#/$defs/LifecycleStatus",
|
||||
"default": "nominate"
|
||||
},
|
||||
"sunset_after": {
|
||||
"anyOf": [
|
||||
{
|
||||
"format": "date",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null,
|
||||
"title": "Sunset After"
|
||||
}
|
||||
},
|
||||
"title": "LifecycleInfo",
|
||||
"type": "object"
|
||||
},
|
||||
"LifecycleStatus": {
|
||||
"description": "Registry governance lifecycle (README.md \u00a723).",
|
||||
"enum": [
|
||||
"nominate",
|
||||
"review",
|
||||
"register",
|
||||
"active",
|
||||
"deprecated",
|
||||
"retired"
|
||||
],
|
||||
"title": "LifecycleStatus",
|
||||
"type": "string"
|
||||
},
|
||||
"ObservabilityPolicy": {
|
||||
"properties": {
|
||||
"audit_level": {
|
||||
"default": "full",
|
||||
"enum": [
|
||||
"none",
|
||||
"standard",
|
||||
"full"
|
||||
],
|
||||
"title": "Audit Level",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "ObservabilityPolicy",
|
||||
"type": "object"
|
||||
},
|
||||
"RiskTier": {
|
||||
"description": "Capability/client risk classification (README.md \u00a717).\n\nR0 discovery/public, R1 read, R2 write, R3 high-impact (approval-eligible),\nR4 destructive/restricted. The *same* enum is used for both a capability\nmanifest's `risk_tier` (EP-02-T01) and a client profile's `risk_ceiling`\n(EP-04-T01) so entitlement resolution (EP-04-T02) can compare them\ndirectly instead of maintaining two parallel classifications.",
|
||||
"enum": [
|
||||
"R0",
|
||||
"R1",
|
||||
"R2",
|
||||
"R3",
|
||||
"R4"
|
||||
],
|
||||
"title": "RiskTier",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"approval": {
|
||||
"$ref": "#/$defs/ApprovalPolicy"
|
||||
},
|
||||
"backend": {
|
||||
"$ref": "#/$defs/BackendRef"
|
||||
},
|
||||
"data_classification": {
|
||||
"items": {
|
||||
"$ref": "#/$defs/DataClassification"
|
||||
},
|
||||
"title": "Data Classification",
|
||||
"type": "array"
|
||||
},
|
||||
"domain": {
|
||||
"title": "Domain",
|
||||
"type": "string"
|
||||
},
|
||||
"entitlements": {
|
||||
"description": "ClientProfile names required to see/call this capability (EP-04).",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"minItems": 1,
|
||||
"title": "Entitlements",
|
||||
"type": "array"
|
||||
},
|
||||
"idempotent": {
|
||||
"title": "Idempotent",
|
||||
"type": "boolean"
|
||||
},
|
||||
"lifecycle": {
|
||||
"$ref": "#/$defs/LifecycleInfo"
|
||||
},
|
||||
"name": {
|
||||
"description": "Canonical '<domain>.<capability>' name (README.md \u00a739).",
|
||||
"title": "Name",
|
||||
"type": "string"
|
||||
},
|
||||
"observability": {
|
||||
"$ref": "#/$defs/ObservabilityPolicy"
|
||||
},
|
||||
"owner": {
|
||||
"title": "Owner",
|
||||
"type": "string"
|
||||
},
|
||||
"risk_tier": {
|
||||
"$ref": "#/$defs/RiskTier"
|
||||
},
|
||||
"side_effects": {
|
||||
"title": "Side Effects",
|
||||
"type": "boolean"
|
||||
},
|
||||
"version": {
|
||||
"description": "SemVer, e.g. '1.2.0' (README.md \u00a740).",
|
||||
"title": "Version",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"version",
|
||||
"domain",
|
||||
"owner",
|
||||
"risk_tier",
|
||||
"side_effects",
|
||||
"idempotent",
|
||||
"entitlements",
|
||||
"backend"
|
||||
],
|
||||
"title": "CapabilityManifest",
|
||||
"type": "object"
|
||||
}
|
||||
148
RI/schemas/client-profile.schema.json
Normal file
148
RI/schemas/client-profile.schema.json
Normal file
@@ -0,0 +1,148 @@
|
||||
{
|
||||
"$defs": {
|
||||
"AuditPolicy": {
|
||||
"properties": {
|
||||
"level": {
|
||||
"default": "full",
|
||||
"enum": [
|
||||
"none",
|
||||
"standard",
|
||||
"full"
|
||||
],
|
||||
"title": "Level",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "AuditPolicy",
|
||||
"type": "object"
|
||||
},
|
||||
"CredentialPolicy": {
|
||||
"properties": {
|
||||
"short_lived": {
|
||||
"default": true,
|
||||
"title": "Short Lived",
|
||||
"type": "boolean"
|
||||
},
|
||||
"workload_identity": {
|
||||
"default": true,
|
||||
"title": "Workload Identity",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"title": "CredentialPolicy",
|
||||
"type": "object"
|
||||
},
|
||||
"RiskTier": {
|
||||
"description": "Capability/client risk classification (README.md \u00a717).\n\nR0 discovery/public, R1 read, R2 write, R3 high-impact (approval-eligible),\nR4 destructive/restricted. The *same* enum is used for both a capability\nmanifest's `risk_tier` (EP-02-T01) and a client profile's `risk_ceiling`\n(EP-04-T01) so entitlement resolution (EP-04-T02) can compare them\ndirectly instead of maintaining two parallel classifications.",
|
||||
"enum": [
|
||||
"R0",
|
||||
"R1",
|
||||
"R2",
|
||||
"R3",
|
||||
"R4"
|
||||
],
|
||||
"title": "RiskTier",
|
||||
"type": "string"
|
||||
},
|
||||
"TransactionRestrictions": {
|
||||
"description": "Argument/resource-level bounds enforced by the Transaction Policy (EP-03-T03).\n\nThese are *hints* carried alongside the profile for the PDP's Rego data\ndocument -- the PDP, not this model, is the authority that actually\nenforces them (README.md \u00a76.5.B, \u00a725 Passo 2).",
|
||||
"properties": {
|
||||
"allowed_regions": {
|
||||
"anyOf": [
|
||||
{
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null,
|
||||
"title": "Allowed Regions"
|
||||
},
|
||||
"approval_threshold": {
|
||||
"anyOf": [
|
||||
{
|
||||
"minimum": 0,
|
||||
"type": "integer"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null,
|
||||
"description": "Above this `arguments.amount`, the transaction policy returns REQUIRE_APPROVAL instead of ALLOW (README.md \u00a726 example: payment.execute < 10k ALLOW, >= 10k REQUIRE_APPROVAL).",
|
||||
"title": "Approval Threshold"
|
||||
},
|
||||
"max_transaction_value": {
|
||||
"anyOf": [
|
||||
{
|
||||
"minimum": 0,
|
||||
"type": "integer"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null,
|
||||
"title": "Max Transaction Value"
|
||||
}
|
||||
},
|
||||
"title": "TransactionRestrictions",
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"description": "A governed client profile (README.md \u00a741 example).",
|
||||
"properties": {
|
||||
"allowed_tools": {
|
||||
"description": "Canonical <domain>.<capability> tool names (README.md \u00a739).",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"minItems": 1,
|
||||
"title": "Allowed Tools",
|
||||
"type": "array"
|
||||
},
|
||||
"audit": {
|
||||
"$ref": "#/$defs/AuditPolicy"
|
||||
},
|
||||
"credential_policy": {
|
||||
"$ref": "#/$defs/CredentialPolicy"
|
||||
},
|
||||
"environment": {
|
||||
"default": "production",
|
||||
"enum": [
|
||||
"dev",
|
||||
"ci",
|
||||
"production"
|
||||
],
|
||||
"title": "Environment",
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"description": "e.g. \"Sales.Read\", \"Finance.Payments\" (README.md \u00a77.1).",
|
||||
"title": "Name",
|
||||
"type": "string"
|
||||
},
|
||||
"owner": {
|
||||
"title": "Owner",
|
||||
"type": "string"
|
||||
},
|
||||
"restrictions": {
|
||||
"$ref": "#/$defs/TransactionRestrictions"
|
||||
},
|
||||
"risk_ceiling": {
|
||||
"$ref": "#/$defs/RiskTier"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"owner",
|
||||
"risk_ceiling",
|
||||
"allowed_tools"
|
||||
],
|
||||
"title": "ClientProfile",
|
||||
"type": "object"
|
||||
}
|
||||
40
RI/schemas/client-registration.schema.json
Normal file
40
RI/schemas/client-registration.schema.json
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"properties": {
|
||||
"client_id": {
|
||||
"title": "Client Id",
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null,
|
||||
"title": "Description"
|
||||
},
|
||||
"environment": {
|
||||
"default": "production",
|
||||
"enum": [
|
||||
"dev",
|
||||
"ci",
|
||||
"production"
|
||||
],
|
||||
"title": "Environment",
|
||||
"type": "string"
|
||||
},
|
||||
"profile": {
|
||||
"title": "Profile",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"client_id",
|
||||
"profile"
|
||||
],
|
||||
"title": "ClientRegistration",
|
||||
"type": "object"
|
||||
}
|
||||
33
RI/schemas/pdp-decision.schema.json
Normal file
33
RI/schemas/pdp-decision.schema.json
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"$defs": {
|
||||
"PDPOutcome": {
|
||||
"enum": [
|
||||
"ALLOW",
|
||||
"DENY",
|
||||
"REQUIRE_APPROVAL"
|
||||
],
|
||||
"title": "PDPOutcome",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"outcome": {
|
||||
"$ref": "#/$defs/PDPOutcome"
|
||||
},
|
||||
"policy_version": {
|
||||
"title": "Policy Version",
|
||||
"type": "string"
|
||||
},
|
||||
"reason_code": {
|
||||
"title": "Reason Code",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"outcome",
|
||||
"policy_version",
|
||||
"reason_code"
|
||||
],
|
||||
"title": "PDPDecision",
|
||||
"type": "object"
|
||||
}
|
||||
Reference in New Issue
Block a user