@ankhorage/infra-cerbos 0.0.0-stage → 0.2.2
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.
- package/LICENSE +21 -0
- package/README.md +37 -2
- package/dist/constants/infra.d.ts +11 -0
- package/dist/constants/infra.d.ts.map +1 -0
- package/dist/constants/infra.js +4 -0
- package/dist/constants/infra.js.map +1 -0
- package/dist/features/authorization-infrastructure/application/cerbosLifecycle.d.ts +12 -0
- package/dist/features/authorization-infrastructure/application/cerbosLifecycle.d.ts.map +1 -0
- package/dist/features/authorization-infrastructure/application/cerbosLifecycle.js +126 -0
- package/dist/features/authorization-infrastructure/application/cerbosLifecycle.js.map +1 -0
- package/dist/features/authorization-infrastructure/application/createCerbosWorkload.d.ts +4 -0
- package/dist/features/authorization-infrastructure/application/createCerbosWorkload.d.ts.map +1 -0
- package/dist/features/authorization-infrastructure/application/createCerbosWorkload.js +37 -0
- package/dist/features/authorization-infrastructure/application/createCerbosWorkload.js.map +1 -0
- package/dist/features/authorization-infrastructure/composition/createInfraAdapter.d.ts +11 -0
- package/dist/features/authorization-infrastructure/composition/createInfraAdapter.d.ts.map +1 -0
- package/dist/features/authorization-infrastructure/composition/createInfraAdapter.js +28 -0
- package/dist/features/authorization-infrastructure/composition/createInfraAdapter.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/package.json +66 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ankhorage
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
<!-- markdownlint-disable MD013 MD033 -->
|
|
2
|
+
<!-- This file is generated by Paradox. Do not edit manually. -->
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
# @ankhorage/infra-cerbos
|
|
5
|
+
|
|
6
|
+
        
