@emilia-protocol/gate 0.9.4 → 0.10.0
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/CHANGELOG.md +70 -0
- package/LICENSE +190 -0
- package/README.md +75 -16
- package/action-control-manifest.js +26 -0
- package/adapters/_kit.js +47 -5
- package/adapters/aws.js +15 -4
- package/adapters/github-demo.mjs +25 -22
- package/adapters/github.js +1 -1
- package/adapters/jira.js +1 -0
- package/adapters/linear.js +1 -0
- package/adapters/salesforce.js +1 -0
- package/adapters/stripe.js +1 -1
- package/adapters/supabase.js +26 -4
- package/adapters/vercel.js +33 -4
- package/aec-execution.js +16 -4
- package/breakglass.js +285 -51
- package/control-plane.js +341 -0
- package/coverage.js +722 -0
- package/custody-demo.mjs +13 -3
- package/demo.mjs +9 -3
- package/deploy/helm/README.md +16 -8
- package/deploy/helm/emilia-gate/Chart.yaml +3 -1
- package/deploy/helm/emilia-gate/templates/NOTES.txt +3 -2
- package/deploy/helm/emilia-gate/templates/deployment.yaml +55 -1
- package/deploy/helm/emilia-gate/values.yaml +18 -2
- package/deploy/helm/emilia-gate-service/Chart.yaml +11 -0
- package/deploy/helm/emilia-gate-service/README.md +81 -0
- package/deploy/helm/emilia-gate-service/templates/NOTES.txt +12 -0
- package/deploy/helm/emilia-gate-service/templates/_helpers.tpl +83 -0
- package/deploy/helm/emilia-gate-service/templates/deployment.yaml +153 -0
- package/deploy/helm/emilia-gate-service/templates/migration-job.yaml +73 -0
- package/deploy/helm/emilia-gate-service/templates/networkpolicy.yaml +113 -0
- package/deploy/helm/emilia-gate-service/templates/pdb.yaml +14 -0
- package/deploy/helm/emilia-gate-service/templates/service.yaml +20 -0
- package/deploy/helm/emilia-gate-service/templates/serviceaccount.yaml +8 -0
- package/deploy/helm/emilia-gate-service/tests/fixtures/001_gate.sql +26 -0
- package/deploy/helm/emilia-gate-service/tests/fixtures/002_runtime_access.sql +32 -0
- package/deploy/helm/emilia-gate-service/tests/fixtures/gate.config.mjs +29 -0
- package/deploy/helm/emilia-gate-service/tests/render-check.sh +145 -0
- package/deploy/helm/emilia-gate-service/values.schema.json +145 -0
- package/deploy/helm/emilia-gate-service/values.yaml +166 -0
- package/deploy/sql/001-runtime.sql +707 -0
- package/deploy/terraform/README.md +24 -14
- package/deploy/terraform/main.tf +59 -0
- package/deploy/terraform/service/README.md +81 -0
- package/deploy/terraform/service/main.tf +718 -0
- package/deploy/terraform/service/outputs.tf +19 -0
- package/deploy/terraform/service/tests/validate.sh +24 -0
- package/deploy/terraform/service/tests/validation.tftest.hcl +168 -0
- package/deploy/terraform/service/variables.tf +459 -0
- package/deploy/terraform/service/versions.tf +10 -0
- package/deploy/terraform/variables.tf +95 -2
- package/deployment-attestation.js +248 -0
- package/eg1-conformance.js +46 -12
- package/enterprise.js +6 -2
- package/ep-assure.mjs +3 -2
- package/evidence-postgres.js +357 -0
- package/evidence.js +10 -3
- package/execution-binding.js +141 -26
- package/index.js +556 -115
- package/key-registry.js +51 -19
- package/mcp.js +4 -2
- package/network-witness.js +500 -0
- package/package.json +25 -5
- package/reliance-kernel.js +5 -6
- package/reliance-packet.js +43 -10
- package/reports/assurance-package.js +45 -19
- package/reports/reperform.js +78 -18
- package/reports/underwriter.js +1 -1
- package/settlement.js +300 -0
- package/store-postgres.js +14 -0
- package/store.js +26 -5
- package/strict-json.js +86 -0
- package/witness-postgres.js +97 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# This is a BYOC reference chart. It does not identify or imply an official
|
|
2
|
+
# published image. Build Dockerfile.gate, push it to a registry you control,
|
|
3
|
+
# and set either image.tag or image.digest before rendering.
|
|
4
|
+
|
|
5
|
+
replicaCount: 2
|
|
6
|
+
|
|
7
|
+
image:
|
|
8
|
+
repository: ""
|
|
9
|
+
tag: ""
|
|
10
|
+
digest: ""
|
|
11
|
+
pullPolicy: IfNotPresent
|
|
12
|
+
|
|
13
|
+
imagePullSecrets: []
|
|
14
|
+
nameOverride: ""
|
|
15
|
+
fullnameOverride: ""
|
|
16
|
+
|
|
17
|
+
service:
|
|
18
|
+
type: ClusterIP
|
|
19
|
+
port: 8080
|
|
20
|
+
annotations: {}
|
|
21
|
+
|
|
22
|
+
runtime:
|
|
23
|
+
port: 8080
|
|
24
|
+
logLevel: info
|
|
25
|
+
terminationGracePeriodSeconds: 30
|
|
26
|
+
extraEnv: []
|
|
27
|
+
|
|
28
|
+
# apps/gate-service deliberately loads an operator-owned ESM module. The
|
|
29
|
+
# existing Secret must contain both files when migrations are enabled:
|
|
30
|
+
# gate.config.mjs - default export builds the production service config
|
|
31
|
+
# migrate.mjs - idempotent, forward-compatible Postgres migrations
|
|
32
|
+
configuration:
|
|
33
|
+
existingSecret: ""
|
|
34
|
+
configKey: gate.config.mjs
|
|
35
|
+
migrationKey: migrate.mjs
|
|
36
|
+
mountPath: /app/config
|
|
37
|
+
|
|
38
|
+
# Secret values are never accepted by this chart. Every entry names a Secret
|
|
39
|
+
# provisioned out of band in the release namespace and the key to reference.
|
|
40
|
+
secrets:
|
|
41
|
+
postgres:
|
|
42
|
+
existingSecret: ""
|
|
43
|
+
key: database-url
|
|
44
|
+
envName: DATABASE_URL
|
|
45
|
+
apiToken:
|
|
46
|
+
existingSecret: ""
|
|
47
|
+
key: api-token
|
|
48
|
+
envName: EMILIA_GATE_API_TOKEN
|
|
49
|
+
kms:
|
|
50
|
+
existingSecret: ""
|
|
51
|
+
key: kms-key-id
|
|
52
|
+
envName: EP_KMS_KEY_ID
|
|
53
|
+
issuerRoots:
|
|
54
|
+
existingSecret: ""
|
|
55
|
+
key: issuer-roots.json
|
|
56
|
+
envName: EP_GATE_ISSUER_ROOTS
|
|
57
|
+
|
|
58
|
+
migrations:
|
|
59
|
+
enabled: true
|
|
60
|
+
postgres:
|
|
61
|
+
# Required, distinct migration-role Secret. Reuse of secrets.postgres is
|
|
62
|
+
# refused so the long-lived runtime credential never gains DDL authority.
|
|
63
|
+
existingSecret: ""
|
|
64
|
+
# Required key containing the migration-role connection URL.
|
|
65
|
+
key: ""
|
|
66
|
+
command:
|
|
67
|
+
- node
|
|
68
|
+
- /app/config/migrate.mjs
|
|
69
|
+
activeDeadlineSeconds: 600
|
|
70
|
+
backoffLimit: 3
|
|
71
|
+
ttlSecondsAfterFinished: 600
|
|
72
|
+
resources:
|
|
73
|
+
requests:
|
|
74
|
+
cpu: 50m
|
|
75
|
+
memory: 64Mi
|
|
76
|
+
limits:
|
|
77
|
+
cpu: 500m
|
|
78
|
+
memory: 256Mi
|
|
79
|
+
|
|
80
|
+
probes:
|
|
81
|
+
startup:
|
|
82
|
+
path: /v1/live
|
|
83
|
+
periodSeconds: 2
|
|
84
|
+
timeoutSeconds: 2
|
|
85
|
+
failureThreshold: 30
|
|
86
|
+
liveness:
|
|
87
|
+
path: /v1/live
|
|
88
|
+
periodSeconds: 10
|
|
89
|
+
timeoutSeconds: 2
|
|
90
|
+
failureThreshold: 3
|
|
91
|
+
readiness:
|
|
92
|
+
path: /v1/ready
|
|
93
|
+
periodSeconds: 5
|
|
94
|
+
timeoutSeconds: 2
|
|
95
|
+
failureThreshold: 3
|
|
96
|
+
|
|
97
|
+
resources:
|
|
98
|
+
requests:
|
|
99
|
+
cpu: 100m
|
|
100
|
+
memory: 128Mi
|
|
101
|
+
limits:
|
|
102
|
+
cpu: "1"
|
|
103
|
+
memory: 512Mi
|
|
104
|
+
|
|
105
|
+
podDisruptionBudget:
|
|
106
|
+
enabled: true
|
|
107
|
+
minAvailable: 1
|
|
108
|
+
|
|
109
|
+
podSecurityContext:
|
|
110
|
+
runAsNonRoot: true
|
|
111
|
+
runAsUser: 10001
|
|
112
|
+
runAsGroup: 10001
|
|
113
|
+
fsGroup: 10001
|
|
114
|
+
fsGroupChangePolicy: OnRootMismatch
|
|
115
|
+
seccompProfile:
|
|
116
|
+
type: RuntimeDefault
|
|
117
|
+
|
|
118
|
+
containerSecurityContext:
|
|
119
|
+
allowPrivilegeEscalation: false
|
|
120
|
+
readOnlyRootFilesystem: true
|
|
121
|
+
capabilities:
|
|
122
|
+
drop:
|
|
123
|
+
- ALL
|
|
124
|
+
|
|
125
|
+
networkPolicy:
|
|
126
|
+
enabled: true
|
|
127
|
+
ingress:
|
|
128
|
+
# Allows callers in the release namespace to reach the ClusterIP service.
|
|
129
|
+
# Replace or supplement this for an ingress controller in another namespace.
|
|
130
|
+
allowSameNamespace: true
|
|
131
|
+
additionalPeers: []
|
|
132
|
+
egress:
|
|
133
|
+
dns:
|
|
134
|
+
enabled: true
|
|
135
|
+
namespaceSelector:
|
|
136
|
+
matchLabels:
|
|
137
|
+
kubernetes.io/metadata.name: kube-system
|
|
138
|
+
podSelector:
|
|
139
|
+
matchLabels:
|
|
140
|
+
k8s-app: kube-dns
|
|
141
|
+
postgres:
|
|
142
|
+
port: 5432
|
|
143
|
+
# By default, only a same-namespace pod with this label is reachable.
|
|
144
|
+
# For managed Postgres, set podSelector: null and provide stable cidrs.
|
|
145
|
+
podSelector:
|
|
146
|
+
matchLabels:
|
|
147
|
+
app.kubernetes.io/name: postgresql
|
|
148
|
+
namespaceSelector: {}
|
|
149
|
+
cidrs: []
|
|
150
|
+
# Standard NetworkPolicy has no FQDN peers. Supply stable proxy/NAT CIDRs
|
|
151
|
+
# here, or enforce GitHub/KMS/SIEM hostnames with a CNI-specific policy.
|
|
152
|
+
kmsCidrs: []
|
|
153
|
+
githubCidrs: []
|
|
154
|
+
siemCidrs: []
|
|
155
|
+
additionalRules: []
|
|
156
|
+
|
|
157
|
+
topologySpreadConstraints:
|
|
158
|
+
- maxSkew: 1
|
|
159
|
+
topologyKey: kubernetes.io/hostname
|
|
160
|
+
whenUnsatisfiable: ScheduleAnyway
|
|
161
|
+
|
|
162
|
+
podAnnotations: {}
|
|
163
|
+
podLabels: {}
|
|
164
|
+
nodeSelector: {}
|
|
165
|
+
tolerations: []
|
|
166
|
+
affinity: {}
|