shield360 1.1.0 → 1.2.1
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/README.md +330 -3
- package/dist/__tests__/build-info.test.js +8 -1
- package/dist/__tests__/build-info.test.js.map +1 -1
- package/dist/__tests__/code-location.test.js +1 -1
- package/dist/__tests__/destination.test.js +15 -0
- package/dist/__tests__/destination.test.js.map +1 -1
- package/dist/__tests__/masking.test.d.ts +1 -0
- package/dist/__tests__/masking.test.js +66 -0
- package/dist/__tests__/masking.test.js.map +1 -0
- package/dist/__tests__/register.e2e.test.d.ts +1 -0
- package/dist/__tests__/register.e2e.test.js +279 -0
- package/dist/__tests__/register.e2e.test.js.map +1 -0
- package/dist/__tests__/register.test.js +60 -0
- package/dist/__tests__/register.test.js.map +1 -1
- package/dist/agents/__tests__/agents.test.d.ts +1 -0
- package/dist/agents/__tests__/agents.test.js +529 -0
- package/dist/agents/__tests__/agents.test.js.map +1 -0
- package/dist/agents/index.d.ts +15 -0
- package/dist/agents/index.js +25 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/passport.d.ts +92 -0
- package/dist/agents/passport.js +301 -0
- package/dist/agents/passport.js.map +1 -0
- package/dist/agents/policy.d.ts +24 -0
- package/dist/agents/policy.js +93 -0
- package/dist/agents/policy.js.map +1 -0
- package/dist/agents/replay.d.ts +20 -0
- package/dist/agents/replay.js +47 -0
- package/dist/agents/replay.js.map +1 -0
- package/dist/agents/report.d.ts +30 -0
- package/dist/agents/report.js +93 -0
- package/dist/agents/report.js.map +1 -0
- package/dist/agents/types.d.ts +148 -0
- package/dist/agents/types.js +37 -0
- package/dist/agents/types.js.map +1 -0
- package/dist/agents/verifier.d.ts +33 -0
- package/dist/agents/verifier.js +276 -0
- package/dist/agents/verifier.js.map +1 -0
- package/dist/ai-security/__tests__/bench.test.d.ts +1 -0
- package/dist/ai-security/__tests__/bench.test.js +50 -0
- package/dist/ai-security/__tests__/bench.test.js.map +1 -0
- package/dist/ai-security/__tests__/checks.test.d.ts +1 -0
- package/dist/ai-security/__tests__/checks.test.js +248 -0
- package/dist/ai-security/__tests__/checks.test.js.map +1 -0
- package/dist/ai-security/__tests__/config.test.d.ts +1 -0
- package/dist/ai-security/__tests__/config.test.js +164 -0
- package/dist/ai-security/__tests__/config.test.js.map +1 -0
- package/dist/ai-security/__tests__/detection.test.d.ts +1 -0
- package/dist/ai-security/__tests__/detection.test.js +114 -0
- package/dist/ai-security/__tests__/detection.test.js.map +1 -0
- package/dist/ai-security/__tests__/fixtures.d.ts +8 -0
- package/dist/ai-security/__tests__/fixtures.js +30 -0
- package/dist/ai-security/__tests__/fixtures.js.map +1 -0
- package/dist/ai-security/__tests__/hooks.test.d.ts +1 -0
- package/dist/ai-security/__tests__/hooks.test.js +174 -0
- package/dist/ai-security/__tests__/hooks.test.js.map +1 -0
- package/dist/ai-security/__tests__/stream.test.d.ts +1 -0
- package/dist/ai-security/__tests__/stream.test.js +85 -0
- package/dist/ai-security/__tests__/stream.test.js.map +1 -0
- package/dist/ai-security/config.d.ts +94 -0
- package/dist/ai-security/config.js +241 -0
- package/dist/ai-security/config.js.map +1 -0
- package/dist/ai-security/context.d.ts +45 -0
- package/dist/ai-security/context.js +108 -0
- package/dist/ai-security/context.js.map +1 -0
- package/dist/ai-security/custom-kinds.d.ts +23 -0
- package/dist/ai-security/custom-kinds.js +97 -0
- package/dist/ai-security/custom-kinds.js.map +1 -0
- package/dist/ai-security/events.d.ts +77 -0
- package/dist/ai-security/events.js +153 -0
- package/dist/ai-security/events.js.map +1 -0
- package/dist/ai-security/hooks.d.ts +48 -0
- package/dist/ai-security/hooks.js +461 -0
- package/dist/ai-security/hooks.js.map +1 -0
- package/dist/ai-security/index.d.ts +209 -0
- package/dist/ai-security/index.js +587 -0
- package/dist/ai-security/index.js.map +1 -0
- package/dist/ai-security/injection-rules.json +1024 -0
- package/dist/ai-security/injection.d.ts +46 -0
- package/dist/ai-security/injection.js +635 -0
- package/dist/ai-security/injection.js.map +1 -0
- package/dist/ai-security/jailbreak.d.ts +38 -0
- package/dist/ai-security/jailbreak.js +73 -0
- package/dist/ai-security/jailbreak.js.map +1 -0
- package/dist/ai-security/limits.d.ts +84 -0
- package/dist/ai-security/limits.js +195 -0
- package/dist/ai-security/limits.js.map +1 -0
- package/dist/ai-security/mcp.d.ts +82 -0
- package/dist/ai-security/mcp.js +150 -0
- package/dist/ai-security/mcp.js.map +1 -0
- package/dist/ai-security/output.d.ts +107 -0
- package/dist/ai-security/output.js +390 -0
- package/dist/ai-security/output.js.map +1 -0
- package/dist/ai-security/policy.d.ts +125 -0
- package/dist/ai-security/policy.js +196 -0
- package/dist/ai-security/policy.js.map +1 -0
- package/dist/ai-security/rag.d.ts +70 -0
- package/dist/ai-security/rag.js +174 -0
- package/dist/ai-security/rag.js.map +1 -0
- package/dist/ai-security/tool-rules.json +203 -0
- package/dist/ai-security/tools.d.ts +46 -0
- package/dist/ai-security/tools.js +62 -0
- package/dist/ai-security/tools.js.map +1 -0
- package/dist/budgets/__tests__/budgets.test.d.ts +1 -0
- package/dist/budgets/__tests__/budgets.test.js +134 -0
- package/dist/budgets/__tests__/budgets.test.js.map +1 -0
- package/dist/budgets/auto.d.ts +25 -0
- package/dist/budgets/auto.js +63 -0
- package/dist/budgets/auto.js.map +1 -0
- package/dist/budgets/index.d.ts +110 -0
- package/dist/budgets/index.js +239 -0
- package/dist/budgets/index.js.map +1 -0
- package/dist/customer/__tests__/customer.test.d.ts +1 -0
- package/dist/customer/__tests__/customer.test.js +155 -0
- package/dist/customer/__tests__/customer.test.js.map +1 -0
- package/dist/customer/index.d.ts +48 -0
- package/dist/customer/index.js +132 -0
- package/dist/customer/index.js.map +1 -0
- package/dist/destination.d.ts +14 -0
- package/dist/destination.js +16 -0
- package/dist/destination.js.map +1 -1
- package/dist/feedback/__tests__/feedback.test.d.ts +1 -0
- package/dist/feedback/__tests__/feedback.test.js +80 -0
- package/dist/feedback/__tests__/feedback.test.js.map +1 -0
- package/dist/feedback/index.d.ts +48 -0
- package/dist/feedback/index.js +97 -0
- package/dist/feedback/index.js.map +1 -0
- package/dist/flags/__tests__/flags.test.d.ts +1 -0
- package/dist/flags/__tests__/flags.test.js +301 -0
- package/dist/flags/__tests__/flags.test.js.map +1 -0
- package/dist/flags/client.d.ts +131 -0
- package/dist/flags/client.js +301 -0
- package/dist/flags/client.js.map +1 -0
- package/dist/flags/engine.d.ts +200 -0
- package/dist/flags/engine.js +677 -0
- package/dist/flags/engine.js.map +1 -0
- package/dist/flags/index.d.ts +4 -0
- package/dist/flags/index.js +16 -0
- package/dist/flags/index.js.map +1 -0
- package/dist/guard/__tests__/findings.test.js +1 -1
- package/dist/guard/__tests__/report.test.js +67 -0
- package/dist/guard/__tests__/report.test.js.map +1 -1
- package/dist/guard/heartbeat.d.ts +34 -0
- package/dist/guard/heartbeat.js +83 -0
- package/dist/guard/heartbeat.js.map +1 -0
- package/dist/guard/integration.d.ts +9 -0
- package/dist/guard/integration.js +4 -2
- package/dist/guard/integration.js.map +1 -1
- package/dist/guard/report.d.ts +24 -1
- package/dist/guard/report.js +67 -18
- package/dist/guard/report.js.map +1 -1
- package/dist/index.d.ts +88 -0
- package/dist/index.js +203 -2
- package/dist/index.js.map +1 -1
- package/dist/instrumentation/__tests__/langchain-wrapper.test.js +1 -1
- package/dist/instrumentation/__tests__/langchain-wrapper.test.js.map +1 -1
- package/dist/instrumentation/anthropic/wrapper.js +4 -0
- package/dist/instrumentation/anthropic/wrapper.js.map +1 -1
- package/dist/instrumentation/openai/wrapper.js +6 -0
- package/dist/instrumentation/openai/wrapper.js.map +1 -1
- package/dist/masking.d.ts +42 -0
- package/dist/masking.js +197 -0
- package/dist/masking.js.map +1 -0
- package/dist/otel/__tests__/app-logs-safety.test.d.ts +1 -0
- package/dist/otel/__tests__/app-logs-safety.test.js +129 -0
- package/dist/otel/__tests__/app-logs-safety.test.js.map +1 -0
- package/dist/otel/__tests__/app-logs.test.d.ts +1 -0
- package/dist/otel/__tests__/app-logs.test.js +269 -0
- package/dist/otel/__tests__/app-logs.test.js.map +1 -0
- package/dist/otel/__tests__/log-auto.test.d.ts +1 -0
- package/dist/otel/__tests__/log-auto.test.js +125 -0
- package/dist/otel/__tests__/log-auto.test.js.map +1 -0
- package/dist/otel/__tests__/log-bridges.test.d.ts +1 -0
- package/dist/otel/__tests__/log-bridges.test.js +170 -0
- package/dist/otel/__tests__/log-bridges.test.js.map +1 -0
- package/dist/otel/__tests__/system-metrics.test.d.ts +1 -0
- package/dist/otel/__tests__/system-metrics.test.js +79 -0
- package/dist/otel/__tests__/system-metrics.test.js.map +1 -0
- package/dist/otel/app-logs.d.ts +80 -0
- package/dist/otel/app-logs.js +195 -0
- package/dist/otel/app-logs.js.map +1 -0
- package/dist/otel/build-info.d.ts +2 -1
- package/dist/otel/build-info.js +3 -2
- package/dist/otel/build-info.js.map +1 -1
- package/dist/otel/events.d.ts +1 -0
- package/dist/otel/events.js +22 -13
- package/dist/otel/events.js.map +1 -1
- package/dist/otel/log-auto.d.ts +44 -0
- package/dist/otel/log-auto.js +200 -0
- package/dist/otel/log-auto.js.map +1 -0
- package/dist/otel/log-bridges.d.ts +54 -0
- package/dist/otel/log-bridges.js +307 -0
- package/dist/otel/log-bridges.js.map +1 -0
- package/dist/otel/metrics.js +1 -1
- package/dist/otel/metrics.js.map +1 -1
- package/dist/otel/system-metrics.d.ts +39 -0
- package/dist/otel/system-metrics.js +166 -0
- package/dist/otel/system-metrics.js.map +1 -0
- package/dist/otel/tracing.js +6 -2
- package/dist/otel/tracing.js.map +1 -1
- package/dist/protect/__tests__/protect.test.js +4 -0
- package/dist/protect/__tests__/protect.test.js.map +1 -1
- package/dist/protect/index.js +9 -4
- package/dist/protect/index.js.map +1 -1
- package/dist/rasp/__tests__/auto-http.test.d.ts +1 -0
- package/dist/rasp/__tests__/auto-http.test.js +136 -0
- package/dist/rasp/__tests__/auto-http.test.js.map +1 -0
- package/dist/rasp/__tests__/baseline.test.d.ts +1 -0
- package/dist/rasp/__tests__/baseline.test.js +86 -0
- package/dist/rasp/__tests__/baseline.test.js.map +1 -0
- package/dist/rasp/__tests__/benign-corpus.test.d.ts +1 -0
- package/dist/rasp/__tests__/benign-corpus.test.js +68 -0
- package/dist/rasp/__tests__/benign-corpus.test.js.map +1 -0
- package/dist/rasp/__tests__/capture-context.test.d.ts +1 -0
- package/dist/rasp/__tests__/capture-context.test.js +135 -0
- package/dist/rasp/__tests__/capture-context.test.js.map +1 -0
- package/dist/rasp/__tests__/code-hook.test.d.ts +1 -0
- package/dist/rasp/__tests__/code-hook.test.js +218 -0
- package/dist/rasp/__tests__/code-hook.test.js.map +1 -0
- package/dist/rasp/__tests__/config-client.test.d.ts +1 -0
- package/dist/rasp/__tests__/config-client.test.js +283 -0
- package/dist/rasp/__tests__/config-client.test.js.map +1 -0
- package/dist/rasp/__tests__/corpus.d.ts +13 -0
- package/dist/rasp/__tests__/corpus.js +111 -0
- package/dist/rasp/__tests__/corpus.js.map +1 -0
- package/dist/rasp/__tests__/custom-rules.test.d.ts +1 -0
- package/dist/rasp/__tests__/custom-rules.test.js +276 -0
- package/dist/rasp/__tests__/custom-rules.test.js.map +1 -0
- package/dist/rasp/__tests__/db-hook.test.d.ts +1 -0
- package/dist/rasp/__tests__/db-hook.test.js +438 -0
- package/dist/rasp/__tests__/db-hook.test.js.map +1 -0
- package/dist/rasp/__tests__/deception.test.d.ts +1 -0
- package/dist/rasp/__tests__/deception.test.js +567 -0
- package/dist/rasp/__tests__/deception.test.js.map +1 -0
- package/dist/rasp/__tests__/detect.test.d.ts +1 -0
- package/dist/rasp/__tests__/detect.test.js +276 -0
- package/dist/rasp/__tests__/detect.test.js.map +1 -0
- package/dist/rasp/__tests__/esm-exports.test.d.ts +1 -0
- package/dist/rasp/__tests__/esm-exports.test.js +20 -0
- package/dist/rasp/__tests__/esm-exports.test.js.map +1 -0
- package/dist/rasp/__tests__/fs-hook.test.d.ts +1 -0
- package/dist/rasp/__tests__/fs-hook.test.js +241 -0
- package/dist/rasp/__tests__/fs-hook.test.js.map +1 -0
- package/dist/rasp/__tests__/hook-contracts.test.d.ts +1 -0
- package/dist/rasp/__tests__/hook-contracts.test.js +201 -0
- package/dist/rasp/__tests__/hook-contracts.test.js.map +1 -0
- package/dist/rasp/__tests__/hook-kit.d.ts +42 -0
- package/dist/rasp/__tests__/hook-kit.js +139 -0
- package/dist/rasp/__tests__/hook-kit.js.map +1 -0
- package/dist/rasp/__tests__/http-hook.test.d.ts +1 -0
- package/dist/rasp/__tests__/http-hook.test.js +250 -0
- package/dist/rasp/__tests__/http-hook.test.js.map +1 -0
- package/dist/rasp/__tests__/iast.test.d.ts +1 -0
- package/dist/rasp/__tests__/iast.test.js +361 -0
- package/dist/rasp/__tests__/iast.test.js.map +1 -0
- package/dist/rasp/__tests__/include-hook.test.d.ts +1 -0
- package/dist/rasp/__tests__/include-hook.test.js +122 -0
- package/dist/rasp/__tests__/include-hook.test.js.map +1 -0
- package/dist/rasp/__tests__/middleware.test.d.ts +1 -0
- package/dist/rasp/__tests__/middleware.test.js +302 -0
- package/dist/rasp/__tests__/middleware.test.js.map +1 -0
- package/dist/rasp/__tests__/process-hook.test.d.ts +1 -0
- package/dist/rasp/__tests__/process-hook.test.js +238 -0
- package/dist/rasp/__tests__/process-hook.test.js.map +1 -0
- package/dist/rasp/__tests__/reporter.test.d.ts +1 -0
- package/dist/rasp/__tests__/reporter.test.js +114 -0
- package/dist/rasp/__tests__/reporter.test.js.map +1 -0
- package/dist/rasp/__tests__/route.test.d.ts +1 -0
- package/dist/rasp/__tests__/route.test.js +46 -0
- package/dist/rasp/__tests__/route.test.js.map +1 -0
- package/dist/rasp/__tests__/rule-expr.test.d.ts +1 -0
- package/dist/rasp/__tests__/rule-expr.test.js +151 -0
- package/dist/rasp/__tests__/rule-expr.test.js.map +1 -0
- package/dist/rasp/__tests__/rule-phases.test.d.ts +1 -0
- package/dist/rasp/__tests__/rule-phases.test.js +271 -0
- package/dist/rasp/__tests__/rule-phases.test.js.map +1 -0
- package/dist/rasp/__tests__/sinks-hook.test.d.ts +1 -0
- package/dist/rasp/__tests__/sinks-hook.test.js +177 -0
- package/dist/rasp/__tests__/sinks-hook.test.js.map +1 -0
- package/dist/rasp/__tests__/targets.test.d.ts +1 -0
- package/dist/rasp/__tests__/targets.test.js +82 -0
- package/dist/rasp/__tests__/targets.test.js.map +1 -0
- package/dist/rasp/__tests__/template-hook.test.d.ts +1 -0
- package/dist/rasp/__tests__/template-hook.test.js +254 -0
- package/dist/rasp/__tests__/template-hook.test.js.map +1 -0
- package/dist/rasp/__tests__/upload.test.d.ts +1 -0
- package/dist/rasp/__tests__/upload.test.js +81 -0
- package/dist/rasp/__tests__/upload.test.js.map +1 -0
- package/dist/rasp/__tests__/vpatch-engine.test.d.ts +1 -0
- package/dist/rasp/__tests__/vpatch-engine.test.js +177 -0
- package/dist/rasp/__tests__/vpatch-engine.test.js.map +1 -0
- package/dist/rasp/auto-http.d.ts +6 -0
- package/dist/rasp/auto-http.js +194 -0
- package/dist/rasp/auto-http.js.map +1 -0
- package/dist/rasp/baseline.d.ts +35 -0
- package/dist/rasp/baseline.js +91 -0
- package/dist/rasp/baseline.js.map +1 -0
- package/dist/rasp/capture.d.ts +76 -0
- package/dist/rasp/capture.js +304 -0
- package/dist/rasp/capture.js.map +1 -0
- package/dist/rasp/config-client.d.ts +122 -0
- package/dist/rasp/config-client.js +337 -0
- package/dist/rasp/config-client.js.map +1 -0
- package/dist/rasp/context.d.ts +65 -0
- package/dist/rasp/context.js +68 -0
- package/dist/rasp/context.js.map +1 -0
- package/dist/rasp/custom-rules.d.ts +68 -0
- package/dist/rasp/custom-rules.js +222 -0
- package/dist/rasp/custom-rules.js.map +1 -0
- package/dist/rasp/data/default-rules.json +199 -0
- package/dist/rasp/data/default-sinks.json +4 -0
- package/dist/rasp/data/dnslog-domains.json +11 -0
- package/dist/rasp/deception.d.ts +70 -0
- package/dist/rasp/deception.js +220 -0
- package/dist/rasp/deception.js.map +1 -0
- package/dist/rasp/detect.d.ts +68 -0
- package/dist/rasp/detect.js +671 -0
- package/dist/rasp/detect.js.map +1 -0
- package/dist/rasp/engine.d.ts +107 -0
- package/dist/rasp/engine.js +330 -0
- package/dist/rasp/engine.js.map +1 -0
- package/dist/rasp/hooks/code.d.ts +20 -0
- package/dist/rasp/hooks/code.js +334 -0
- package/dist/rasp/hooks/code.js.map +1 -0
- package/dist/rasp/hooks/db.d.ts +48 -0
- package/dist/rasp/hooks/db.js +322 -0
- package/dist/rasp/hooks/db.js.map +1 -0
- package/dist/rasp/hooks/esm.d.ts +7 -0
- package/dist/rasp/hooks/esm.js +18 -0
- package/dist/rasp/hooks/esm.js.map +1 -0
- package/dist/rasp/hooks/fs.d.ts +3 -0
- package/dist/rasp/hooks/fs.js +206 -0
- package/dist/rasp/hooks/fs.js.map +1 -0
- package/dist/rasp/hooks/http.d.ts +4 -0
- package/dist/rasp/hooks/http.js +213 -0
- package/dist/rasp/hooks/http.js.map +1 -0
- package/dist/rasp/hooks/include.d.ts +9 -0
- package/dist/rasp/hooks/include.js +79 -0
- package/dist/rasp/hooks/include.js.map +1 -0
- package/dist/rasp/hooks/marks.d.ts +2 -0
- package/dist/rasp/hooks/marks.js +16 -0
- package/dist/rasp/hooks/marks.js.map +1 -0
- package/dist/rasp/hooks/process.d.ts +22 -0
- package/dist/rasp/hooks/process.js +191 -0
- package/dist/rasp/hooks/process.js.map +1 -0
- package/dist/rasp/hooks/sinks.d.ts +54 -0
- package/dist/rasp/hooks/sinks.js +329 -0
- package/dist/rasp/hooks/sinks.js.map +1 -0
- package/dist/rasp/hooks/template.d.ts +21 -0
- package/dist/rasp/hooks/template.js +152 -0
- package/dist/rasp/hooks/template.js.map +1 -0
- package/dist/rasp/iast-rules.d.ts +82 -0
- package/dist/rasp/iast-rules.js +240 -0
- package/dist/rasp/iast-rules.js.map +1 -0
- package/dist/rasp/iast-scope.d.ts +29 -0
- package/dist/rasp/iast-scope.js +54 -0
- package/dist/rasp/iast-scope.js.map +1 -0
- package/dist/rasp/iast.d.ts +81 -0
- package/dist/rasp/iast.js +272 -0
- package/dist/rasp/iast.js.map +1 -0
- package/dist/rasp/index.d.ts +52 -0
- package/dist/rasp/index.js +280 -0
- package/dist/rasp/index.js.map +1 -0
- package/dist/rasp/lexers.d.ts +32 -0
- package/dist/rasp/lexers.js +444 -0
- package/dist/rasp/lexers.js.map +1 -0
- package/dist/rasp/middleware.d.ts +155 -0
- package/dist/rasp/middleware.js +568 -0
- package/dist/rasp/middleware.js.map +1 -0
- package/dist/rasp/model-output.d.ts +14 -0
- package/dist/rasp/model-output.js +107 -0
- package/dist/rasp/model-output.js.map +1 -0
- package/dist/rasp/normalize.d.ts +23 -0
- package/dist/rasp/normalize.js +140 -0
- package/dist/rasp/normalize.js.map +1 -0
- package/dist/rasp/reporter.d.ts +60 -0
- package/dist/rasp/reporter.js +230 -0
- package/dist/rasp/reporter.js.map +1 -0
- package/dist/rasp/rule-expr.d.ts +236 -0
- package/dist/rasp/rule-expr.js +1253 -0
- package/dist/rasp/rule-expr.js.map +1 -0
- package/dist/rasp/template.d.ts +53 -0
- package/dist/rasp/template.js +336 -0
- package/dist/rasp/template.js.map +1 -0
- package/dist/rasp/types.d.ts +110 -0
- package/dist/rasp/types.js +51 -0
- package/dist/rasp/types.js.map +1 -0
- package/dist/rasp/vpatch.d.ts +55 -0
- package/dist/rasp/vpatch.js +120 -0
- package/dist/rasp/vpatch.js.map +1 -0
- package/dist/register.js +52 -11
- package/dist/register.js.map +1 -1
- package/dist/semantic-convention.d.ts +2 -0
- package/dist/semantic-convention.js +5 -0
- package/dist/semantic-convention.js.map +1 -1
- package/dist/types.d.ts +77 -1
- package/dist/zero-code.d.ts +8 -0
- package/dist/zero-code.js +38 -0
- package/dist/zero-code.js.map +1 -0
- package/package.json +18 -2
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sends check results to the receiver project's inbound decision log
|
|
3
|
+
* (POST /api/inbound-agents/decisions, at most 100 per call). Queued and sent
|
|
4
|
+
* off the request path; a batch that cannot be delivered is retried a few
|
|
5
|
+
* times and then dropped with a warning. Never the passport, headers or bodies.
|
|
6
|
+
*/
|
|
7
|
+
import { AgentCheck, Shield360Connection } from './types';
|
|
8
|
+
export declare const REPORT_BATCH = 100;
|
|
9
|
+
export type ReportedDecision = AgentCheck & {
|
|
10
|
+
at: string;
|
|
11
|
+
route?: string;
|
|
12
|
+
method?: string;
|
|
13
|
+
receiver?: string;
|
|
14
|
+
};
|
|
15
|
+
export declare class DecisionReporter {
|
|
16
|
+
private readonly conn;
|
|
17
|
+
private readonly fetchImpl;
|
|
18
|
+
private readonly retryDelayMs;
|
|
19
|
+
private readonly queue;
|
|
20
|
+
private readonly endpoint;
|
|
21
|
+
private timer;
|
|
22
|
+
private sending;
|
|
23
|
+
private warnedFull;
|
|
24
|
+
constructor(conn: Shield360Connection, fetchImpl: () => typeof fetch, retryDelayMs?: number);
|
|
25
|
+
add(decision: ReportedDecision): void;
|
|
26
|
+
/** Sends everything queued; resolves when it has been tried. Never rejects. */
|
|
27
|
+
flush(): Promise<void>;
|
|
28
|
+
close(): Promise<void>;
|
|
29
|
+
private post;
|
|
30
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Sends check results to the receiver project's inbound decision log
|
|
4
|
+
* (POST /api/inbound-agents/decisions, at most 100 per call). Queued and sent
|
|
5
|
+
* off the request path; a batch that cannot be delivered is retried a few
|
|
6
|
+
* times and then dropped with a warning. Never the passport, headers or bodies.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.DecisionReporter = exports.REPORT_BATCH = void 0;
|
|
10
|
+
const policy_1 = require("./policy");
|
|
11
|
+
exports.REPORT_BATCH = 100;
|
|
12
|
+
const FLUSH_MS = 3000;
|
|
13
|
+
const MAX_QUEUED = 5000;
|
|
14
|
+
const ATTEMPTS = 3;
|
|
15
|
+
const TIMEOUT_MS = 10000;
|
|
16
|
+
class DecisionReporter {
|
|
17
|
+
constructor(conn, fetchImpl, retryDelayMs = 500) {
|
|
18
|
+
this.conn = conn;
|
|
19
|
+
this.fetchImpl = fetchImpl;
|
|
20
|
+
this.retryDelayMs = retryDelayMs;
|
|
21
|
+
this.queue = [];
|
|
22
|
+
this.sending = Promise.resolve();
|
|
23
|
+
this.warnedFull = false;
|
|
24
|
+
this.endpoint = `${(0, policy_1.baseUrlOf)(conn)}/api/inbound-agents/decisions`;
|
|
25
|
+
}
|
|
26
|
+
add(decision) {
|
|
27
|
+
if (this.queue.length >= MAX_QUEUED) {
|
|
28
|
+
if (!this.warnedFull)
|
|
29
|
+
console.warn('Shield360 agents: the decision report queue is full; reports are being dropped');
|
|
30
|
+
this.warnedFull = true;
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
this.warnedFull = false;
|
|
34
|
+
this.queue.push(decision);
|
|
35
|
+
if (!this.timer) {
|
|
36
|
+
this.timer = setInterval(() => void this.flush(), FLUSH_MS);
|
|
37
|
+
// Never keep a process alive just to report.
|
|
38
|
+
this.timer.unref?.();
|
|
39
|
+
}
|
|
40
|
+
if (this.queue.length >= exports.REPORT_BATCH)
|
|
41
|
+
void this.flush();
|
|
42
|
+
}
|
|
43
|
+
/** Sends everything queued; resolves when it has been tried. Never rejects. */
|
|
44
|
+
flush() {
|
|
45
|
+
this.sending = this.sending
|
|
46
|
+
.then(async () => {
|
|
47
|
+
while (this.queue.length)
|
|
48
|
+
await this.post(this.queue.splice(0, exports.REPORT_BATCH));
|
|
49
|
+
})
|
|
50
|
+
.catch(() => undefined);
|
|
51
|
+
return this.sending;
|
|
52
|
+
}
|
|
53
|
+
close() {
|
|
54
|
+
if (this.timer)
|
|
55
|
+
clearInterval(this.timer);
|
|
56
|
+
this.timer = undefined;
|
|
57
|
+
return this.flush();
|
|
58
|
+
}
|
|
59
|
+
async post(batch) {
|
|
60
|
+
const body = JSON.stringify({ decisions: batch });
|
|
61
|
+
for (let attempt = 0; attempt < ATTEMPTS; attempt++) {
|
|
62
|
+
const controller = typeof AbortController === 'function' ? new AbortController() : undefined;
|
|
63
|
+
const t = controller ? setTimeout(() => controller.abort(), TIMEOUT_MS) : undefined;
|
|
64
|
+
t?.unref?.();
|
|
65
|
+
try {
|
|
66
|
+
const res = await this.fetchImpl()(this.endpoint, {
|
|
67
|
+
method: 'POST',
|
|
68
|
+
headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${this.conn.apiKey}` },
|
|
69
|
+
body,
|
|
70
|
+
signal: controller?.signal,
|
|
71
|
+
});
|
|
72
|
+
if (res.ok)
|
|
73
|
+
return;
|
|
74
|
+
if ([400, 401, 403, 404, 413].includes(res.status)) {
|
|
75
|
+
console.warn(`Shield360 agents: the inbound decision log refused ${batch.length} report(s): HTTP ${res.status}`);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
// retried below
|
|
81
|
+
}
|
|
82
|
+
finally {
|
|
83
|
+
if (t)
|
|
84
|
+
clearTimeout(t);
|
|
85
|
+
}
|
|
86
|
+
if (attempt < ATTEMPTS - 1)
|
|
87
|
+
await new Promise((r) => setTimeout(r, this.retryDelayMs * (attempt + 1)));
|
|
88
|
+
}
|
|
89
|
+
console.warn(`Shield360 agents: could not deliver ${batch.length} decision report(s); dropped`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.DecisionReporter = DecisionReporter;
|
|
93
|
+
//# sourceMappingURL=report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../src/agents/report.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,qCAAqC;AAGxB,QAAA,YAAY,GAAG,GAAG,CAAC;AAChC,MAAM,QAAQ,GAAG,IAAI,CAAC;AACtB,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,QAAQ,GAAG,CA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AAE;oBAC5F,IAAI;oBACJ,MAAM,EAAE,UAAU,EAAE,MAAM;iBAC3B,CAAC,CAAC;gBACH,IAAI,GAAG,CAAC,EAAE;oBAAE,OAAO;gBACnB,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;oBACnD,OAAO,CAAC,IAAI,CAAC,sDAAsD,KAAK,CAAC,MAAM,oBAAoB,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;oBACjH,OAAO;gBACT,CAAC;YACH,CAAC;YAAC,MAAM,CAAC;gBACP,gBAAgB;YAClB,CAAC;oBAAS,CAAC;gBACT,IAAI,CAAC;oBAAE,YAAY,CAAC,CAAC,CAAC,CAAC;YACzB,CAAC;YACD,IAAI,OAAO,GAAG,QAAQ,GAAG,CAAC;gBAAE,MAAM,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,IAAI,CAAC,YAAY,GAAG,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACzG,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,uCAAuC,KAAK,CAAC,MAAM,8BAA8B,CAAC,CAAC;IAClG,CAAC;CACF;AA1ED,4CA0EC"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent passports: the types shared by the verifier, its policy and its reports.
|
|
3
|
+
*
|
|
4
|
+
* The wire formats (passport claims, receiver policy, check result) are a
|
|
5
|
+
* contract with the Shield360 app (issuer: /api/agent-passports/*, receiver:
|
|
6
|
+
* /api/inbound-agents/*) and with the Python verifier.
|
|
7
|
+
*
|
|
8
|
+
* Must stay in sync with: sdk/python/src/shield360/agents/_types.py
|
|
9
|
+
*/
|
|
10
|
+
/** The HTTP header a calling agent sends its passport in. */
|
|
11
|
+
export declare const AGENT_HEADER = "Shield360-Agent";
|
|
12
|
+
/** The JWS `typ` every passport carries. */
|
|
13
|
+
export declare const PASSPORT_TYP = "shield360-agent+jwt";
|
|
14
|
+
/** Issuers trusted when none are configured. */
|
|
15
|
+
export declare const DEFAULT_ISSUERS: string[];
|
|
16
|
+
/** The Shield360 app the policy and reports go to when no base URL is given. */
|
|
17
|
+
export declare const DEFAULT_BASE_URL = "https://app.shield360.ai";
|
|
18
|
+
/** The longest lifetime (exp - iat) a passport may have, in seconds. */
|
|
19
|
+
export declare const MAX_LIFETIME_SECONDS = 300;
|
|
20
|
+
/** How strongly a passport shows the agent acts for a person, strongest first. */
|
|
21
|
+
export type Assurance = 'delegated' | 'named' | 'unverified';
|
|
22
|
+
export declare const ASSURANCE_LEVELS: readonly Assurance[];
|
|
23
|
+
/** The weakest assurance a receiver accepts; "none" has no requirement. */
|
|
24
|
+
export type MinAssurance = 'none' | Assurance;
|
|
25
|
+
/** Rank of an assurance: higher is stronger; "none" (or no act) is 0. */
|
|
26
|
+
export declare function assuranceRank(a: MinAssurance | undefined): number;
|
|
27
|
+
/** The receiver's policy: what to do with the agents that call it. */
|
|
28
|
+
export type AgentPolicy = {
|
|
29
|
+
/** observe: never block, report what enforce would do. */
|
|
30
|
+
mode: 'observe' | 'enforce';
|
|
31
|
+
/** A call without a passport is denied (reason "absent"). */
|
|
32
|
+
requireAgent: boolean;
|
|
33
|
+
/** Allowed operator ids or domains; empty means any verified operator. */
|
|
34
|
+
operators: string[];
|
|
35
|
+
/** The passport must say the agent acts for a person (the `act` claim). */
|
|
36
|
+
requireOnBehalfOf: boolean;
|
|
37
|
+
/** Always ask the issuer whether the passport is still good. */
|
|
38
|
+
online: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* The weakest on-behalf-of assurance accepted. "none" (default): no
|
|
41
|
+
* requirement; otherwise a passport without act, or with weaker assurance,
|
|
42
|
+
* is denied with "assurance_too_low".
|
|
43
|
+
*/
|
|
44
|
+
minAssurance: MinAssurance;
|
|
45
|
+
};
|
|
46
|
+
export declare const DEFAULT_POLICY: Readonly<AgentPolicy>;
|
|
47
|
+
/** Why a check did not verify, or why the policy denied it. */
|
|
48
|
+
export type AgentCheckReason = 'malformed' | 'unsupported_alg' | 'untrusted_issuer' | 'unknown_key' | 'bad_signature' | 'expired' | 'not_yet_valid' | 'lifetime_too_long' | 'wrong_audience' | 'replayed' | 'replay_check_failed' | 'revoked' | 'unknown_passport' | 'issuer_unreachable' | 'absent' | 'operator_not_allowed' | 'on_behalf_of_required' | 'assurance_too_low';
|
|
49
|
+
export type AgentIdentity = {
|
|
50
|
+
id: string;
|
|
51
|
+
name: string;
|
|
52
|
+
purpose?: string;
|
|
53
|
+
status?: 'enrolled' | 'not_enrolled';
|
|
54
|
+
environment?: string | null;
|
|
55
|
+
risk?: string | null;
|
|
56
|
+
owner?: {
|
|
57
|
+
domain: string | null;
|
|
58
|
+
};
|
|
59
|
+
/** ISO 8601. */
|
|
60
|
+
reviewedAt?: string | null;
|
|
61
|
+
/** ISO 8601. */
|
|
62
|
+
enrolledAt?: string | null;
|
|
63
|
+
};
|
|
64
|
+
export type AgentOperator = {
|
|
65
|
+
id: string;
|
|
66
|
+
name: string;
|
|
67
|
+
domain: string | null;
|
|
68
|
+
};
|
|
69
|
+
export type AgentMandate = {
|
|
70
|
+
id: string;
|
|
71
|
+
expiresAt: string;
|
|
72
|
+
};
|
|
73
|
+
export type AgentOnBehalfOf = {
|
|
74
|
+
id: string;
|
|
75
|
+
domain: string | null;
|
|
76
|
+
/** "named" when the passport's act carries none. Lowered when the issuer says so online. */
|
|
77
|
+
assurance: Assurance;
|
|
78
|
+
mandate?: AgentMandate;
|
|
79
|
+
};
|
|
80
|
+
/** The result of one check. Never contains the passport itself. */
|
|
81
|
+
export type AgentCheck = {
|
|
82
|
+
status: 'verified' | 'absent' | 'invalid';
|
|
83
|
+
/** What the policy says. */
|
|
84
|
+
decision: 'allow' | 'deny';
|
|
85
|
+
/** decision === "deny" && mode === "enforce". */
|
|
86
|
+
blocked: boolean;
|
|
87
|
+
reason?: AgentCheckReason | string;
|
|
88
|
+
agent?: AgentIdentity;
|
|
89
|
+
operator?: AgentOperator;
|
|
90
|
+
/** id is the pairwise person id (act.sub): stable per receiver, never the person's id or email. */
|
|
91
|
+
onBehalfOf?: AgentOnBehalfOf;
|
|
92
|
+
scopes: string[];
|
|
93
|
+
issuer?: string;
|
|
94
|
+
/** The passport's jti. */
|
|
95
|
+
passportId?: string;
|
|
96
|
+
/** ISO 8601. */
|
|
97
|
+
expiresAt?: string;
|
|
98
|
+
};
|
|
99
|
+
/** Remembers passport ids so each is accepted once. */
|
|
100
|
+
export interface ReplayStore {
|
|
101
|
+
/**
|
|
102
|
+
* Records `jti` until `expiresAtMs` (epoch milliseconds) and returns whether
|
|
103
|
+
* it had already been seen. Must be atomic for clustered receivers (e.g.
|
|
104
|
+
* Redis `SET key 1 NX PXAT expiresAtMs`, seen = the SET did not happen).
|
|
105
|
+
*/
|
|
106
|
+
seen(jti: string, expiresAtMs: number): Promise<boolean>;
|
|
107
|
+
}
|
|
108
|
+
export type Shield360Connection = {
|
|
109
|
+
apiKey: string;
|
|
110
|
+
baseUrl?: string;
|
|
111
|
+
};
|
|
112
|
+
export type AgentVerifierOptions = {
|
|
113
|
+
/** The receiver: a host name (`api.servflo.ai`) or an https origin, or several. */
|
|
114
|
+
audience: string | string[];
|
|
115
|
+
/** Trusted issuers' base URLs. Default ["https://app.shield360.ai"]. */
|
|
116
|
+
issuers?: string[];
|
|
117
|
+
/** Local policy, merged over the defaults and over the console policy. */
|
|
118
|
+
policy?: Partial<AgentPolicy>;
|
|
119
|
+
/** Follow the console policy of the receiver's Shield360 project (cached 60 s). */
|
|
120
|
+
policyFrom?: Shield360Connection;
|
|
121
|
+
/** Send results to the project's inbound decision log (batched, never blocks). */
|
|
122
|
+
report?: Shield360Connection;
|
|
123
|
+
/** Where passport ids are remembered. Default: in memory, per process. */
|
|
124
|
+
replay?: ReplayStore;
|
|
125
|
+
/** Allowed clock difference with the issuer, seconds. Default 60. */
|
|
126
|
+
clockSkewSeconds?: number;
|
|
127
|
+
/**
|
|
128
|
+
* What a failed online check (issuer unreachable) means. Default "allow":
|
|
129
|
+
* the passport was already verified offline.
|
|
130
|
+
*/
|
|
131
|
+
onlineFailure?: 'allow' | 'deny';
|
|
132
|
+
fetch?: typeof fetch;
|
|
133
|
+
/** Milliseconds since the epoch; for tests. */
|
|
134
|
+
clock?: () => number;
|
|
135
|
+
};
|
|
136
|
+
export type AgentCheckOptions = {
|
|
137
|
+
/** Ask the issuer too (also on when the policy says online). */
|
|
138
|
+
online?: boolean;
|
|
139
|
+
/** Recorded with the report; never sent anywhere else. */
|
|
140
|
+
route?: string;
|
|
141
|
+
method?: string;
|
|
142
|
+
};
|
|
143
|
+
/** Anything a passport can be read from. */
|
|
144
|
+
export type AgentCheckInput = string | Request | Headers | {
|
|
145
|
+
headers: unknown;
|
|
146
|
+
} | {
|
|
147
|
+
get(name: string): unknown;
|
|
148
|
+
} | Record<string, string | string[] | undefined> | null | undefined;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Agent passports: the types shared by the verifier, its policy and its reports.
|
|
4
|
+
*
|
|
5
|
+
* The wire formats (passport claims, receiver policy, check result) are a
|
|
6
|
+
* contract with the Shield360 app (issuer: /api/agent-passports/*, receiver:
|
|
7
|
+
* /api/inbound-agents/*) and with the Python verifier.
|
|
8
|
+
*
|
|
9
|
+
* Must stay in sync with: sdk/python/src/shield360/agents/_types.py
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.DEFAULT_POLICY = exports.ASSURANCE_LEVELS = exports.MAX_LIFETIME_SECONDS = exports.DEFAULT_BASE_URL = exports.DEFAULT_ISSUERS = exports.PASSPORT_TYP = exports.AGENT_HEADER = void 0;
|
|
13
|
+
exports.assuranceRank = assuranceRank;
|
|
14
|
+
/** The HTTP header a calling agent sends its passport in. */
|
|
15
|
+
exports.AGENT_HEADER = 'Shield360-Agent';
|
|
16
|
+
/** The JWS `typ` every passport carries. */
|
|
17
|
+
exports.PASSPORT_TYP = 'shield360-agent+jwt';
|
|
18
|
+
/** Issuers trusted when none are configured. */
|
|
19
|
+
exports.DEFAULT_ISSUERS = ['https://app.shield360.ai'];
|
|
20
|
+
/** The Shield360 app the policy and reports go to when no base URL is given. */
|
|
21
|
+
exports.DEFAULT_BASE_URL = 'https://app.shield360.ai';
|
|
22
|
+
/** The longest lifetime (exp - iat) a passport may have, in seconds. */
|
|
23
|
+
exports.MAX_LIFETIME_SECONDS = 300;
|
|
24
|
+
exports.ASSURANCE_LEVELS = ['delegated', 'named', 'unverified'];
|
|
25
|
+
/** Rank of an assurance: higher is stronger; "none" (or no act) is 0. */
|
|
26
|
+
function assuranceRank(a) {
|
|
27
|
+
return a === 'delegated' ? 3 : a === 'named' ? 2 : a === 'unverified' ? 1 : 0;
|
|
28
|
+
}
|
|
29
|
+
exports.DEFAULT_POLICY = Object.freeze({
|
|
30
|
+
mode: 'observe',
|
|
31
|
+
requireAgent: false,
|
|
32
|
+
operators: [],
|
|
33
|
+
requireOnBehalfOf: false,
|
|
34
|
+
online: false,
|
|
35
|
+
minAssurance: 'none',
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/agents/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAwBH,sCAEC;AAxBD,6DAA6D;AAChD,QAAA,YAAY,GAAG,iBAAiB,CAAC;AAE9C,4CAA4C;AAC/B,QAAA,YAAY,GAAG,qBAAqB,CAAC;AAElD,gDAAgD;AACnC,QAAA,eAAe,GAAG,CAAC,0BAA0B,CAAC,CAAC;AAE5D,gFAAgF;AACnE,QAAA,gBAAgB,GAAG,0BAA0B,CAAC;AAE3D,wEAAwE;AAC3D,QAAA,oBAAoB,GAAG,GAAG,CAAC;AAI3B,QAAA,gBAAgB,GAAyB,CAAC,WAAW,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;AAI3F,yEAAyE;AACzE,SAAgB,aAAa,CAAC,CAA2B;IACvD,OAAO,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAChF,CAAC;AAsBY,QAAA,cAAc,GAA0B,MAAM,CAAC,MAAM,CAAC;IACjE,IAAI,EAAE,SAAS;IACf,YAAY,EAAE,KAAK;IACnB,SAAS,EAAE,EAAE;IACb,iBAAiB,EAAE,KAAK;IACxB,MAAM,EAAE,KAAK;IACb,YAAY,EAAE,MAAM;CACrB,CAAC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The agent passport verifier: reads the Shield360-Agent header, verifies the
|
|
3
|
+
* passport offline (optionally online too), applies the receiver's policy and
|
|
4
|
+
* reports the result. A passport proves who the agent is, who runs it and for
|
|
5
|
+
* whom it acts; it never grants access by itself.
|
|
6
|
+
*
|
|
7
|
+
* Verification order and reason codes are the contract in the agent passports
|
|
8
|
+
* spec; every verifier (this one, the Python one, the issuer's verify route)
|
|
9
|
+
* follows the same order.
|
|
10
|
+
*
|
|
11
|
+
* Must stay in sync with: sdk/python/src/shield360/agents/_verifier.py
|
|
12
|
+
*/
|
|
13
|
+
import { AgentCheck, AgentCheckInput, AgentCheckOptions, AgentPolicy, AgentVerifierOptions } from './types';
|
|
14
|
+
type Lookup = {
|
|
15
|
+
token?: string;
|
|
16
|
+
multiple?: boolean;
|
|
17
|
+
};
|
|
18
|
+
/** Finds the passport in a Request, IncomingMessage, Headers, header record or string. */
|
|
19
|
+
export declare function readPassport(input: AgentCheckInput): Lookup;
|
|
20
|
+
export type AgentVerifier = {
|
|
21
|
+
/** Checks the passport an input carries. Never throws. */
|
|
22
|
+
check(input: AgentCheckInput, opts?: AgentCheckOptions): Promise<AgentCheck>;
|
|
23
|
+
/** Express/Connect middleware: sets req.shield360Agent, answers 403 when blocked. */
|
|
24
|
+
middleware(): (req: any, res: any, next: (err?: unknown) => void) => void;
|
|
25
|
+
/** The policy in force now (defaults, console, local). */
|
|
26
|
+
policy(): Promise<AgentPolicy>;
|
|
27
|
+
/** Sends queued reports now. */
|
|
28
|
+
flush(): Promise<void>;
|
|
29
|
+
/** Stops the report timer and sends what is queued. */
|
|
30
|
+
close(): Promise<void>;
|
|
31
|
+
};
|
|
32
|
+
export declare function agentVerifier(options: AgentVerifierOptions): AgentVerifier;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The agent passport verifier: reads the Shield360-Agent header, verifies the
|
|
4
|
+
* passport offline (optionally online too), applies the receiver's policy and
|
|
5
|
+
* reports the result. A passport proves who the agent is, who runs it and for
|
|
6
|
+
* whom it acts; it never grants access by itself.
|
|
7
|
+
*
|
|
8
|
+
* Verification order and reason codes are the contract in the agent passports
|
|
9
|
+
* spec; every verifier (this one, the Python one, the issuer's verify route)
|
|
10
|
+
* follows the same order.
|
|
11
|
+
*
|
|
12
|
+
* Must stay in sync with: sdk/python/src/shield360/agents/_verifier.py
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.readPassport = readPassport;
|
|
16
|
+
exports.agentVerifier = agentVerifier;
|
|
17
|
+
const passport_1 = require("./passport");
|
|
18
|
+
const policy_1 = require("./policy");
|
|
19
|
+
const replay_1 = require("./replay");
|
|
20
|
+
const report_1 = require("./report");
|
|
21
|
+
const types_1 = require("./types");
|
|
22
|
+
const HEADER_LC = types_1.AGENT_HEADER.toLowerCase();
|
|
23
|
+
const REASON = /^[a-z][a-z0-9_]{0,63}$/;
|
|
24
|
+
function fromValue(v) {
|
|
25
|
+
if (Array.isArray(v)) {
|
|
26
|
+
const values = v.filter((x) => typeof x === 'string' && x.trim());
|
|
27
|
+
if (values.length > 1)
|
|
28
|
+
return { multiple: true };
|
|
29
|
+
return { token: values[0]?.trim() };
|
|
30
|
+
}
|
|
31
|
+
return typeof v === 'string' && v.trim() ? { token: v.trim() } : {};
|
|
32
|
+
}
|
|
33
|
+
function fromRecord(rec) {
|
|
34
|
+
for (const k of Object.keys(rec))
|
|
35
|
+
if (k.toLowerCase() === HEADER_LC)
|
|
36
|
+
return fromValue(rec[k]);
|
|
37
|
+
return {};
|
|
38
|
+
}
|
|
39
|
+
/** Finds the passport in a Request, IncomingMessage, Headers, header record or string. */
|
|
40
|
+
function readPassport(input) {
|
|
41
|
+
try {
|
|
42
|
+
if (input === null || input === undefined)
|
|
43
|
+
return {};
|
|
44
|
+
if (typeof input === 'string')
|
|
45
|
+
return fromValue(input);
|
|
46
|
+
if (typeof input !== 'object')
|
|
47
|
+
return {};
|
|
48
|
+
const anyInput = input;
|
|
49
|
+
if (typeof anyInput.get === 'function')
|
|
50
|
+
return fromValue(anyInput.get.call(input, types_1.AGENT_HEADER));
|
|
51
|
+
if ('headers' in anyInput && typeof anyInput.headers === 'object' && anyInput.headers !== null) {
|
|
52
|
+
const h = anyInput.headers;
|
|
53
|
+
if (typeof h.get === 'function')
|
|
54
|
+
return fromValue(h.get.call(h, types_1.AGENT_HEADER));
|
|
55
|
+
return fromRecord(h);
|
|
56
|
+
}
|
|
57
|
+
return fromRecord(input);
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
return {};
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/** The path of a request URL, without its query (which may carry secrets). */
|
|
64
|
+
function pathOf(url) {
|
|
65
|
+
if (typeof url !== 'string' || !url)
|
|
66
|
+
return undefined;
|
|
67
|
+
const q = url.search(/[?#]/);
|
|
68
|
+
const path = q === -1 ? url : url.slice(0, q);
|
|
69
|
+
try {
|
|
70
|
+
return path.includes('://') ? new URL(path).pathname : path.slice(0, 512);
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function agentVerifier(options) {
|
|
77
|
+
const audiences = (Array.isArray(options.audience) ? options.audience : [options.audience]).filter((a) => typeof a === 'string' && a.trim());
|
|
78
|
+
if (!audiences.length)
|
|
79
|
+
throw new TypeError('agentVerifier: an audience (the receiver host or origin) is required');
|
|
80
|
+
const issuers = new Set((options.issuers?.length ? options.issuers : types_1.DEFAULT_ISSUERS).map(passport_1.normaliseIssuer));
|
|
81
|
+
const skew = Math.max(0, options.clockSkewSeconds ?? 60);
|
|
82
|
+
const now = options.clock ?? Date.now;
|
|
83
|
+
const getFetch = () => options.fetch ?? globalThis.fetch;
|
|
84
|
+
const keys = new passport_1.KeyCache(getFetch, now);
|
|
85
|
+
const replay = options.replay ?? new replay_1.MemoryReplayStore({ clock: now });
|
|
86
|
+
const policies = new policy_1.PolicySource(options.policy, options.policyFrom, getFetch, now);
|
|
87
|
+
const reporter = options.report?.apiKey ? new report_1.DecisionReporter(options.report, getFetch) : undefined;
|
|
88
|
+
const onlineFailure = options.onlineFailure ?? 'allow';
|
|
89
|
+
async function online(p, token) {
|
|
90
|
+
const got = await (0, passport_1.fetchJson)(getFetch(), `${(0, passport_1.normaliseIssuer)(p.claims.iss)}/api/agent-passports/verify`, {
|
|
91
|
+
method: 'POST',
|
|
92
|
+
headers: { 'Content-Type': 'application/json', Accept: 'application/json' },
|
|
93
|
+
body: JSON.stringify({ passport: token, audience: p.claims.aud }),
|
|
94
|
+
});
|
|
95
|
+
const body = got?.body;
|
|
96
|
+
if (!got || got.status !== 200 || typeof body !== 'object' || body === null || typeof body.valid !== 'boolean')
|
|
97
|
+
return { unreachable: true };
|
|
98
|
+
const reason = typeof body.reason === 'string' && REASON.test(body.reason) ? body.reason : undefined;
|
|
99
|
+
if (!body.valid)
|
|
100
|
+
return { invalid: reason ?? 'revoked' };
|
|
101
|
+
// Still valid, but the issuer may lower the on-behalf-of assurance (e.g. reason "mandate_revoked").
|
|
102
|
+
return {
|
|
103
|
+
valid: true,
|
|
104
|
+
...(body.assurance !== undefined && body.assurance !== null ? { assurance: (0, passport_1.assuranceOf)(body.assurance) } : {}),
|
|
105
|
+
...(reason ? { note: reason } : {}),
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
/** Steps 1-7 of the contract. Returns the failure, or the passport and any non-denying note. */
|
|
109
|
+
async function verify(token, wantOnline) {
|
|
110
|
+
const parsed = (0, passport_1.parsePassport)(token);
|
|
111
|
+
if (!parsed.ok)
|
|
112
|
+
return { reason: parsed.reason };
|
|
113
|
+
const p = parsed.passport;
|
|
114
|
+
const c = p.claims;
|
|
115
|
+
const iss = (0, passport_1.normaliseIssuer)(c.iss);
|
|
116
|
+
if (!issuers.has(iss))
|
|
117
|
+
return { reason: 'untrusted_issuer' };
|
|
118
|
+
const key = await keys.get(iss, p.kid);
|
|
119
|
+
if (!key)
|
|
120
|
+
return { reason: 'unknown_key' };
|
|
121
|
+
if (!(0, passport_1.verifySignature)(p, key))
|
|
122
|
+
return { reason: 'bad_signature' };
|
|
123
|
+
const t = now() / 1000;
|
|
124
|
+
if (!(c.exp > t - skew))
|
|
125
|
+
return { reason: 'expired', passport: p };
|
|
126
|
+
if (!(c.iat <= t + skew))
|
|
127
|
+
return { reason: 'not_yet_valid', passport: p };
|
|
128
|
+
if (c.exp - c.iat > types_1.MAX_LIFETIME_SECONDS)
|
|
129
|
+
return { reason: 'lifetime_too_long', passport: p };
|
|
130
|
+
if (!(0, passport_1.audienceMatches)(c.aud, audiences))
|
|
131
|
+
return { reason: 'wrong_audience', passport: p };
|
|
132
|
+
try {
|
|
133
|
+
if (await replay.seen(c.jti, (c.exp + skew) * 1000))
|
|
134
|
+
return { reason: 'replayed', passport: p };
|
|
135
|
+
}
|
|
136
|
+
catch {
|
|
137
|
+
return { reason: 'replay_check_failed', passport: p };
|
|
138
|
+
}
|
|
139
|
+
if (wantOnline) {
|
|
140
|
+
const answer = await online(p, token);
|
|
141
|
+
if ('unreachable' in answer) {
|
|
142
|
+
if (onlineFailure === 'deny')
|
|
143
|
+
return { reason: 'issuer_unreachable', passport: p };
|
|
144
|
+
return { ok: p, note: 'issuer_unreachable' };
|
|
145
|
+
}
|
|
146
|
+
if ('invalid' in answer)
|
|
147
|
+
return { reason: answer.invalid, passport: p };
|
|
148
|
+
return { ok: p, note: answer.note, assurance: answer.assurance };
|
|
149
|
+
}
|
|
150
|
+
return { ok: p };
|
|
151
|
+
}
|
|
152
|
+
function identity(p, lowered) {
|
|
153
|
+
if (!p)
|
|
154
|
+
return {};
|
|
155
|
+
const c = p.claims;
|
|
156
|
+
let onBehalfOf;
|
|
157
|
+
if (c.act) {
|
|
158
|
+
// The issuer can only lower the assurance online, never raise it.
|
|
159
|
+
const downgraded = lowered && (0, types_1.assuranceRank)(lowered) < (0, types_1.assuranceRank)(c.act.assurance);
|
|
160
|
+
const assurance = downgraded ? lowered : c.act.assurance;
|
|
161
|
+
onBehalfOf = {
|
|
162
|
+
id: c.act.sub,
|
|
163
|
+
domain: c.act.domain,
|
|
164
|
+
assurance,
|
|
165
|
+
...(c.act.mandate && !downgraded ? { mandate: { ...c.act.mandate } } : {}),
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
let expiresAt;
|
|
169
|
+
try {
|
|
170
|
+
expiresAt = new Date(c.exp * 1000).toISOString();
|
|
171
|
+
}
|
|
172
|
+
catch {
|
|
173
|
+
expiresAt = undefined;
|
|
174
|
+
}
|
|
175
|
+
return {
|
|
176
|
+
agent: { ...c.agent, ...(c.agent.owner ? { owner: { ...c.agent.owner } } : {}) },
|
|
177
|
+
operator: { ...c.operator },
|
|
178
|
+
...(onBehalfOf ? { onBehalfOf } : {}),
|
|
179
|
+
scopes: (0, passport_1.scopesOf)(c.scope),
|
|
180
|
+
issuer: (0, passport_1.normaliseIssuer)(c.iss),
|
|
181
|
+
passportId: c.jti,
|
|
182
|
+
...(expiresAt ? { expiresAt } : {}),
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
function operatorAllowed(policy, op) {
|
|
186
|
+
if (!policy.operators.length)
|
|
187
|
+
return true;
|
|
188
|
+
const id = op.id.toLowerCase();
|
|
189
|
+
const domain = op.domain?.toLowerCase();
|
|
190
|
+
return policy.operators.some((o) => {
|
|
191
|
+
const v = o.toLowerCase();
|
|
192
|
+
return v === id || (!!domain && v === domain);
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
async function evaluate(input, opts) {
|
|
196
|
+
const policy = await policies.current();
|
|
197
|
+
const finish = (r) => ({ ...r, blocked: r.decision === 'deny' && policy.mode === 'enforce' });
|
|
198
|
+
const found = readPassport(input);
|
|
199
|
+
if (found.multiple)
|
|
200
|
+
return finish({ status: 'invalid', decision: 'deny', reason: 'malformed', scopes: [] });
|
|
201
|
+
if (!found.token)
|
|
202
|
+
return finish({ status: 'absent', decision: policy.requireAgent ? 'deny' : 'allow', reason: 'absent', scopes: [] });
|
|
203
|
+
const v = await verify(found.token, Boolean(opts.online || policy.online));
|
|
204
|
+
if (!('ok' in v))
|
|
205
|
+
return finish({ status: 'invalid', decision: 'deny', reason: v.reason, scopes: [], ...identity(v.passport) });
|
|
206
|
+
const base = { status: 'verified', scopes: [], ...identity(v.ok, v.assurance) };
|
|
207
|
+
if (!operatorAllowed(policy, v.ok.claims.operator))
|
|
208
|
+
return finish({ ...base, decision: 'deny', reason: 'operator_not_allowed' });
|
|
209
|
+
if (policy.requireOnBehalfOf && !v.ok.claims.act)
|
|
210
|
+
return finish({ ...base, decision: 'deny', reason: 'on_behalf_of_required' });
|
|
211
|
+
const need = (0, types_1.assuranceRank)(policy.minAssurance);
|
|
212
|
+
if (need > 0 && (0, types_1.assuranceRank)(base.onBehalfOf?.assurance) < need)
|
|
213
|
+
return finish({ ...base, decision: 'deny', reason: 'assurance_too_low' });
|
|
214
|
+
return finish({ ...base, decision: 'allow', ...(v.note ? { reason: v.note } : {}) });
|
|
215
|
+
}
|
|
216
|
+
function report(result, opts) {
|
|
217
|
+
if (!reporter)
|
|
218
|
+
return;
|
|
219
|
+
// Calls without a passport are only worth a log line when the policy denied them.
|
|
220
|
+
if (result.status === 'absent' && result.decision === 'allow')
|
|
221
|
+
return;
|
|
222
|
+
try {
|
|
223
|
+
reporter.add({
|
|
224
|
+
...result,
|
|
225
|
+
at: new Date(now()).toISOString(),
|
|
226
|
+
...(opts.route ? { route: String(opts.route).slice(0, 512) } : {}),
|
|
227
|
+
...(opts.method ? { method: String(opts.method).slice(0, 16).toUpperCase() } : {}),
|
|
228
|
+
receiver: audiences[0],
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
catch {
|
|
232
|
+
// reporting never affects the call
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
async function check(input, opts = {}) {
|
|
236
|
+
let result;
|
|
237
|
+
try {
|
|
238
|
+
result = await evaluate(input, opts ?? {});
|
|
239
|
+
}
|
|
240
|
+
catch {
|
|
241
|
+
// Unreachable by design; a verifier bug must still deny, never throw.
|
|
242
|
+
result = { status: 'invalid', decision: 'deny', blocked: false, reason: 'malformed', scopes: [] };
|
|
243
|
+
try {
|
|
244
|
+
result.blocked = (await policies.current()).mode === 'enforce';
|
|
245
|
+
}
|
|
246
|
+
catch {
|
|
247
|
+
result.blocked = false;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
report(result, opts ?? {});
|
|
251
|
+
return result;
|
|
252
|
+
}
|
|
253
|
+
function middleware() {
|
|
254
|
+
return (req, res, next) => {
|
|
255
|
+
const route = pathOf(req?.originalUrl ?? req?.url);
|
|
256
|
+
check(req, { route, method: typeof req?.method === 'string' ? req.method : undefined }).then((result) => {
|
|
257
|
+
if (req && typeof req === 'object')
|
|
258
|
+
req.shield360Agent = result;
|
|
259
|
+
if (!result.blocked)
|
|
260
|
+
return next();
|
|
261
|
+
const body = JSON.stringify({ error: 'agent_not_allowed', reason: result.reason });
|
|
262
|
+
res.statusCode = 403;
|
|
263
|
+
res.setHeader?.('Content-Type', 'application/json; charset=utf-8');
|
|
264
|
+
res.end(body);
|
|
265
|
+
}, (err) => next(err));
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
return {
|
|
269
|
+
check,
|
|
270
|
+
middleware,
|
|
271
|
+
policy: () => policies.current(),
|
|
272
|
+
flush: () => reporter?.flush() ?? Promise.resolve(),
|
|
273
|
+
close: () => reporter?.close() ?? Promise.resolve(),
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
//# sourceMappingURL=verifier.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifier.js","sourceRoot":"","sources":["../../src/agents/verifier.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;AAyCH,oCAgBC;AA6BD,sCA+LC;AAnRD,yCAA0J;AAC1J,qCAAwC;AACxC,qCAA6C;AAC7C,qCAA4C;AAC5C,mCAaiB;AAEjB,MAAM,SAAS,GAAG,oBAAY,CAAC,WAAW,EAAE,CAAC;AAC7C,MAAM,MAAM,GAAG,wBAAwB,CAAC;AAIxC,SAAS,SAAS,CAAC,CAAU;IAC3B,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;QACrB,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;QAClE,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;YAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QACjD,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC;IACtC,CAAC;IACD,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,C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