|
|
7
|
+
|
|
8
|
+
Cerbos authorization service adapter for provider-neutral Ankhorage infrastructure.
|
|
9
|
+
|
|
10
|
+
## Generated documentation
|
|
11
|
+
|
|
12
|
+
- [Interactive documentation app](././paradox/index.html)
|
|
13
|
+
- [Public API reference](././paradox/exports.md)
|
|
14
|
+
- [Component registry](././paradox/components.md)
|
|
15
|
+
- [Architecture overview](././paradox/diagrams/architecture-overview.mmd)
|
|
16
|
+
- [Module relationships](././paradox/diagrams/module-relationships.mmd)
|
|
17
|
+
- [Export graph](././paradox/diagrams/export-graph.mmd)
|
|
18
|
+
|
|
19
|
+
## Public API
|
|
20
|
+
|
|
21
|
+
### Utilities
|
|
22
|
+
|
|
23
|
+
<details>
|
|
24
|
+
<summary>createInfraAdapter</summary>
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
createInfraAdapter() => InfraServiceAdapter
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Create the canonical runtime-neutral Cerbos authorization adapter.
|
|
31
|
+
|
|
32
|
+
Cerbos contributes one portable workload plus policy files. The selected runtime owns their
|
|
33
|
+
concrete materialization; this provider contains no Kubernetes or Compose branches.
|
|
34
|
+
|
|
35
|
+
Module: `src/features/authorization-infrastructure/composition/createInfraAdapter.ts`
|
|
36
|
+
Source: `src/features/authorization-infrastructure/composition/createInfraAdapter.ts:21:1`
|
|
37
|
+
|
|
38
|
+
</details>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Canonical Contracts-backed identity used for adapter discovery and conformance. */
|
|
2
|
+
export declare const infraAdapterDescriptor: {
|
|
3
|
+
readonly id: "cerbos";
|
|
4
|
+
readonly package: "@ankhorage/cerbos";
|
|
5
|
+
readonly kind: "service";
|
|
6
|
+
readonly configVersion: 1;
|
|
7
|
+
readonly capabilities: readonly ["authz"];
|
|
8
|
+
readonly targets: readonly [];
|
|
9
|
+
readonly dependencies: readonly ["workloads"];
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=infra.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"infra.d.ts","sourceRoot":"","sources":["../../src/constants/infra.ts"],"names":[],"mappings":"AAGA,sFAAsF;AACtF,eAAO,MAAM,sBAAsB;;;;;;;;CACsC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"infra.js","sourceRoot":"","sources":["../../src/constants/infra.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,sFAAsF;AACtF,MAAM,CAAC,MAAM,sBAAsB,GACjC,qBAAqB,CAAC,MAAiD,CAAC","sourcesContent":["import type { InfraAdapterDescriptor } from '@ankhorage/contracts/infra';\nimport { INFRA_ADAPTER_CATALOG } from '@ankhorage/contracts/infra';\n\n/** Canonical Contracts-backed identity used for adapter discovery and conformance. */\nexport const infraAdapterDescriptor =\n INFRA_ADAPTER_CATALOG.cerbos satisfies InfraAdapterDescriptor<'cerbos'>;\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { InfraDestroyRequest, InfraExecutionContext, InfraPlanAction, InfraReconcileResult, InfraResourceStatus, InfraResult } from '@ankhorage/contracts/infra';
|
|
2
|
+
/** Validate that this adapter is invoked only for an explicit Cerbos selection. */
|
|
3
|
+
export declare function validateCerbos(context: InfraExecutionContext): InfraResult<null>;
|
|
4
|
+
/** Plan the logical Cerbos service owner around its runtime-owned workload. */
|
|
5
|
+
export declare function planCerbos(context: InfraExecutionContext): InfraResult<readonly InfraPlanAction[]>;
|
|
6
|
+
/** Record the logical provider owner and its non-secret in-network endpoint. */
|
|
7
|
+
export declare function reconcileCerbos(context: InfraExecutionContext): InfraResult<InfraReconcileResult>;
|
|
8
|
+
/** Report logical state; the selected runtime separately reports workload health. */
|
|
9
|
+
export declare function getCerbosStatus(context: InfraExecutionContext): InfraResult<readonly InfraResourceStatus[]>;
|
|
10
|
+
/** Remove only the logical provider owner after exact destructive confirmation. */
|
|
11
|
+
export declare function destroyCerbos(context: InfraExecutionContext, request: InfraDestroyRequest): InfraResult<InfraReconcileResult>;
|
|
12
|
+
//# sourceMappingURL=cerbosLifecycle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cerbosLifecycle.d.ts","sourceRoot":"","sources":["../../../../src/features/authorization-infrastructure/application/cerbosLifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,qBAAqB,EAGrB,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,WAAW,EACZ,MAAM,4BAA4B,CAAC;AAEpC,mFAAmF;AACnF,wBAAgB,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,WAAW,CAAC,IAAI,CAAC,CAIhF;AAED,+EAA+E;AAC/E,wBAAgB,UAAU,CACxB,OAAO,EAAE,qBAAqB,GAC7B,WAAW,CAAC,SAAS,eAAe,EAAE,CAAC,CAkBzC;AAED,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,OAAO,EAAE,qBAAqB,GAAG,WAAW,CAAC,oBAAoB,CAAC,CASjG;AAED,qFAAqF;AACrF,wBAAgB,eAAe,CAC7B,OAAO,EAAE,qBAAqB,GAC7B,WAAW,CAAC,SAAS,mBAAmB,EAAE,CAAC,CAW7C;AAED,mFAAmF;AACnF,wBAAgB,aAAa,CAC3B,OAAO,EAAE,qBAAqB,EAC9B,OAAO,EAAE,mBAAmB,GAC3B,WAAW,CAAC,oBAAoB,CAAC,CAGnC"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/** Validate that this adapter is invoked only for an explicit Cerbos selection. */
|
|
2
|
+
export function validateCerbos(context) {
|
|
3
|
+
return context.desired.authz?.provider === 'cerbos'
|
|
4
|
+
? { ok: true, value: null, diagnostics: [] }
|
|
5
|
+
: invalidSelection();
|
|
6
|
+
}
|
|
7
|
+
/** Plan the logical Cerbos service owner around its runtime-owned workload. */
|
|
8
|
+
export function planCerbos(context) {
|
|
9
|
+
const validation = validateCerbos(context);
|
|
10
|
+
if (!validation.ok)
|
|
11
|
+
return validation;
|
|
12
|
+
const owner = createCerbosOwner(context);
|
|
13
|
+
const exists = hasPreviousOwner(context, owner);
|
|
14
|
+
return {
|
|
15
|
+
ok: true,
|
|
16
|
+
value: [
|
|
17
|
+
{
|
|
18
|
+
owner: owner.identity,
|
|
19
|
+
operation: exists ? 'noop' : 'create',
|
|
20
|
+
impact: 'none',
|
|
21
|
+
detail: `Cerbos authorization service: ${exists ? 'noop' : 'create'}.`,
|
|
22
|
+
dependsOn: owner.dependsOn,
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
diagnostics: [],
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/** Record the logical provider owner and its non-secret in-network endpoint. */
|
|
29
|
+
export function reconcileCerbos(context) {
|
|
30
|
+
const validation = validateCerbos(context);
|
|
31
|
+
if (!validation.ok)
|
|
32
|
+
return validation;
|
|
33
|
+
const owner = createCerbosOwner(context);
|
|
34
|
+
return {
|
|
35
|
+
ok: true,
|
|
36
|
+
value: { resources: [owner], outputs: [createCerbosOutput(owner)] },
|
|
37
|
+
diagnostics: [],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/** Report logical state; the selected runtime separately reports workload health. */
|
|
41
|
+
export function getCerbosStatus(context) {
|
|
42
|
+
const validation = validateCerbos(context);
|
|
43
|
+
if (!validation.ok)
|
|
44
|
+
return validation;
|
|
45
|
+
const owner = createCerbosOwner(context);
|
|
46
|
+
return {
|
|
47
|
+
ok: true,
|
|
48
|
+
value: [
|
|
49
|
+
{ owner: owner.identity, state: hasPreviousOwner(context, owner) ? 'ready' : 'absent' },
|
|
50
|
+
],
|
|
51
|
+
diagnostics: [],
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/** Remove only the logical provider owner after exact destructive confirmation. */
|
|
55
|
+
export function destroyCerbos(context, request) {
|
|
56
|
+
if (!isConfirmed(context, request))
|
|
57
|
+
return unconfirmedDestroy();
|
|
58
|
+
return { ok: true, value: { resources: [], outputs: [] }, diagnostics: [] };
|
|
59
|
+
}
|
|
60
|
+
function createCerbosOwner(context) {
|
|
61
|
+
return {
|
|
62
|
+
identity: {
|
|
63
|
+
projectId: context.projectId,
|
|
64
|
+
environment: context.environment,
|
|
65
|
+
adapter: 'cerbos',
|
|
66
|
+
resourceId: 'service',
|
|
67
|
+
},
|
|
68
|
+
externalId: `${context.projectId}-${context.environment}-cerbos`,
|
|
69
|
+
persistent: false,
|
|
70
|
+
retention: 'delete-on-destroy',
|
|
71
|
+
dependsOn: [
|
|
72
|
+
{
|
|
73
|
+
projectId: context.projectId,
|
|
74
|
+
environment: context.environment,
|
|
75
|
+
adapter: context.desired.deployment.runtime.provider,
|
|
76
|
+
resourceId: 'workload:cerbos',
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function createCerbosOutput(owner) {
|
|
82
|
+
return {
|
|
83
|
+
owner: owner.identity,
|
|
84
|
+
name: 'http',
|
|
85
|
+
visibility: 'public',
|
|
86
|
+
value: 'http://cerbos:3592',
|
|
87
|
+
environmentVariable: 'CERBOS_URL',
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
function hasPreviousOwner(context, owner) {
|
|
91
|
+
return (context.previous?.resources.some(({ identity }) => identity.projectId === owner.identity.projectId &&
|
|
92
|
+
identity.environment === owner.identity.environment &&
|
|
93
|
+
identity.adapter === owner.identity.adapter &&
|
|
94
|
+
identity.resourceId === owner.identity.resourceId) ?? false);
|
|
95
|
+
}
|
|
96
|
+
function isConfirmed(context, request) {
|
|
97
|
+
return (request.projectId === context.projectId &&
|
|
98
|
+
request.environment === context.environment &&
|
|
99
|
+
request.confirmation.projectId === context.projectId &&
|
|
100
|
+
request.confirmation.environment === context.environment);
|
|
101
|
+
}
|
|
102
|
+
function invalidSelection() {
|
|
103
|
+
return {
|
|
104
|
+
ok: false,
|
|
105
|
+
diagnostics: [
|
|
106
|
+
{
|
|
107
|
+
severity: 'error',
|
|
108
|
+
code: 'cerbos-selection-invalid',
|
|
109
|
+
message: 'Cerbos requires the canonical Cerbos authorization selection.',
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
function unconfirmedDestroy() {
|
|
115
|
+
return {
|
|
116
|
+
ok: false,
|
|
117
|
+
diagnostics: [
|
|
118
|
+
{
|
|
119
|
+
severity: 'error',
|
|
120
|
+
code: 'cerbos-destroy-unconfirmed',
|
|
121
|
+
message: 'Cerbos destroy requires exact project and environment confirmation.',
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=cerbosLifecycle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cerbosLifecycle.js","sourceRoot":"","sources":["../../../../src/features/authorization-infrastructure/application/cerbosLifecycle.ts"],"names":[],"mappings":"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","sourcesContent":["import type {\n InfraDestroyRequest,\n InfraExecutionContext,\n InfraOutput,\n InfraOwnedResource,\n InfraPlanAction,\n InfraReconcileResult,\n InfraResourceStatus,\n InfraResult,\n} from '@ankhorage/contracts/infra';\n\n/** Validate that this adapter is invoked only for an explicit Cerbos selection. */\nexport function validateCerbos(context: InfraExecutionContext): InfraResult<null> {\n return context.desired.authz?.provider === 'cerbos'\n ? { ok: true, value: null, diagnostics: [] }\n : invalidSelection();\n}\n\n/** Plan the logical Cerbos service owner around its runtime-owned workload. */\nexport function planCerbos(\n context: InfraExecutionContext,\n): InfraResult<readonly InfraPlanAction[]> {\n const validation = validateCerbos(context);\n if (!validation.ok) return validation;\n const owner = createCerbosOwner(context);\n const exists = hasPreviousOwner(context, owner);\n return {\n ok: true,\n value: [\n {\n owner: owner.identity,\n operation: exists ? 'noop' : 'create',\n impact: 'none',\n detail: `Cerbos authorization service: ${exists ? 'noop' : 'create'}.`,\n dependsOn: owner.dependsOn,\n },\n ],\n diagnostics: [],\n };\n}\n\n/** Record the logical provider owner and its non-secret in-network endpoint. */\nexport function reconcileCerbos(context: InfraExecutionContext): InfraResult<InfraReconcileResult> {\n const validation = validateCerbos(context);\n if (!validation.ok) return validation;\n const owner = createCerbosOwner(context);\n return {\n ok: true,\n value: { resources: [owner], outputs: [createCerbosOutput(owner)] },\n diagnostics: [],\n };\n}\n\n/** Report logical state; the selected runtime separately reports workload health. */\nexport function getCerbosStatus(\n context: InfraExecutionContext,\n): InfraResult<readonly InfraResourceStatus[]> {\n const validation = validateCerbos(context);\n if (!validation.ok) return validation;\n const owner = createCerbosOwner(context);\n return {\n ok: true,\n value: [\n { owner: owner.identity, state: hasPreviousOwner(context, owner) ? 'ready' : 'absent' },\n ],\n diagnostics: [],\n };\n}\n\n/** Remove only the logical provider owner after exact destructive confirmation. */\nexport function destroyCerbos(\n context: InfraExecutionContext,\n request: InfraDestroyRequest,\n): InfraResult<InfraReconcileResult> {\n if (!isConfirmed(context, request)) return unconfirmedDestroy();\n return { ok: true, value: { resources: [], outputs: [] }, diagnostics: [] };\n}\n\nfunction createCerbosOwner(context: InfraExecutionContext): InfraOwnedResource {\n return {\n identity: {\n projectId: context.projectId,\n environment: context.environment,\n adapter: 'cerbos',\n resourceId: 'service',\n },\n externalId: `${context.projectId}-${context.environment}-cerbos`,\n persistent: false,\n retention: 'delete-on-destroy',\n dependsOn: [\n {\n projectId: context.projectId,\n environment: context.environment,\n adapter: context.desired.deployment.runtime.provider,\n resourceId: 'workload:cerbos',\n },\n ],\n };\n}\n\nfunction createCerbosOutput(owner: InfraOwnedResource): InfraOutput {\n return {\n owner: owner.identity,\n name: 'http',\n visibility: 'public',\n value: 'http://cerbos:3592',\n environmentVariable: 'CERBOS_URL',\n };\n}\n\nfunction hasPreviousOwner(context: InfraExecutionContext, owner: InfraOwnedResource): boolean {\n return (\n context.previous?.resources.some(\n ({ identity }) =>\n identity.projectId === owner.identity.projectId &&\n identity.environment === owner.identity.environment &&\n identity.adapter === owner.identity.adapter &&\n identity.resourceId === owner.identity.resourceId,\n ) ?? false\n );\n}\n\nfunction isConfirmed(context: InfraExecutionContext, request: InfraDestroyRequest): boolean {\n return (\n request.projectId === context.projectId &&\n request.environment === context.environment &&\n request.confirmation.projectId === context.projectId &&\n request.confirmation.environment === context.environment\n );\n}\n\nfunction invalidSelection(): InfraResult<never> {\n return {\n ok: false,\n diagnostics: [\n {\n severity: 'error',\n code: 'cerbos-selection-invalid',\n message: 'Cerbos requires the canonical Cerbos authorization selection.',\n },\n ],\n };\n}\n\nfunction unconfirmedDestroy(): InfraResult<never> {\n return {\n ok: false,\n diagnostics: [\n {\n severity: 'error',\n code: 'cerbos-destroy-unconfirmed',\n message: 'Cerbos destroy requires exact project and environment confirmation.',\n },\n ],\n };\n}\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { InfraExecutionContext, InfraWorkloadSpec } from '@ankhorage/contracts/infra';
|
|
2
|
+
/** Project Cerbos config and policy intent into one runtime-neutral workload. */
|
|
3
|
+
export declare function createCerbosWorkload(context: InfraExecutionContext): InfraWorkloadSpec;
|
|
4
|
+
//# sourceMappingURL=createCerbosWorkload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createCerbosWorkload.d.ts","sourceRoot":"","sources":["../../../../src/features/authorization-infrastructure/application/createCerbosWorkload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAW3F,iFAAiF;AACjF,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,qBAAqB,GAAG,iBAAiB,CA2BtF"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const CERBOS_CONFIG = `server:
|
|
2
|
+
httpListenAddr: ":3592"
|
|
3
|
+
grpcListenAddr: ":3593"
|
|
4
|
+
storage:
|
|
5
|
+
driver: "disk"
|
|
6
|
+
disk:
|
|
7
|
+
directory: /policies
|
|
8
|
+
`;
|
|
9
|
+
/** Project Cerbos config and policy intent into one runtime-neutral workload. */
|
|
10
|
+
export function createCerbosWorkload(context) {
|
|
11
|
+
const policies = context.desired.authz?.provider === 'cerbos' ? context.desired.authz.policies : [];
|
|
12
|
+
return {
|
|
13
|
+
id: 'cerbos',
|
|
14
|
+
artifact: { kind: 'image', image: 'ghcr.io/cerbos/cerbos:0.40.0' },
|
|
15
|
+
args: ['server', '--config=/config/config.yaml'],
|
|
16
|
+
ports: [
|
|
17
|
+
{ name: 'http', port: 3592 },
|
|
18
|
+
{ name: 'grpc', port: 3593 },
|
|
19
|
+
],
|
|
20
|
+
files: [
|
|
21
|
+
{ path: '/config/config.yaml', content: { kind: 'literal', value: CERBOS_CONFIG } },
|
|
22
|
+
...[...(policies ?? [])]
|
|
23
|
+
.sort((left, right) => left.path.localeCompare(right.path))
|
|
24
|
+
.map(({ path, content }) => ({
|
|
25
|
+
path: `/policies/${path}`,
|
|
26
|
+
content: { kind: 'literal', value: content },
|
|
27
|
+
})),
|
|
28
|
+
],
|
|
29
|
+
health: {
|
|
30
|
+
kind: 'command',
|
|
31
|
+
command: ['/cerbos', 'healthcheck', '--config=/config/config.yaml'],
|
|
32
|
+
},
|
|
33
|
+
exposure: 'internal',
|
|
34
|
+
replicas: 1,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=createCerbosWorkload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createCerbosWorkload.js","sourceRoot":"","sources":["../../../../src/features/authorization-infrastructure/application/createCerbosWorkload.ts"],"names":[],"mappings":"AAEA,MAAM,aAAa,GAAG;;;;;;;CAOrB,CAAC;AAEF,iFAAiF;AACjF,MAAM,UAAU,oBAAoB,CAAC,OAA8B;IACjE,MAAM,QAAQ,GACZ,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;IACrF,OAAO;QACL,EAAE,EAAE,QAAQ;QACZ,QAAQ,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,8BAA8B,EAAE;QAClE,IAAI,EAAE,CAAC,QAAQ,EAAE,8BAA8B,CAAC;QAChD,KAAK,EAAE;YACL,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE;YAC5B,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE;SAC7B;QACD,KAAK,EAAE;YACL,EAAE,IAAI,EAAE,qBAAqB,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE;YACnF,GAAG,CAAC,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;iBACrB,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;iBAC1D,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;gBAC3B,IAAI,EAAE,aAAa,IAAI,EAAE;gBACzB,OAAO,EAAE,EAAE,IAAI,EAAE,SAAkB,EAAE,KAAK,EAAE,OAAO,EAAE;aACtD,CAAC,CAAC;SACN;QACD,MAAM,EAAE;YACN,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,CAAC,SAAS,EAAE,aAAa,EAAE,8BAA8B,CAAC;SACpE;QACD,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,CAAC;KACZ,CAAC;AACJ,CAAC","sourcesContent":["import type { InfraExecutionContext, InfraWorkloadSpec } from '@ankhorage/contracts/infra';\n\nconst CERBOS_CONFIG = `server:\n httpListenAddr: \":3592\"\n grpcListenAddr: \":3593\"\nstorage:\n driver: \"disk\"\n disk:\n directory: /policies\n`;\n\n/** Project Cerbos config and policy intent into one runtime-neutral workload. */\nexport function createCerbosWorkload(context: InfraExecutionContext): InfraWorkloadSpec {\n const policies =\n context.desired.authz?.provider === 'cerbos' ? context.desired.authz.policies : [];\n return {\n id: 'cerbos',\n artifact: { kind: 'image', image: 'ghcr.io/cerbos/cerbos:0.40.0' },\n args: ['server', '--config=/config/config.yaml'],\n ports: [\n { name: 'http', port: 3592 },\n { name: 'grpc', port: 3593 },\n ],\n files: [\n { path: '/config/config.yaml', content: { kind: 'literal', value: CERBOS_CONFIG } },\n ...[...(policies ?? [])]\n .sort((left, right) => left.path.localeCompare(right.path))\n .map(({ path, content }) => ({\n path: `/policies/${path}`,\n content: { kind: 'literal' as const, value: content },\n })),\n ],\n health: {\n kind: 'command',\n command: ['/cerbos', 'healthcheck', '--config=/config/config.yaml'],\n },\n exposure: 'internal',\n replicas: 1,\n };\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { InfraServiceAdapter } from '@ankhorage/contracts/infra';
|
|
2
|
+
/***
|
|
3
|
+
* Create the canonical runtime-neutral Cerbos authorization adapter.
|
|
4
|
+
*
|
|
5
|
+
* Cerbos contributes one portable workload plus policy files. The selected runtime owns their
|
|
6
|
+
* concrete materialization; this provider contains no Kubernetes or Compose branches.
|
|
7
|
+
*
|
|
8
|
+
* @readme
|
|
9
|
+
*/
|
|
10
|
+
export declare function createInfraAdapter(): InfraServiceAdapter;
|
|
11
|
+
//# sourceMappingURL=createInfraAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createInfraAdapter.d.ts","sourceRoot":"","sources":["../../../../src/features/authorization-infrastructure/composition/createInfraAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAYtE;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,IAAI,mBAAmB,CAiBxD"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { infraAdapterDescriptor } from '../../../constants/infra';
|
|
2
|
+
import { destroyCerbos, getCerbosStatus, planCerbos, reconcileCerbos, validateCerbos, } from '../application/cerbosLifecycle';
|
|
3
|
+
import { createCerbosWorkload } from '../application/createCerbosWorkload';
|
|
4
|
+
/***
|
|
5
|
+
* Create the canonical runtime-neutral Cerbos authorization adapter.
|
|
6
|
+
*
|
|
7
|
+
* Cerbos contributes one portable workload plus policy files. The selected runtime owns their
|
|
8
|
+
* concrete materialization; this provider contains no Kubernetes or Compose branches.
|
|
9
|
+
*
|
|
10
|
+
* @readme
|
|
11
|
+
*/
|
|
12
|
+
export function createInfraAdapter() {
|
|
13
|
+
return {
|
|
14
|
+
descriptor: infraAdapterDescriptor,
|
|
15
|
+
validateAsync: (context) => Promise.resolve(validateCerbos(context)),
|
|
16
|
+
planAsync: (context) => Promise.resolve(planCerbos(context)),
|
|
17
|
+
desiredWorkloadsAsync: (context) => {
|
|
18
|
+
const validation = validateCerbos(context);
|
|
19
|
+
return Promise.resolve(validation.ok
|
|
20
|
+
? { ok: true, value: [createCerbosWorkload(context)], diagnostics: [] }
|
|
21
|
+
: validation);
|
|
22
|
+
},
|
|
23
|
+
reconcileAsync: (context) => Promise.resolve(reconcileCerbos(context)),
|
|
24
|
+
statusAsync: (context) => Promise.resolve(getCerbosStatus(context)),
|
|
25
|
+
destroyAsync: (context, request) => Promise.resolve(destroyCerbos(context, request)),
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=createInfraAdapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createInfraAdapter.js","sourceRoot":"","sources":["../../../../src/features/authorization-infrastructure/composition/createInfraAdapter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EACL,aAAa,EACb,eAAe,EACf,UAAU,EACV,eAAe,EACf,cAAc,GACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO;QACL,UAAU,EAAE,sBAAsB;QAClC,aAAa,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QACpE,SAAS,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAC5D,qBAAqB,EAAE,CAAC,OAAO,EAAE,EAAE;YACjC,MAAM,UAAU,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;YAC3C,OAAO,OAAO,CAAC,OAAO,CACpB,UAAU,CAAC,EAAE;gBACX,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE;gBACvE,CAAC,CAAC,UAAU,CACf,CAAC;QACJ,CAAC;QACD,cAAc,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QACtE,WAAW,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QACnE,YAAY,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;KACrF,CAAC;AACJ,CAAC","sourcesContent":["import type { InfraServiceAdapter } from '@ankhorage/contracts/infra';\n\nimport { infraAdapterDescriptor } from '../../../constants/infra';\nimport {\n destroyCerbos,\n getCerbosStatus,\n planCerbos,\n reconcileCerbos,\n validateCerbos,\n} from '../application/cerbosLifecycle';\nimport { createCerbosWorkload } from '../application/createCerbosWorkload';\n\n/***\n * Create the canonical runtime-neutral Cerbos authorization adapter.\n *\n * Cerbos contributes one portable workload plus policy files. The selected runtime owns their\n * concrete materialization; this provider contains no Kubernetes or Compose branches.\n *\n * @readme\n */\nexport function createInfraAdapter(): InfraServiceAdapter {\n return {\n descriptor: infraAdapterDescriptor,\n validateAsync: (context) => Promise.resolve(validateCerbos(context)),\n planAsync: (context) => Promise.resolve(planCerbos(context)),\n desiredWorkloadsAsync: (context) => {\n const validation = validateCerbos(context);\n return Promise.resolve(\n validation.ok\n ? { ok: true, value: [createCerbosWorkload(context)], diagnostics: [] }\n : validation,\n );\n },\n reconcileAsync: (context) => Promise.resolve(reconcileCerbos(context)),\n statusAsync: (context) => Promise.resolve(getCerbosStatus(context)),\n destroyAsync: (context, request) => Promise.resolve(destroyCerbos(context, request)),\n };\n}\n"]}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wEAAwE,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wEAAwE,CAAC","sourcesContent":["/** Public Cerbos authorization adapter package boundary. */\nexport { infraAdapterDescriptor } from './constants/infra';\nexport { createInfraAdapter } from './features/authorization-infrastructure/composition/createInfraAdapter';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,68 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/infra-cerbos",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.2",
|
|
4
|
+
"description": "Cerbos authorization service adapter for provider-neutral Ankhorage infrastructure.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/ankhorage/infra-cerbos.git"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://github.com/ankhorage/infra-cerbos#readme",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/ankhorage/infra-cerbos/issues"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"ankhorage",
|
|
20
|
+
"infrastructure",
|
|
21
|
+
"cerbos",
|
|
22
|
+
"authorization",
|
|
23
|
+
"adapter"
|
|
24
|
+
],
|
|
25
|
+
"files": [
|
|
26
|
+
"dist",
|
|
27
|
+
"README.md",
|
|
28
|
+
"LICENSE",
|
|
29
|
+
"package.json"
|
|
30
|
+
],
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"default": "./dist/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./package.json": "./package.json"
|
|
37
|
+
},
|
|
38
|
+
"publishConfig": {
|
|
39
|
+
"access": "public"
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build": "rm -rf dist tsconfig.tsbuildinfo && bun x tsc -p tsconfig.build.json",
|
|
43
|
+
"typecheck": "bun x tsc --noEmit -p tsconfig.json",
|
|
44
|
+
"check-types": "bun run typecheck",
|
|
45
|
+
"test": "bun test src",
|
|
46
|
+
"docs": "paradox && ankhorage-prettier --write README.md paradox",
|
|
47
|
+
"prepack": "bun run build",
|
|
48
|
+
"lint": "ankhorage-eslint . --max-warnings=0",
|
|
49
|
+
"lint:fix": "ankhorage-eslint . --fix --max-warnings=0",
|
|
50
|
+
"format": "ankhorage-prettier --write .",
|
|
51
|
+
"format:check": "ankhorage-prettier --check .",
|
|
52
|
+
"knip:check": "ankhorage-knip",
|
|
53
|
+
"changeset": "ankhorage-changeset",
|
|
54
|
+
"changeset:status": "ankhorage-changeset status --since=origin/main",
|
|
55
|
+
"version-packages": "ankhorage-changeset version"
|
|
56
|
+
},
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"@ankhorage/contracts": "^17.0.0"
|
|
59
|
+
},
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@ankhorage/devtools": "^2.3.29",
|
|
62
|
+
"@ankhorage/paradox": "^0.1.24",
|
|
63
|
+
"@types/bun": "^1.4.2",
|
|
64
|
+
"@types/node": "^26.4.1",
|
|
65
|
+
"typescript": "~6.0.3"
|
|
66
|
+
},
|
|
67
|
+
"packageManager": "bun@1.4.2"
|
|
68
|
+
}
|