AccessGate 0.2.0a1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- access_gate/__init__.py +118 -0
- access_gate/abac.py +1081 -0
- access_gate/adapters/__init__.py +5 -0
- access_gate/adapters/django.py +177 -0
- access_gate/engine.py +224 -0
- access_gate/exceptions.py +13 -0
- access_gate/integrity.py +262 -0
- access_gate/mcp/__init__.py +1 -0
- access_gate/mcp/agent-contract.json +419 -0
- access_gate/mcp/server.py +378 -0
- access_gate/policies.py +242 -0
- access_gate/protocols.py +51 -0
- access_gate/py.typed +0 -0
- access_gate/schema/abac-policy-v1.json +113 -0
- access_gate/strategies.py +28 -0
- access_gate/types.py +315 -0
- accessgate-0.2.0a1.dist-info/METADATA +287 -0
- accessgate-0.2.0a1.dist-info/RECORD +22 -0
- accessgate-0.2.0a1.dist-info/WHEEL +5 -0
- accessgate-0.2.0a1.dist-info/entry_points.txt +2 -0
- accessgate-0.2.0a1.dist-info/licenses/LICENSE +21 -0
- accessgate-0.2.0a1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "tunet.opensource-agent-mcp.v1",
|
|
3
|
+
"offering": {
|
|
4
|
+
"id": "access_gate",
|
|
5
|
+
"name": "AccessGate",
|
|
6
|
+
"packageName": "AccessGate",
|
|
7
|
+
"status": "alpha",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"purpose": "Composable, default-deny authorization for Python applications with RBAC, ABAC, and lightweight relationship-policy support.",
|
|
10
|
+
"audiences": [
|
|
11
|
+
"python-developer",
|
|
12
|
+
"security-engineer",
|
|
13
|
+
"platform-engineer",
|
|
14
|
+
"customer-agent",
|
|
15
|
+
"maintainer-agent"
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"server": {
|
|
19
|
+
"name": "access-gate-public-contract-mcp",
|
|
20
|
+
"title": "AccessGate Public Agent Contract",
|
|
21
|
+
"version": "0.2.0a1",
|
|
22
|
+
"transport": "stdio",
|
|
23
|
+
"required": true,
|
|
24
|
+
"hostedEndpoint": "https://github.com/Tunet-xyz/access_gate/tree/main/mcp"
|
|
25
|
+
},
|
|
26
|
+
"instructions": "Use AccessGate to design and validate authorization policies, not to authenticate callers or infer permissions from unverified data. Prefer synthetic examples, preserve exact action and attribute matching, and require review before production rollout.",
|
|
27
|
+
"publicAccess": {
|
|
28
|
+
"mcpEndpoint": "dependency-free stdio server in the package and repository mcp/ directory",
|
|
29
|
+
"pythonPackage": "pip install AccessGate",
|
|
30
|
+
"pythonApi": [
|
|
31
|
+
"AuthorizationEngine",
|
|
32
|
+
"RolePolicy",
|
|
33
|
+
"AttributePolicy",
|
|
34
|
+
"TenantBoundaryPolicy",
|
|
35
|
+
"OwnerPolicy",
|
|
36
|
+
"OperatorRegistry"
|
|
37
|
+
],
|
|
38
|
+
"cli": [
|
|
39
|
+
"accessgate-mcp"
|
|
40
|
+
],
|
|
41
|
+
"docsUrl": "https://github.com/Tunet-xyz/access_gate#readme",
|
|
42
|
+
"pypiUrl": "https://pypi.org/project/AccessGate/",
|
|
43
|
+
"repositoryUrl": "https://github.com/Tunet-xyz/access_gate",
|
|
44
|
+
"supportedOperationModes": [
|
|
45
|
+
"mcp-tools",
|
|
46
|
+
"python-api",
|
|
47
|
+
"browser-docs"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"resources": [
|
|
51
|
+
{
|
|
52
|
+
"uri": "opensource://access_gate/overview",
|
|
53
|
+
"name": "overview",
|
|
54
|
+
"title": "Offering Overview",
|
|
55
|
+
"description": "What AccessGate does and where its trust boundary ends.",
|
|
56
|
+
"mimeType": "text/markdown",
|
|
57
|
+
"content": "# AccessGate\n\nAccessGate evaluates whether a subject may perform an action on a resource in a context. It supports exact RBAC grants, declarative ABAC conditions, tenant and ownership boundaries, custom policies, custom decision strategies, custom operands and locally scoped custom operators. It does not authenticate identities, verify tokens, secure sessions, or query application data."
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"uri": "opensource://access_gate/authorization-models",
|
|
61
|
+
"name": "authorization-models",
|
|
62
|
+
"title": "Authorization Models",
|
|
63
|
+
"description": "Public APIs for RBAC, ABAC, and lightweight relationship policies.",
|
|
64
|
+
"mimeType": "application/json",
|
|
65
|
+
"data": {
|
|
66
|
+
"rbac": [
|
|
67
|
+
"RolePolicy",
|
|
68
|
+
"AuthenticatedPolicy"
|
|
69
|
+
],
|
|
70
|
+
"abac": [
|
|
71
|
+
"AttributePolicy",
|
|
72
|
+
"SubjectAttribute",
|
|
73
|
+
"ResourceAttribute",
|
|
74
|
+
"ActionAttribute",
|
|
75
|
+
"ContextAttribute",
|
|
76
|
+
"AllOf",
|
|
77
|
+
"AnyOf",
|
|
78
|
+
"Not"
|
|
79
|
+
],
|
|
80
|
+
"relationship": [
|
|
81
|
+
"OwnerPolicy",
|
|
82
|
+
"TenantBoundaryPolicy"
|
|
83
|
+
],
|
|
84
|
+
"composition": [
|
|
85
|
+
"AuthorizationEngine",
|
|
86
|
+
"DenyOverrides",
|
|
87
|
+
"MissEffect"
|
|
88
|
+
],
|
|
89
|
+
"customization": [
|
|
90
|
+
"Policy",
|
|
91
|
+
"DecisionStrategy",
|
|
92
|
+
"OperatorRegistry",
|
|
93
|
+
"SubjectResolver",
|
|
94
|
+
"ResourceResolver",
|
|
95
|
+
"AuditSink"
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"uri": "opensource://access_gate/abac-semantics",
|
|
101
|
+
"name": "abac-semantics",
|
|
102
|
+
"title": "ABAC Safety Semantics",
|
|
103
|
+
"description": "How declarative attribute conditions remain fail closed.",
|
|
104
|
+
"mimeType": "application/json",
|
|
105
|
+
"data": {
|
|
106
|
+
"namespaces": [
|
|
107
|
+
"subject",
|
|
108
|
+
"resource",
|
|
109
|
+
"action",
|
|
110
|
+
"context"
|
|
111
|
+
],
|
|
112
|
+
"states": [
|
|
113
|
+
"match",
|
|
114
|
+
"no_match",
|
|
115
|
+
"indeterminate"
|
|
116
|
+
],
|
|
117
|
+
"builtInOperators": [
|
|
118
|
+
"contains",
|
|
119
|
+
"eq",
|
|
120
|
+
"exists",
|
|
121
|
+
"gt",
|
|
122
|
+
"gte",
|
|
123
|
+
"in",
|
|
124
|
+
"intersects",
|
|
125
|
+
"lt",
|
|
126
|
+
"lte",
|
|
127
|
+
"neq",
|
|
128
|
+
"not_contains",
|
|
129
|
+
"not_exists",
|
|
130
|
+
"not_in",
|
|
131
|
+
"subset_of",
|
|
132
|
+
"superset_of"
|
|
133
|
+
],
|
|
134
|
+
"safeguards": [
|
|
135
|
+
"mapping-only path traversal",
|
|
136
|
+
"no eval",
|
|
137
|
+
"no implicit string substring membership",
|
|
138
|
+
"missing operands are indeterminate",
|
|
139
|
+
"negation preserves indeterminate",
|
|
140
|
+
"operator exceptions are redacted and indeterminate"
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"uri": "opensource://access_gate/workflows",
|
|
146
|
+
"name": "workflows",
|
|
147
|
+
"title": "Agent Workflow Catalog",
|
|
148
|
+
"description": "Review-first workflows external agents can prepare.",
|
|
149
|
+
"mimeType": "application/json",
|
|
150
|
+
"data": [
|
|
151
|
+
{
|
|
152
|
+
"id": "choose_model",
|
|
153
|
+
"goal": "Choose RBAC, ABAC, relationship policies, or a composition.",
|
|
154
|
+
"approval": "design review"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"id": "draft_policy",
|
|
158
|
+
"goal": "Draft a versioned access_gate.policy.v1 document.",
|
|
159
|
+
"approval": "security and application-owner review"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"id": "validate_policy",
|
|
163
|
+
"goal": "Validate syntax, schema version, operators, and safe defaults.",
|
|
164
|
+
"approval": "none; read-only"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"id": "map_framework",
|
|
168
|
+
"goal": "Map verified identity and domain objects into AccessGate resolvers.",
|
|
169
|
+
"approval": "integration review"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"id": "rollout",
|
|
173
|
+
"goal": "Prepare shadow evaluation, decision comparison, monitoring, rollback, and enforcement.",
|
|
174
|
+
"approval": "required before enforcement"
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"uri": "opensource://access_gate/security-and-audit",
|
|
180
|
+
"name": "security-and-audit",
|
|
181
|
+
"title": "Security And Audit Rules",
|
|
182
|
+
"description": "Safety expectations for agents and integrations.",
|
|
183
|
+
"mimeType": "application/json",
|
|
184
|
+
"data": {
|
|
185
|
+
"sensitiveData": [
|
|
186
|
+
"identity claims",
|
|
187
|
+
"roles",
|
|
188
|
+
"tenant identifiers",
|
|
189
|
+
"resource attributes",
|
|
190
|
+
"environment context",
|
|
191
|
+
"authorization decisions"
|
|
192
|
+
],
|
|
193
|
+
"humanApprovalRequiredFor": [
|
|
194
|
+
"production policy change",
|
|
195
|
+
"custom operator deployment",
|
|
196
|
+
"fail-open or abstain-on-error behavior",
|
|
197
|
+
"enforcement rollout"
|
|
198
|
+
],
|
|
199
|
+
"rules": [
|
|
200
|
+
"default deny",
|
|
201
|
+
"deny overrides",
|
|
202
|
+
"exact action matching",
|
|
203
|
+
"redacted decision reasons",
|
|
204
|
+
"synthetic MCP examples preferred"
|
|
205
|
+
]
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
"tools": [
|
|
210
|
+
{
|
|
211
|
+
"name": "describe_offering",
|
|
212
|
+
"title": "Describe AccessGate",
|
|
213
|
+
"description": "Explain AccessGate's authorization models, trust boundary, extension points, and secure defaults.",
|
|
214
|
+
"executionMode": "contract",
|
|
215
|
+
"inputSchema": {
|
|
216
|
+
"type": "object",
|
|
217
|
+
"properties": {}
|
|
218
|
+
},
|
|
219
|
+
"annotations": {
|
|
220
|
+
"readOnlyHint": true,
|
|
221
|
+
"destructiveHint": false
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"name": "list_authorization_models",
|
|
226
|
+
"title": "List Authorization Models",
|
|
227
|
+
"description": "List RBAC, ABAC, relationship, composition, and customization APIs.",
|
|
228
|
+
"executionMode": "contract",
|
|
229
|
+
"inputSchema": {
|
|
230
|
+
"type": "object",
|
|
231
|
+
"properties": {
|
|
232
|
+
"model": {
|
|
233
|
+
"type": "string",
|
|
234
|
+
"enum": [
|
|
235
|
+
"all",
|
|
236
|
+
"rbac",
|
|
237
|
+
"abac",
|
|
238
|
+
"relationship",
|
|
239
|
+
"custom"
|
|
240
|
+
]
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"annotations": {
|
|
245
|
+
"readOnlyHint": true,
|
|
246
|
+
"destructiveHint": false
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"name": "get_policy_schema",
|
|
251
|
+
"title": "Get ABAC Policy Schema",
|
|
252
|
+
"description": "Return the packaged access_gate.policy.v1 JSON Schema.",
|
|
253
|
+
"executionMode": "local-read",
|
|
254
|
+
"inputSchema": {
|
|
255
|
+
"type": "object",
|
|
256
|
+
"properties": {}
|
|
257
|
+
},
|
|
258
|
+
"annotations": {
|
|
259
|
+
"readOnlyHint": true,
|
|
260
|
+
"destructiveHint": false
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"name": "list_builtin_operators",
|
|
265
|
+
"title": "List Built-in ABAC Operators",
|
|
266
|
+
"description": "Return the exact built-in operator names accepted by AccessGate.",
|
|
267
|
+
"executionMode": "local-read",
|
|
268
|
+
"inputSchema": {
|
|
269
|
+
"type": "object",
|
|
270
|
+
"properties": {}
|
|
271
|
+
},
|
|
272
|
+
"annotations": {
|
|
273
|
+
"readOnlyHint": true,
|
|
274
|
+
"destructiveHint": false
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"name": "validate_policy_document",
|
|
279
|
+
"title": "Validate ABAC Policy",
|
|
280
|
+
"description": "Parse and normalize an access_gate.policy.v1 object or JSON string without evaluating real identities or resources.",
|
|
281
|
+
"executionMode": "local-read",
|
|
282
|
+
"inputSchema": {
|
|
283
|
+
"type": "object",
|
|
284
|
+
"properties": {
|
|
285
|
+
"policy": {
|
|
286
|
+
"oneOf": [
|
|
287
|
+
{
|
|
288
|
+
"type": "object"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"type": "string"
|
|
292
|
+
}
|
|
293
|
+
]
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
"required": [
|
|
297
|
+
"policy"
|
|
298
|
+
]
|
|
299
|
+
},
|
|
300
|
+
"annotations": {
|
|
301
|
+
"readOnlyHint": true,
|
|
302
|
+
"destructiveHint": false
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"name": "map_integration",
|
|
307
|
+
"title": "Map An Integration",
|
|
308
|
+
"description": "Map a framework, identity source, resources, actions, context, audit sink, rollout, and verification plan.",
|
|
309
|
+
"executionMode": "contract",
|
|
310
|
+
"inputSchema": {
|
|
311
|
+
"type": "object",
|
|
312
|
+
"properties": {
|
|
313
|
+
"framework": {
|
|
314
|
+
"type": "string"
|
|
315
|
+
},
|
|
316
|
+
"identitySource": {
|
|
317
|
+
"type": "string"
|
|
318
|
+
},
|
|
319
|
+
"authorizationGoals": {
|
|
320
|
+
"type": "string"
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
"required": [
|
|
324
|
+
"framework",
|
|
325
|
+
"authorizationGoals"
|
|
326
|
+
]
|
|
327
|
+
},
|
|
328
|
+
"annotations": {
|
|
329
|
+
"readOnlyHint": true,
|
|
330
|
+
"destructiveHint": false
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"name": "draft_policy",
|
|
335
|
+
"title": "Draft Reviewed Policy",
|
|
336
|
+
"description": "Prepare a reviewed RBAC or ABAC policy design using synthetic attributes and explicit failure behavior.",
|
|
337
|
+
"executionMode": "contract",
|
|
338
|
+
"inputSchema": {
|
|
339
|
+
"type": "object",
|
|
340
|
+
"properties": {
|
|
341
|
+
"model": {
|
|
342
|
+
"type": "string",
|
|
343
|
+
"enum": [
|
|
344
|
+
"rbac",
|
|
345
|
+
"abac",
|
|
346
|
+
"relationship",
|
|
347
|
+
"hybrid"
|
|
348
|
+
]
|
|
349
|
+
},
|
|
350
|
+
"goal": {
|
|
351
|
+
"type": "string"
|
|
352
|
+
},
|
|
353
|
+
"actions": {
|
|
354
|
+
"type": "array",
|
|
355
|
+
"items": {
|
|
356
|
+
"type": "string"
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
"required": [
|
|
361
|
+
"model",
|
|
362
|
+
"goal"
|
|
363
|
+
]
|
|
364
|
+
},
|
|
365
|
+
"annotations": {
|
|
366
|
+
"readOnlyHint": true,
|
|
367
|
+
"destructiveHint": false
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
],
|
|
371
|
+
"prompts": [
|
|
372
|
+
{
|
|
373
|
+
"name": "agent_onboarding",
|
|
374
|
+
"title": "AccessGate Agent Onboarding",
|
|
375
|
+
"description": "Orient an agent before designing or reviewing authorization.",
|
|
376
|
+
"arguments": [
|
|
377
|
+
{
|
|
378
|
+
"name": "user_goal",
|
|
379
|
+
"description": "What the user wants to authorize.",
|
|
380
|
+
"required": true
|
|
381
|
+
}
|
|
382
|
+
],
|
|
383
|
+
"template": "You are helping a developer use AccessGate for: {user_goal}. Separate authentication from authorization, choose the smallest suitable model, use exact matching and synthetic examples, preserve indeterminate outcomes, validate serialized policy, and require review before production enforcement."
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"name": "policy_review",
|
|
387
|
+
"title": "Review An Authorization Policy",
|
|
388
|
+
"description": "Review a policy for grants, boundaries, missing attributes, failure behavior, auditability, and rollout.",
|
|
389
|
+
"arguments": [
|
|
390
|
+
{
|
|
391
|
+
"name": "policy_summary",
|
|
392
|
+
"description": "A redacted policy summary.",
|
|
393
|
+
"required": true
|
|
394
|
+
}
|
|
395
|
+
],
|
|
396
|
+
"template": "Review this redacted AccessGate policy: {policy_summary}. Identify grants, deny boundaries, attribute provenance, indeterminate behavior, custom operators, sensitive metadata, tests, shadow-mode verification, and rollback."
|
|
397
|
+
}
|
|
398
|
+
],
|
|
399
|
+
"security": {
|
|
400
|
+
"tenantScoped": false,
|
|
401
|
+
"auditRequired": true,
|
|
402
|
+
"defaultMode": "read-validate-and-plan-first",
|
|
403
|
+
"approvalRequiredFor": [
|
|
404
|
+
"production_policy_change",
|
|
405
|
+
"custom_operator",
|
|
406
|
+
"abstain_on_indeterminate",
|
|
407
|
+
"enforcement_rollout"
|
|
408
|
+
]
|
|
409
|
+
},
|
|
410
|
+
"acceptanceChecklist": [
|
|
411
|
+
"Agents can distinguish authentication, session trust, and authorization.",
|
|
412
|
+
"RBAC, ABAC, and relationship-policy composition is documented.",
|
|
413
|
+
"Serialized ABAC policies are versioned and locally validated.",
|
|
414
|
+
"No operator uses arbitrary eval or implicit string substring membership.",
|
|
415
|
+
"Missing data and operator failures cannot be negated into access.",
|
|
416
|
+
"MCP tools do not require production identity or resource data.",
|
|
417
|
+
"Rollout guidance includes shadow evaluation, monitoring, rollback, and human approval."
|
|
418
|
+
]
|
|
419
|
+
}
|