@cratis/pi 7.49.0 → 7.51.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/package/corpus/agents/screenplay-modeler.md +5 -2
- package/package/corpus/agents/screenplay-reviewer.md +1 -0
- package/package/corpus/harnesses/copilot/instructions/authoring-skills.instructions.md +93 -0
- package/package/corpus/harnesses/copilot/instructions/profiles.instructions.md +4 -0
- package/package/corpus/harnesses/copilot/instructions/react.instructions.md +1 -0
- package/package/corpus/hooks/README.md +23 -0
- package/package/corpus/hooks/scripts/cratis-pattern-scan.sh +1 -1
- package/package/corpus/hooks/scripts/cratis-patterns.json +8 -0
- package/package/corpus/hooks/scripts/cratis-quality-gate.sh +6 -0
- package/package/corpus/hooks/scripts/cratis-slice-scope-report.sh +54 -0
- package/package/corpus/prompts/review-skill.prompt.md +6 -8
- package/package/corpus/rules/authoring-skills.md +92 -0
- package/package/corpus/rules/general.md +1 -0
- package/package/corpus/rules/profiles.md +4 -0
- package/package/corpus/rules/react.md +1 -0
- package/package/corpus/skills/cratis-application-react-specifications/SKILL.md +1 -1
- package/package/corpus/skills/cratis-application-slice-conformance/references/build-prompts.md +9 -1
- package/package/corpus/skills/cratis-application-slice-conformance/references/checklists.md +4 -1
- package/package/corpus/skills/cratis-application-slice-conformance/references/provenance.md +3 -0
- package/package/corpus/skills/cratis-application-slice-specifications/LICENSE +4 -0
- package/package/corpus/skills/cratis-application-slice-specifications/references/provenance.md +9 -0
- package/package/corpus/skills/cratis-application-slice-specifications/references/query-and-decision-scenarios.md +8 -0
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/SKILL.md +23 -29
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/authentication.md +7 -7
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/authorization.md +34 -32
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/authproxy.md +1 -1
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/frontend.md +2 -2
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/local-development.md +3 -3
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/observable-emission-guards.md +8 -6
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/tenancy.md +3 -3
- package/package/corpus/skills/cratis-arc-command/SKILL.md +23 -25
- package/package/corpus/skills/cratis-arc-command/references/command-result.md +1 -1
- package/package/corpus/skills/cratis-arc-command/references/decisions-and-routing.md +9 -9
- package/package/corpus/skills/cratis-arc-command/references/generated-values.md +11 -12
- package/package/corpus/skills/cratis-arc-command/references/handler-shapes.md +4 -4
- package/package/corpus/skills/cratis-arc-command/references/proxy-generation.md +3 -3
- package/package/corpus/skills/cratis-arc-command/references/read-model-injection.md +1 -3
- package/package/corpus/skills/cratis-arc-command/references/shop-generation.md +11 -14
- package/package/corpus/skills/cratis-arc-command-execution/LICENSE +6 -0
- package/package/corpus/skills/cratis-arc-command-execution/SKILL.md +17 -19
- package/package/corpus/skills/cratis-arc-command-kotlin/SKILL.md +8 -7
- package/package/corpus/skills/cratis-arc-command-kotlin/references/read-model-naming.md +2 -2
- package/package/corpus/skills/cratis-arc-command-operation/SKILL.md +14 -15
- package/package/corpus/skills/cratis-arc-command-operation/references/execution-and-recovery.md +2 -2
- package/package/corpus/skills/cratis-arc-command-operation/references/testing.md +7 -8
- package/package/corpus/skills/cratis-arc-command-typescript/SKILL.md +14 -11
- package/package/corpus/skills/cratis-arc-command-typescript/references/chronicle-events.md +7 -7
- package/package/corpus/skills/cratis-arc-command-typescript/references/command-operations.md +4 -4
- package/package/corpus/skills/cratis-arc-command-typescript/references/hosting-and-storage.md +11 -7
- package/package/corpus/skills/cratis-arc-command-typescript/references/identity-and-introspection.md +4 -2
- package/package/corpus/skills/cratis-arc-command-typescript/references/observability-and-host-scopes.md +2 -2
- package/package/corpus/skills/cratis-arc-command-typescript/references/proxy-generation.md +3 -3
- package/package/corpus/skills/cratis-arc-command-typescript/references/slice-layout.md +1 -1
- package/package/corpus/skills/cratis-arc-command-typescript/verification.json +2 -2
- package/package/corpus/skills/cratis-arc-command-validation/SKILL.md +10 -14
- package/package/corpus/skills/cratis-arc-ef-core-migration/LICENSE +6 -0
- package/package/corpus/skills/cratis-arc-ef-core-migration/SKILL.md +9 -10
- package/package/corpus/skills/cratis-arc-go/SKILL.md +14 -15
- package/package/corpus/skills/cratis-arc-go/references/queries.md +2 -2
- package/package/corpus/skills/cratis-arc-hosting/SKILL.md +8 -8
- package/package/corpus/skills/cratis-arc-hosting/references/integrations-and-publish.md +11 -11
- package/package/corpus/skills/cratis-arc-identity-and-tenancy-kotlin/SKILL.md +3 -3
- package/package/corpus/skills/cratis-arc-observable-query-http/SKILL.md +13 -13
- package/package/corpus/skills/cratis-arc-observable-query-http/verification.json +1 -1
- package/package/corpus/skills/cratis-arc-query-kotlin/SKILL.md +2 -3
- package/package/corpus/skills/cratis-arc-query-paging/SKILL.md +11 -14
- package/package/corpus/skills/cratis-arc-query-typescript/SKILL.md +3 -3
- package/package/corpus/skills/cratis-arc-query-typescript/references/storage-observation-and-compliance.md +2 -2
- package/package/corpus/skills/cratis-arc-react-page/LICENSE +4 -0
- package/package/corpus/skills/cratis-arc-react-page/references/from-screenplay.md +6 -0
- package/package/corpus/skills/cratis-arc-react-page/references/provenance.md +9 -0
- package/package/corpus/skills/cratis-arc-spring-data-kotlin/SKILL.md +3 -3
- package/package/corpus/skills/cratis-arc-testing-kotlin/SKILL.md +3 -3
- package/package/corpus/skills/cratis-arc-validation-kotlin/SKILL.md +1 -2
- package/package/corpus/skills/cratis-arc-validation-typescript/SKILL.md +4 -4
- package/package/corpus/skills/cratis-chronicle-cli-operations/SKILL.md +19 -22
- package/package/corpus/skills/cratis-chronicle-cli-operations/references/command-effects.md +10 -10
- package/package/corpus/skills/cratis-chronicle-client-dotnet/SKILL.md +36 -36
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/additional-surfaces.md +4 -2
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/client-construction.md +1 -1
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/compatibility-check.md +13 -13
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/discovery.md +10 -10
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/hosting.md +10 -10
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/pinned-generation-delivery.md +7 -5
- package/package/corpus/skills/cratis-chronicle-client-elixir/SKILL.md +59 -64
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/append-api.md +17 -17
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/compliance.md +5 -3
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/connections.md +15 -11
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/event-sources.md +3 -1
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/pitfalls.md +4 -4
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/projections.md +8 -4
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/upgrading.md +19 -19
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/variants.md +3 -8
- package/package/corpus/skills/cratis-chronicle-client-elixir/verification.json +2 -2
- package/package/corpus/skills/cratis-chronicle-client-go/SKILL.md +16 -18
- package/package/corpus/skills/cratis-chronicle-client-go/references/projections.md +2 -2
- package/package/corpus/skills/cratis-chronicle-client-kotlin/SKILL.md +61 -58
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/connection-lifecycle.md +9 -10
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/discovery-and-registration.md +6 -6
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/event-sources.md +4 -2
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/java-api.md +4 -4
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/options.md +1 -1
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/spring-boot.md +24 -24
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/variants.md +6 -5
- package/package/corpus/skills/cratis-chronicle-client-typescript/SKILL.md +26 -20
- package/package/corpus/skills/cratis-chronicle-client-typescript/references/read-models-and-projections.md +4 -4
- package/package/corpus/skills/cratis-chronicle-client-typescript/references/testing.md +1 -1
- package/package/corpus/skills/cratis-chronicle-client-typescript/references/variants.md +4 -3
- package/package/corpus/skills/cratis-chronicle-client-typescript/verification.json +2 -2
- package/package/corpus/skills/cratis-chronicle-compliance/SKILL.md +9 -9
- package/package/corpus/skills/cratis-chronicle-decision-reads/SKILL.md +11 -10
- package/package/corpus/skills/cratis-chronicle-decision-reads/references/admission-and-ownership.md +1 -1
- package/package/corpus/skills/cratis-chronicle-decision-reads/references/choosing-how-a-rule-holds.md +5 -6
- package/package/corpus/skills/cratis-chronicle-event-constraints/SKILL.md +7 -7
- package/package/corpus/skills/cratis-chronicle-event-constraints/references/closing-streams.md +1 -1
- package/package/corpus/skills/cratis-chronicle-event-modeling/SKILL.md +12 -1
- package/package/corpus/skills/cratis-chronicle-event-specifications/SKILL.md +6 -6
- package/package/corpus/skills/cratis-chronicle-event-type-migration/SKILL.md +12 -10
- package/package/corpus/skills/cratis-chronicle-event-type-migration/references/pinned-generations.md +2 -3
- package/package/corpus/skills/cratis-chronicle-hosting/SKILL.md +7 -7
- package/package/corpus/skills/cratis-chronicle-hosting/references/operations.md +5 -5
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/SKILL.md +6 -6
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/blocked-tools.md +5 -5
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/deployment.md +9 -10
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/observational-tools.md +29 -29
- package/package/corpus/skills/cratis-chronicle-multi-tenancy/SKILL.md +9 -9
- package/package/corpus/skills/cratis-chronicle-projection/SKILL.md +13 -14
- package/package/corpus/skills/cratis-chronicle-projection/references/fluent-builder.md +3 -5
- package/package/corpus/skills/cratis-chronicle-projection/references/model-bound-attributes.md +2 -4
- package/package/corpus/skills/cratis-chronicle-projection/references/variants.md +1 -3
- package/package/corpus/skills/cratis-chronicle-reactor/LICENSE +4 -0
- package/package/corpus/skills/cratis-chronicle-reactor/references/provenance.md +10 -0
- package/package/corpus/skills/cratis-chronicle-reactor/references/slice-delivery-checklist.md +33 -0
- package/package/corpus/skills/cratis-chronicle-reactor/references/specifications.md +17 -1
- package/package/corpus/skills/cratis-chronicle-read-model/SKILL.md +16 -15
- package/package/corpus/skills/cratis-chronicle-read-model/references/queries.md +8 -8
- package/package/corpus/skills/cratis-chronicle-reducer/SKILL.md +14 -13
- package/package/corpus/skills/cratis-chronicle-web-workbench/SKILL.md +11 -12
- package/package/corpus/skills/cratis-cli-terminal-workbench/SKILL.md +6 -6
- package/package/corpus/skills/cratis-code-review/SKILL.md +13 -17
- package/package/corpus/skills/cratis-components-accessibility/SKILL.md +3 -3
- package/package/corpus/skills/cratis-components-common-controls/SKILL.md +15 -15
- package/package/corpus/skills/cratis-components-data-surfaces/SKILL.md +29 -29
- package/package/corpus/skills/cratis-components-schema-editor/SKILL.md +4 -4
- package/package/corpus/skills/cratis-components-schema-editor/references/tree-layout.md +1 -1
- package/package/corpus/skills/cratis-components-stepper-command-dialog/SKILL.md +6 -6
- package/package/corpus/skills/cratis-components-styling/LICENSE +6 -0
- package/package/corpus/skills/cratis-components-styling/SKILL.md +5 -4
- package/package/corpus/skills/cratis-components-toolbar/SKILL.md +5 -5
- package/package/corpus/skills/cratis-developer-marketing/SKILL.md +2 -2
- package/package/corpus/skills/cratis-engineering-csharp-conventions/SKILL.md +3 -3
- package/package/corpus/skills/cratis-engineering-csharp-conventions/references/exceptions-logging-and-di.md +1 -1
- package/package/corpus/skills/cratis-engineering-effect-boundaries/references/failure-archetypes.md +4 -4
- package/package/corpus/skills/cratis-event-model-diagram/LICENSE +5 -0
- package/package/corpus/skills/cratis-event-model-diagram/SKILL.md +6 -1
- package/package/corpus/skills/cratis-event-model-diagram/references/provenance.md +9 -0
- package/package/corpus/skills/cratis-fundamentals-concept/SKILL.md +19 -24
- package/package/corpus/skills/cratis-fundamentals-concept/references/shop-generation.md +10 -10
- package/package/corpus/skills/cratis-fundamentals-concept/references/typescript-concepts.md +8 -8
- package/package/corpus/skills/cratis-fundamentals-concept-go/SKILL.md +10 -11
- package/package/corpus/skills/cratis-fundamentals-telemetry/SKILL.md +18 -18
- package/package/corpus/skills/cratis-fundamentals-telemetry/verification.json +1 -1
- package/package/corpus/skills/cratis-fundamentals-type-discovery/SKILL.md +4 -4
- package/package/corpus/skills/cratis-lens-browser-extension/SKILL.md +19 -19
- package/package/corpus/skills/cratis-orleans-jobs/SKILL.md +27 -27
- package/package/corpus/skills/cratis-orleans-jobs/references/state-machines.md +12 -12
- package/package/corpus/skills/cratis-performance-review/SKILL.md +8 -10
- package/package/corpus/skills/cratis-release-notes/SKILL.md +1 -1
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/LICENSE +5 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +2 -2
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/automation-patterns.md +24 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/integration-contracts.md +19 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/provenance.md +10 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/realization-and-gap-fill.md +1 -1
- package/package/corpus/skills/cratis-screenplay-discovery/SKILL.md +10 -12
- package/package/corpus/skills/cratis-screenplay-discovery/references/divergent-sweep.md +9 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/document-intake.md +123 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/domain-analysis-template.md +1 -12
- package/package/corpus/skills/cratis-screenplay-discovery/references/event-naming.md +49 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/facilitation.md +2 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/human-workshop.md +26 -1
- package/package/corpus/skills/cratis-screenplay-discovery/references/plotting-and-handoff.md +17 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/provenance.md +5 -1
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/nine-steps.md +7 -3
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/provenance.md +2 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/SKILL.md +50 -79
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/evidence-table-template.md +39 -4
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/expert-verification.md +15 -1
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/intent-example.md +31 -7
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/interview-findings.md +8 -2
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/loss-report-template.md +4 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/provenance.md +8 -2
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/re-entry-and-passes.md +102 -3
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/side-car-migration.md +3 -1
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/signal-to-intent.md +29 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/ui-observation.md +2 -1
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/verified-sources.md +20 -0
- package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +27 -54
- package/package/corpus/skills/cratis-screenplay-model-review/references/baseline-comparison.md +9 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/business-questions.md +6 -1
- package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +1 -1
- package/package/corpus/skills/cratis-screenplay-model-review/references/mode-compliance.md +5 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/model-inventory-report.md +48 -11
- package/package/corpus/skills/cratis-screenplay-model-review/references/provenance.md +5 -2
- package/package/corpus/skills/cratis-screenplay-model-review/references/quick-self-check.md +20 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/stressor-analysis.md +22 -10
- package/package/corpus/skills/cratis-screenplay-model-review/references/verified-sources.md +15 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/walkthrough.md +135 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/LICENSE +5 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/core-rules-digest.md +7 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/per-turn-protocol.md +6 -2
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/phases.md +16 -1
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/provenance.md +21 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +1 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/drift-and-fallback-record.md +7 -30
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/hand-written-changes.md +150 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/provenance.md +2 -2
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/provenance.md +1 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-catalogue.md +17 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +1 -1
- package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md +6 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/field-lineage.md +9 -1
- package/package/corpus/skills/cratis-screenplay-slice-design/references/provenance.md +6 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/read-model-design.md +23 -6
- package/package/corpus/skills/cratis-screenplay-slice-design/references/review-questions.md +4 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +69 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/worked-example.md +4 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract-exceptions.json +0 -7
- package/package/corpus/skills/cratis-security-review/SKILL.md +8 -10
- package/package/corpus/skills/cratis-security-review/references/arc-boundaries.md +18 -16
- package/package/corpus/skills/cratis-specification-by-example/SKILL.md +1 -1
- package/package/corpus/skills/cratis-specifications-csharp/SKILL.md +26 -29
- package/package/corpus/skills/cratis-specifications-csharp/references/application-scenarios.md +8 -8
- package/package/corpus/skills/cratis-specifications-csharp/references/csharp-patterns.md +2 -2
- package/package/corpus/skills/cratis-specifications-csharp/references/integration-specs.md +6 -4
- package/package/corpus/skills/cratis-specifications-csharp/references/shared-lifecycle.md +6 -2
- package/package/corpus/skills/cratis-specifications-typescript/SKILL.md +2 -2
- package/package/corpus/skills/cratis-studio-mcp-safety-guidance/SKILL.md +4 -4
- package/package/corpus/skills/cratis-writing-voice-and-cadence/SKILL.md +1 -1
- package/package/corpus/skills/guiding-refactoring-with-code-health/SKILL.md +1 -1
- package/package/corpus/skills/prioritizing-technical-debt/SKILL.md +1 -1
- package/package/corpus/skills/risk-based-testing-with-code-health/SKILL.md +3 -3
- package/package/corpus/skills/safeguarding-ai-generated-code/SKILL.md +1 -1
- package/package.json +1 -1
|
@@ -13,18 +13,15 @@ told about them. Each has its own extension point.
|
|
|
13
13
|
|
|
14
14
|
## Verified product sources
|
|
15
15
|
|
|
16
|
-
| Package |
|
|
17
|
-
| --- | --- |
|
|
18
|
-
| `Cratis.Arc.Core` | `
|
|
19
|
-
| `Cratis.Arc` |
|
|
20
|
-
| `@cratis/arc` | `
|
|
21
|
-
| `@cratis/arc.react` | `
|
|
22
|
-
| Cratis AuthProxy (`cratis/authproxy`) |
|
|
23
|
-
|
|
24
|
-
> Rechecked at Arc v22.75.0 against the source-pinned authentication, identity,
|
|
25
|
-
> discovery and authorization references below. **Authorization behavior changed materially after `22.16.0`**, the version this skill used to pin: named policies, schemes, fallback baselines, guest policies and Microsoft-attribute enforcement all arrived later. [authorization](references/authorization.md) has a version table; check it if you run an older version.
|
|
16
|
+
| Package | Purpose |
|
|
17
|
+
| --- | --- |
|
|
18
|
+
| `Cratis.Arc.Core` | `Cratis.Arc.Identity`, `Cratis.Arc.Authorization`, `Cratis.Arc.Authentication`, `Cratis.Arc.Tenancy` |
|
|
19
|
+
| `Cratis.Arc` | ASP.NET Core hosting, `AddMicrosoftIdentityPlatformIdentityAuthentication` |
|
|
20
|
+
| `@cratis/arc` | `IdentityProvider`, `IIdentity` |
|
|
21
|
+
| `@cratis/arc.react` | `IdentityProvider` component, `useIdentity`, `RequireRole` |
|
|
22
|
+
| Cratis AuthProxy (`cratis/authproxy`) | the trusted ingress described in [AuthProxy](references/authproxy.md) |
|
|
26
23
|
|
|
27
|
-
|
|
24
|
+
Authorization capabilities arrived over time: named policies, schemes, fallback baselines, guest policies and Microsoft-attribute enforcement all need a recent Arc. [authorization](references/authorization.md) lists the requirements; check them if you run an older version.
|
|
28
25
|
|
|
29
26
|
## Read this first: what is and is not trusted
|
|
30
27
|
|
|
@@ -45,7 +42,9 @@ is the trust boundary. But it means:
|
|
|
45
42
|
the application itself to validate a token, that is ordinary ASP.NET Core
|
|
46
43
|
authentication you configure yourself.
|
|
47
44
|
|
|
48
|
-
|
|
45
|
+
Requires Arc 22.43.0 for secure forwarded-header handling. On an older Arc the unsigned identity headers are trusted from any caller who can reach the host; upgrade, or make the ingress the only path to the backend.
|
|
46
|
+
|
|
47
|
+
Forwarded identity headers are ignored unless the host opts
|
|
49
48
|
in with `Cratis:Arc:TrustForwardedIdentityHeaders=true` or
|
|
50
49
|
`builder.AddCratis(options => options.TrustForwardedIdentityHeaders = true)`.
|
|
51
50
|
Header-only requests otherwise remain anonymous. `AddCratis()` still registers
|
|
@@ -53,7 +52,7 @@ the header scheme; it does not make the headers trusted. Opt in only behind the
|
|
|
53
52
|
ingress above, otherwise configure a credential-validating scheme. The old
|
|
54
53
|
`Introspection:TrustForwardedIdentityHeaders` setting is obsolete and enables the
|
|
55
54
|
same host-wide flag. See [authentication](references/authentication.md).
|
|
56
|
-
Source: [
|
|
55
|
+
Source: [secure defaults](https://github.com/Cratis/Arc/blob/main/Documentation/upgrading/secure-defaults.mdx).
|
|
57
56
|
|
|
58
57
|
Cratis AuthProxy is the ingress that meets these obligations for Cratis applications. Read [AuthProxy](references/authproxy.md) when the application is deployed behind it (header contract, `/.cratis/me` fail-closed verification, tenant headers).
|
|
59
58
|
|
|
@@ -96,7 +95,9 @@ public class <Name>IdentityDetailsProvider : IProvideIdentityDetails<<Details>>
|
|
|
96
95
|
| `GET /.cratis/tenants` | Development tooling — aggregates every `ICanProvideTenants` |
|
|
97
96
|
| `GET /.cratis/commands`, `GET /.cratis/queries` | Introspection catalogs of operation names, types and routes (`MapIntrospectionEndpoints()`) |
|
|
98
97
|
|
|
99
|
-
|
|
98
|
+
Requires Arc 22.45.0 for authenticated discovery by default. On an older Arc the discovery routes are anonymous in every environment, so do not expose such a host.
|
|
99
|
+
|
|
100
|
+
Discovery is anonymous only when the host's
|
|
100
101
|
`IHostEnvironment.IsDevelopment()` is true. Elsewhere it requires authentication;
|
|
101
102
|
if the host cannot authenticate callers, the routes are not mapped (404) and a
|
|
102
103
|
warning is logged. `RequireAuthentication` unset selects that environment default;
|
|
@@ -108,7 +109,7 @@ removes users, tenants and the details schema. Setting both removes all discover
|
|
|
108
109
|
without authentication checks; `/.cratis/me` remains. `[ExcludeFromDiscovery]`
|
|
109
110
|
hides commands, read models, queries and controllers from catalogs/OpenAPI, **not
|
|
110
111
|
from invocation or authorization**. These are .NET settings, not a JVM contract.
|
|
111
|
-
Source: [secure defaults](https://github.com/Cratis/Arc/blob/
|
|
112
|
+
Source: [secure defaults](https://github.com/Cratis/Arc/blob/main/Documentation/upgrading/secure-defaults.mdx).
|
|
112
113
|
|
|
113
114
|
`/.cratis/me` derives identity only from the authenticated request principal,
|
|
114
115
|
never from `.cratis-identity`. The details provider runs for each authenticated
|
|
@@ -118,8 +119,8 @@ responses carry `Cache-Control: no-store, private` and `Vary: Cookie`.
|
|
|
118
119
|
Stop reading the cookie; use `IdentityProvider.getCurrent()`/`refresh()` and
|
|
119
120
|
`clearCache()` on logout. The frontend caches in memory, with a warned legacy
|
|
120
121
|
cookie fallback **only after a 404**, never after 401/403.
|
|
121
|
-
Sources: [IdentityProvider.cs](https://github.com/Cratis/Arc/blob/
|
|
122
|
-
[IdentityProvider.ts](https://github.com/Cratis/Arc/blob/
|
|
122
|
+
Sources: [IdentityProvider.cs](https://github.com/Cratis/Arc/blob/main/Source/DotNET/Arc.Core/Identity/IdentityProvider.cs),
|
|
123
|
+
[IdentityProvider.ts](https://github.com/Cratis/Arc/blob/main/Source/JavaScript/Arc/identity/IdentityProvider.ts).
|
|
123
124
|
|
|
124
125
|
## Authorization — what Arc evaluates
|
|
125
126
|
|
|
@@ -134,16 +135,9 @@ Arc's attributes live in `Cratis.Arc.Authorization`:
|
|
|
134
135
|
There is **no** `[Policy]`, `[Scopes]` or `[Claims]` attribute anywhere in Arc.
|
|
135
136
|
Arc's attributes are the portable choice: they are enforced on every Arc host.
|
|
136
137
|
|
|
137
|
-
|
|
138
|
-
skill's old pin was `22.16.0`) only `Roles` is evaluated: `[Authorize(Policy = "…")]`
|
|
139
|
-
and `AuthenticationSchemes` enforce nothing, and Microsoft's `[Authorize]` is **not**
|
|
140
|
-
honored on model-bound commands and read models, so a command protected only by it
|
|
141
|
-
is open. From `22.21.0` Microsoft's `[Authorize]`/`[AllowAnonymous]` are enforced on
|
|
142
|
-
the ASP.NET Core host (never on the standalone Core host), and from `22.23.0` named
|
|
143
|
-
policies and schemes are evaluated. The rest of this section is `22.75.0` behavior;
|
|
144
|
-
see [authorization](references/authorization.md) for the version table.
|
|
138
|
+
Requires Arc 22.23.0 for named policies and schemes, and 22.21.0 for Microsoft's `[Authorize]`/`[AllowAnonymous]` enforcement (ASP.NET Core host only, never the standalone Core host). On an older Arc only `Roles` is evaluated: `[Authorize(Policy = "…")]` and `AuthenticationSchemes` enforce nothing, and a command protected only by Microsoft's `[Authorize]` is open. See [authorization](references/authorization.md) for the requirements.
|
|
145
139
|
|
|
146
|
-
|
|
140
|
+
Current behavior:
|
|
147
141
|
|
|
148
142
|
- **Named policies work.** `[Authorize(Policy = "…")]` requires the policy to
|
|
149
143
|
succeed asynchronously. Implement
|
|
@@ -200,8 +194,8 @@ restrictive verdict wins, and a guard that throws, or cannot be constructed, fai
|
|
|
200
194
|
closed — the latter denies every observable query in the process. The principal comes
|
|
201
195
|
from `ObservableQueryEmissionContext.Principal`, never from ambient accessors or
|
|
202
196
|
`IHttpContextAccessor`; the guard is constructed per emission, so keep it cheap and
|
|
203
|
-
cache in a singleton.
|
|
204
|
-
protect plain HTTP snapshots, waits and long polls. Read
|
|
197
|
+
cache in a singleton. Requires Arc 22.69.1 for guards and read-model interceptors to also
|
|
198
|
+
protect plain HTTP snapshots, waits and long polls; older versions leave them unguarded. Read
|
|
205
199
|
[observable emission guards](references/observable-emission-guards.md) when implementing or reviewing revocation of an observable-query subscription.
|
|
206
200
|
|
|
207
201
|
### Validators are not an authorization boundary
|
|
@@ -307,7 +301,7 @@ carry that shortcut into a directly reachable deployed host.
|
|
|
307
301
|
- Exactly one non-default `IProvideIdentityDetails` implementation exists, and it
|
|
308
302
|
also implements `IProvideIdentityDetails<TDetails>`.
|
|
309
303
|
- The Arc version in use enforces what the code declares: policies and Microsoft's
|
|
310
|
-
attributes
|
|
304
|
+
attributes need a recent Arc (see the authorization reference).
|
|
311
305
|
- Every named policy is registered exactly once; a policy meant for guests has the
|
|
312
306
|
explicit opt-in, and no declaration mixes a guest policy with roles or schemes.
|
|
313
307
|
- A method-level `[AllowAnonymous]` or guest policy is intended to replace its
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
- What is not here
|
|
11
11
|
- The security boundary, stated plainly
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Source: `Cratis.Arc.Core` and `Cratis.Arc`. Types are in
|
|
14
14
|
`Cratis.Arc.Authentication` and `Cratis.Arc.Identity`.
|
|
15
15
|
|
|
16
16
|
## The contract
|
|
@@ -136,13 +136,13 @@ whose `SchemeName` is `"MicrosoftIdentityPlatform"`. `builder.AddCratis()` (the
|
|
|
136
136
|
`Cratis` package) calls this for you and makes it the **default** authentication
|
|
137
137
|
scheme; `AddCratisArc()` from `Cratis.Arc` does not register it.
|
|
138
138
|
|
|
139
|
-
|
|
139
|
+
`AddCratis()` registers the scheme but forwarded headers do not
|
|
140
140
|
authenticate anybody until `Cratis:Arc:TrustForwardedIdentityHeaders=true`.
|
|
141
141
|
`AddMicrosoftIdentityPlatformIdentityAuthentication()` warns at startup without
|
|
142
142
|
that opt-in; built-in handlers warn on the first header-bearing request.
|
|
143
143
|
The three-argument `MicrosoftIDentityPlatformAuthHandler` constructor is obsolete;
|
|
144
144
|
use the constructor receiving `IOptions<ArcOptions>`.
|
|
145
|
-
Source: [secure defaults](https://github.com/Cratis/Arc/blob/
|
|
145
|
+
Source: [secure defaults](https://github.com/Cratis/Arc/blob/main/Documentation/upgrading/secure-defaults.mdx).
|
|
146
146
|
|
|
147
147
|
## Forwarded headers, ingress requirements and protected introspection
|
|
148
148
|
|
|
@@ -152,7 +152,7 @@ prevents direct access to the backend**. The same applies to any custom header
|
|
|
152
152
|
such as `X-User-ID`. Adding a bearer validator does not make a separately accepted
|
|
153
153
|
forwarded-header mechanism safe.
|
|
154
154
|
|
|
155
|
-
Configure discovery through `Cratis:Arc:Introspection
|
|
155
|
+
Configure discovery through `Cratis:Arc:Introspection`:
|
|
156
156
|
|
|
157
157
|
| Option | Default | Effect |
|
|
158
158
|
| --- | --- | --- |
|
|
@@ -179,9 +179,9 @@ On ASP.NET Core, a scheme's challenge may redirect instead of returning 401.
|
|
|
179
179
|
|
|
180
180
|
`[ExcludeFromDiscovery]` suppresses catalogs/OpenAPI, not endpoint invocation;
|
|
181
181
|
it is not authorization. These .NET options do not establish a JVM equivalent.
|
|
182
|
-
Sources: [IntrospectionOptions.cs](https://github.com/Cratis/Arc/blob/
|
|
183
|
-
[DiscoveryExposure.cs](https://github.com/Cratis/Arc/blob/
|
|
184
|
-
[secure defaults](https://github.com/Cratis/Arc/blob/
|
|
182
|
+
Sources: [IntrospectionOptions.cs](https://github.com/Cratis/Arc/blob/main/Source/DotNET/Arc.Core/Introspection/IntrospectionOptions.cs),
|
|
183
|
+
[DiscoveryExposure.cs](https://github.com/Cratis/Arc/blob/main/Source/DotNET/Arc.Core/Introspection/DiscoveryExposure.cs),
|
|
184
|
+
[secure defaults](https://github.com/Cratis/Arc/blob/main/Documentation/upgrading/secure-defaults.mdx).
|
|
185
185
|
|
|
186
186
|
## What is not here
|
|
187
187
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Contents
|
|
4
4
|
|
|
5
|
-
-
|
|
5
|
+
- Version requirements
|
|
6
6
|
- Attributes
|
|
7
7
|
- Composition and precedence
|
|
8
8
|
- Named policies
|
|
@@ -15,35 +15,37 @@
|
|
|
15
15
|
- The principal and system actors
|
|
16
16
|
- Protected decisions and validators
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
describes that version and is in `Cratis.Arc.Authorization` unless stated.
|
|
18
|
+
Source: `Cratis.Arc.Core` and `Cratis.Arc`. Everything below is in `Cratis.Arc.Authorization` unless stated.
|
|
20
19
|
|
|
21
|
-
##
|
|
20
|
+
## Version requirements
|
|
22
21
|
|
|
23
|
-
Authorization
|
|
24
|
-
(`22.16.0`) and `22.41.1`. Advice that is right for one range is wrong for
|
|
25
|
-
another.
|
|
22
|
+
Authorization capabilities arrived over time. Advice that is right for a recent Arc is wrong for an older one, so check the Arc you run (`dotnet list package`).
|
|
26
23
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
24
|
+
Requires Arc 22.21.0 for Microsoft's `[Authorize]`/`[AllowAnonymous]` enforcement on the ASP.NET Core host; every stacked requirement applies (AND), and anonymous plus restricted on one member is rejected as ambiguous.
|
|
25
|
+
|
|
26
|
+
Requires Arc 22.23.0 for named policies and `AuthenticationSchemes` (`IAuthorizationPolicy`, `AddArcAuthorizationPolicy<T>`, ASP.NET Core policies).
|
|
27
|
+
|
|
28
|
+
Requires Arc 22.26.0 for the `Cratis:Arc:Introspection` options.
|
|
29
|
+
|
|
30
|
+
Requires Arc 22.30.0 for `IFallbackAuthorizationEvaluator` and `AuthorizationPolicyContext.ReceivedAt`.
|
|
31
|
+
|
|
32
|
+
Requires Arc 22.31.0 for opt-in policy evaluation for unauthenticated callers.
|
|
33
|
+
|
|
34
|
+
Requires Arc 22.39.0 for protected decisions.
|
|
35
|
+
|
|
36
|
+
Requires Arc 22.51.0 for `IdentityDiscovery`, which controls the users/tenants/details schema separately.
|
|
37
|
+
|
|
38
|
+
On an Arc older than 22.21.0 only Arc's own attributes count, and only `Roles` is evaluated: `Policy` and `AuthenticationSchemes` are read by nothing, so `[Authorize(Policy = "…")]` enforces nothing, and Microsoft's `[Authorize]`/`[AllowAnonymous]` are **not** enforced on model-bound commands and read models (a command protected only with Microsoft's attribute is open to every caller). Either upgrade, or use only Arc's attributes with roles and treat everything else as unenforced. Do not write a policy-protected endpoint on an Arc older than 22.23.0.
|
|
39
|
+
|
|
40
|
+
Requires Arc 22.31.2 for identity and declaration continuity to be rechecked around policy evaluation.
|
|
41
|
+
|
|
42
|
+
Requires Arc 22.43.0 for forwarded identity headers to need a host-wide trust opt-in; older versions trust them from any caller.
|
|
43
|
+
|
|
44
|
+
Requires Arc 22.44.2 for guest-policy endpoints to be reachable over HTTP, including with an authenticated fallback.
|
|
45
|
+
|
|
46
|
+
Requires Arc 22.45.0 for discovery to be anonymous only in Development; older versions serve it anonymously everywhere.
|
|
47
|
+
|
|
48
|
+
Requires Arc 22.46.0 for the backend to neither read nor write the identity cookie.
|
|
47
49
|
|
|
48
50
|
## Attributes
|
|
49
51
|
|
|
@@ -58,7 +60,7 @@ There is **no** `[Policy]`, `[Scopes]` or `[Claims]` attribute in Arc.
|
|
|
58
60
|
With `Cratis.Arc` (ASP.NET Core host), Arc's pipeline **also enforces Microsoft's**
|
|
59
61
|
`[Authorize]` and `[AllowAnonymous]` on model-bound commands and read models,
|
|
60
62
|
including their policies and schemes, over mapped HTTP and hub subscriptions
|
|
61
|
-
(
|
|
63
|
+
(from Arc 22.21.0). The two families can be mixed. Arc's own attributes are
|
|
62
64
|
the portable choice: they are enforced on every Arc host, whereas on the
|
|
63
65
|
standalone Core host nothing reads Microsoft's. `RolesAttribute` derives from
|
|
64
66
|
**Arc's** `AuthorizeAttribute`, never Microsoft's.
|
|
@@ -148,10 +150,10 @@ opt-in:
|
|
|
148
150
|
- Only a declaration made **entirely** of opted-in policies, with no roles and no
|
|
149
151
|
schemes, can evaluate guests. Roles and schemes always require authentication.
|
|
150
152
|
|
|
151
|
-
|
|
153
|
+
Guest-policy endpoints accept unauthenticated callers on both HTTP
|
|
152
154
|
hosts, even with an authenticated fallback policy, when every declared policy
|
|
153
155
|
opts in. Test through the real HTTP host, not only the in-process verdict.
|
|
154
|
-
Source
|
|
156
|
+
Source: `Documentation/backend/csharp/introspection/index.md` and the
|
|
155
157
|
host authorization specs under `Source/DotNET`.
|
|
156
158
|
|
|
157
159
|
⚠️ Because a method replaces its type, a method-level guest policy on a read model
|
|
@@ -326,5 +328,5 @@ state-dependent permission and ownership rules in `Provide()` or `Handle()` usin
|
|
|
326
328
|
guidance. Arc constructs/certifies discoverable parameterless validators;
|
|
327
329
|
factory-supplied or altered rules fail closed. Keep static/service-locator state
|
|
328
330
|
out of them too: certification is not proof of input purity. Validators that
|
|
329
|
-
read decision state are
|
|
330
|
-
Source: [
|
|
331
|
+
read decision state are a known limitation.
|
|
332
|
+
Source: [protected validator boundary](https://github.com/Cratis/Arc/blob/main/Documentation/backend/csharp/chronicle/read-models/injecting-into-commands.md).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Cratis AuthProxy as the trusted ingress
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Source: Cratis AuthProxy (container image `cratis/authproxy`) and its documentation. AuthProxy is a reverse proxy that authenticates callers (OpenID Connect, JWT) and forwards the result to a backend in exactly the header contract Arc reads. It is the ingress the rest of this skill asks for. Other ingresses (Azure Container Apps or App Service EasyAuth, your own gateway) work if they meet the same four obligations; this page is specific to AuthProxy.
|
|
4
4
|
|
|
5
5
|
## What it does to the headers
|
|
6
6
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
- `RequireRole`
|
|
8
8
|
- MVVM
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Source: `@cratis/arc` and `@cratis/arc.react`.
|
|
11
11
|
|
|
12
12
|
## `@cratis/arc/identity`
|
|
13
13
|
|
|
@@ -45,7 +45,7 @@ interface IIdentity<TDetails = object> {
|
|
|
45
45
|
Only a 404 enables the warned legacy-cookie fallback; a cookie never overrides
|
|
46
46
|
401/403. Stop reading `.cratis-identity` in application code. Neither the memory
|
|
47
47
|
cache nor the legacy fallback is an authorization boundary.
|
|
48
|
-
Source: [
|
|
48
|
+
Source: [IdentityProvider.ts](https://github.com/Cratis/Arc/blob/main/Source/JavaScript/Arc/identity/IdentityProvider.ts).
|
|
49
49
|
|
|
50
50
|
## `@cratis/arc.react/identity`
|
|
51
51
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Running with an identity locally
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Source: `Cratis.Arc.Core` and `Cratis.Arc`.
|
|
4
4
|
|
|
5
5
|
## What Arc does not give you
|
|
6
6
|
|
|
@@ -28,11 +28,11 @@ public record User(ClientPrincipal MicrosoftIdentity, object Details);
|
|
|
28
28
|
public interface ICanProvideUsers { Task<IEnumerable<User>> Provide(); }
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
Both follow `Introspection.IdentityDiscovery` and discovery
|
|
32
32
|
access settings: anonymous by default only in Development, authenticated elsewhere,
|
|
33
33
|
or unmapped (404) if the host cannot authenticate. Return development fixtures,
|
|
34
34
|
not production users or tenants.
|
|
35
|
-
Source: [secure defaults](https://github.com/Cratis/Arc/blob/
|
|
35
|
+
Source: [secure defaults](https://github.com/Cratis/Arc/blob/main/Documentation/upgrading/secure-defaults.mdx).
|
|
36
36
|
|
|
37
37
|
## Supplying an identity locally
|
|
38
38
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- Cost
|
|
10
10
|
- What a guard does not protect
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Source: `Cratis.Arc.Core` (`Cratis.Arc.Queries`).
|
|
13
13
|
|
|
14
14
|
Authorization for an observable query runs **once, when the subscription is
|
|
15
15
|
established**. It decides whether the caller may obtain the live stream. It does
|
|
@@ -42,9 +42,11 @@ public class SessionMustStillBeActive(ISessions sessions) : IGuardObservableQuer
|
|
|
42
42
|
Arc API, and never an always-true stub.
|
|
43
43
|
|
|
44
44
|
It runs on **every emission** of **every subscription**, on **every transport**:
|
|
45
|
-
the multiplexed hub, WebSocket and SSE.
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
the multiplexed hub, WebSocket and SSE.
|
|
46
|
+
|
|
47
|
+
Requires Arc 22.69.1 for guards and read-model interceptors on plain HTTP snapshots, waits and long polls; on an older Arc those requests are not guarded.
|
|
48
|
+
|
|
49
|
+
Source: [ObservableQueryHttp.cs](https://github.com/Cratis/Arc/blob/main/Source/DotNET/Arc.Core/Queries/ObservableQueryHttp.cs).
|
|
48
50
|
|
|
49
51
|
## Verdicts
|
|
50
52
|
|
|
@@ -106,9 +108,9 @@ a failure.
|
|
|
106
108
|
|
|
107
109
|
## What a guard does not protect
|
|
108
110
|
|
|
109
|
-
- Plain HTTP **is** guarded
|
|
111
|
+
- Plain HTTP **is** guarded (Requires Arc 22.69.1; older versions leave it unguarded): suppression returns 202 until an allowed
|
|
110
112
|
emission (or the wait deadline), denial returns unauthorized with no data.
|
|
111
|
-
|
|
113
|
+
Keep safe data selection and initial
|
|
112
114
|
authorization on every query regardless of transport.
|
|
113
115
|
- A guard is not a substitute for the subscription-time declaration: the
|
|
114
116
|
`[Authorize]`/`[Roles]`/policy on the read model still decides who may subscribe.
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- Development listing
|
|
10
10
|
- Where the boundary is
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Source: `Cratis.Arc.Core`. Types are in `Cratis.Arc.Tenancy`.
|
|
13
13
|
|
|
14
14
|
Arc tenancy is **request-scoped tenant resolution**. It answers "which tenant is
|
|
15
15
|
this request for". It is not Chronicle's tenant namespace isolation, and it does
|
|
@@ -77,7 +77,7 @@ Arc for .NET has no tenancy-required switch. Empty header/query resolution
|
|
|
77
77
|
becomes `NotSet`; Chronicle's `TenantNamespaceResolver` maps `IsDefault` (both
|
|
78
78
|
`NotSet` and `Default`) to its default namespace. Refuse unresolved tenants in
|
|
79
79
|
application authorization when required; resolution alone is not isolation.
|
|
80
|
-
Sources
|
|
80
|
+
Sources: `Arc.Core/Tenancy/TenancyOptions.cs` and
|
|
81
81
|
`Chronicle/Tenancy/TenantNamespaceResolver.cs` under `Source/DotNET`.
|
|
82
82
|
Compare against `TenantId.NotSet` explicitly, or use
|
|
83
83
|
`CurrentTenantIdIsNotSet.ThrowIfNotSet(...)`, wherever an unresolved tenant must
|
|
@@ -100,7 +100,7 @@ created after beginning it.
|
|
|
100
100
|
The endpoint follows `Introspection.IdentityDiscovery` and discovery access:
|
|
101
101
|
anonymous only in Development by default, authenticated elsewhere, or unmapped
|
|
102
102
|
when the host cannot authenticate. Return development fixtures only.
|
|
103
|
-
Source: [
|
|
103
|
+
Source: [secure defaults](https://github.com/Cratis/Arc/blob/main/Documentation/upgrading/secure-defaults.mdx).
|
|
104
104
|
|
|
105
105
|
## Where the boundary is
|
|
106
106
|
|
|
@@ -24,27 +24,23 @@ or a combination.
|
|
|
24
24
|
|
|
25
25
|
## Verified product sources
|
|
26
26
|
|
|
27
|
-
| Package |
|
|
28
|
-
| --- | --- |
|
|
29
|
-
| `Cratis.Arc.Core` | `
|
|
30
|
-
| `Cratis.Arc.Chronicle` |
|
|
31
|
-
| `Cratis.Arc.ProxyGenerator.Build` | `
|
|
32
|
-
| `Cratis.Fundamentals` | `
|
|
33
|
-
| `Cratis.Chronicle` | `
|
|
34
|
-
| `@cratis/arc` | `
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
Fundamentals rechecked at v7.23.0 in
|
|
41
|
-
[`Result<TResult, TError>`](https://github.com/Cratis/Fundamentals/blob/v7.23.0/Source/DotNET/Fundamentals/Monads/Result%7BTResult,TError%7D.cs):
|
|
27
|
+
| Package | Purpose |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| `Cratis.Arc.Core` | `Cratis.Arc.Commands.ModelBound.CommandAttribute`, `CommandResult`, `CommandValidator<T>` |
|
|
30
|
+
| `Cratis.Arc.Chronicle` | event append handling, `Cratis.Arc.Chronicle.Commands.NotAuditedAttribute` |
|
|
31
|
+
| `Cratis.Arc.ProxyGenerator.Build` | `CratisProxiesOutputPath` MSBuild integration |
|
|
32
|
+
| `Cratis.Fundamentals` | `Cratis.Monads.Result<TResult, TError>` |
|
|
33
|
+
| `Cratis.Chronicle` | `EventTypeAttribute`, `EventForEventSourceId`, `ICanProvideEventSourceId` |
|
|
34
|
+
| `@cratis/arc` | `ICommand`, `CommandResult`, `ValidationResult` |
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
Fundamentals:
|
|
38
|
+
[`Result<TResult, TError>`](https://github.com/Cratis/Fundamentals/blob/main/Source/DotNET/Fundamentals/Monads/Result%7BTResult,TError%7D.cs):
|
|
42
39
|
success is first, error second, with implicit conversions from both types.
|
|
43
40
|
|
|
44
|
-
|
|
41
|
+
Arc without Chronicle is a
|
|
45
42
|
supported setup; everything on this page that appends events needs Chronicle.
|
|
46
|
-
|
|
47
|
-
`cratis-arc-command-operation` for its source and recovery contract.
|
|
43
|
+
See `cratis-arc-command-operation` for the operation source and recovery contract.
|
|
48
44
|
|
|
49
45
|
## Declare the command
|
|
50
46
|
|
|
@@ -172,20 +168,22 @@ public record Transfer(<AccountId> From, <AccountId> To, <Money> Amount)
|
|
|
172
168
|
|
|
173
169
|
## Generate a server-owned new identifier
|
|
174
170
|
|
|
175
|
-
|
|
171
|
+
Requires Arc 22.66.0 for `[GeneratedValue]`.
|
|
172
|
+
|
|
173
|
+
Replace local `New()` with a `[GeneratedValue]` Handle parameter,
|
|
176
174
|
never a request property. Use a non-nullable self-generatable concept and a unique,
|
|
177
175
|
case-sensitive generated name. Return the value explicitly if the caller needs it.
|
|
178
176
|
Read [generated values](references/generated-values.md) for Provide/DI boundaries,
|
|
179
|
-
validation/captures, ARC0022–ARC0025, migration and named pins;
|
|
180
|
-
factories are
|
|
177
|
+
validation/captures, ARC0022–ARC0025, migration and named pins; context
|
|
178
|
+
factories are covered in the shop reference below.
|
|
181
179
|
|
|
182
180
|
## Choosing a strategy
|
|
183
181
|
|
|
184
182
|
Use the [threaded shop example](references/shop-generation.md): CustomerId
|
|
185
183
|
(`cus_` + ULID), context-aware TypeID OrderId, NanoID InviteCode and secret
|
|
186
|
-
`Bytes(32)` ApiKey.
|
|
187
|
-
received time/tenant
|
|
188
|
-
is shown there.
|
|
184
|
+
`Bytes(32)` ApiKey. Context factories receive captured
|
|
185
|
+
received time/tenant (Requires Arc 22.83.0); Clock/Tenant scenario setup
|
|
186
|
+
is shown there.
|
|
189
187
|
|
|
190
188
|
## When not to generate
|
|
191
189
|
|
|
@@ -272,7 +270,7 @@ property is added.
|
|
|
272
270
|
| Marking | Use for | Effect |
|
|
273
271
|
| --- | --- | --- |
|
|
274
272
|
| `[PII]` (Chronicle) | personal data | encrypted in the event and enrolled in erasure; already withheld from causation |
|
|
275
|
-
| `[Encrypted]` (Chronicle, `Cratis.Chronicle.ProtectedValues
|
|
273
|
+
| `[Encrypted]` (Chronicle, `Cratis.Chronicle.ProtectedValues`) | an operational secret the system retains — a third-party API key, a company's bank account number | encrypted at rest on the event, no erasure; does not withhold it from causation |
|
|
276
274
|
| `[NotAudited]` (Arc Chronicle) | the same operational secret, and any credential given as a command input | withheld from causation, nothing else |
|
|
277
275
|
|
|
278
276
|
A retained operational secret needs **both** `[Encrypted]` and `[NotAudited]`; either alone leaves a gap. A credential used for authentication (password, token) is marked `[NotAudited]` on the command and reaches an event only as a hash or a reference, never encrypted. Never combine `[PII]` with `[Encrypted]` (`CHR0053`).
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
- Client side
|
|
8
8
|
- Executing with a severity
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Source: `Cratis.Arc.Core` and `@cratis/arc`.
|
|
11
11
|
Sources: `Source/DotNET/Arc.Core/Commands/CommandResult.cs`,
|
|
12
12
|
`CommandValidationResults.cs` and `Source/JavaScript/Arc/commands/Command.ts`.
|
|
13
13
|
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
- Definition-backed routes and templates
|
|
7
7
|
- Tags and completion
|
|
8
8
|
- Decision specifications
|
|
9
|
-
- Sources
|
|
9
|
+
- Sources
|
|
10
10
|
|
|
11
11
|
<!-- Copyright (c) Cratis. All rights reserved. -->
|
|
12
12
|
<!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Source: Arc. These features require `Cratis.Arc.Chronicle`.
|
|
15
15
|
|
|
16
16
|
## Pick the guarded read
|
|
17
17
|
|
|
@@ -78,7 +78,7 @@ ARCCHR0017/0018 check invalid templates/properties. On reactors the value is
|
|
|
78
78
|
literal, not a command template. `AmbiguousEventStreamId` rejects a non-NotSet
|
|
79
79
|
attribute value combined with `ICanProvideEventStreamId`, **including templates**.
|
|
80
80
|
Choose the attribute or the interface, not both. Source:
|
|
81
|
-
[EventStreamIdTemplate.cs](https://github.com/Cratis/Arc/blob/
|
|
81
|
+
[EventStreamIdTemplate.cs](https://github.com/Cratis/Arc/blob/main/Source/DotNET/Chronicle/Commands/EventStreamIdTemplate.cs).
|
|
82
82
|
|
|
83
83
|
`IEventRoutes.For<TSource>(stream).WithStreamId(value)` resolves an `EventRoute`;
|
|
84
84
|
`IStreamReads.Stream(id, route)` guards that route, while `StreamType(id, route)`
|
|
@@ -116,10 +116,10 @@ route, and that an independent route is not over-guarded.
|
|
|
116
116
|
`DecisionReadAdmissions.ShouldAdmitDecisionReadsIn(assembly)` checks projection
|
|
117
117
|
admission in assembly-level specs.
|
|
118
118
|
|
|
119
|
-
## Sources
|
|
119
|
+
## Sources
|
|
120
120
|
|
|
121
|
-
- [Stream decisions](https://github.com/Cratis/Arc/blob/
|
|
122
|
-
- [Protected read-model decisions and limitations](https://github.com/Cratis/Arc/blob/
|
|
123
|
-
- [Concurrency and templates](https://github.com/Cratis/Arc/blob/
|
|
124
|
-
- [Event tags](https://github.com/Cratis/Arc/blob/
|
|
125
|
-
- [Completing streams](https://github.com/Cratis/Arc/blob/
|
|
121
|
+
- [Stream decisions](https://github.com/Cratis/Arc/blob/main/Documentation/backend/csharp/chronicle/commands/stream-decisions.md)
|
|
122
|
+
- [Protected read-model decisions and limitations](https://github.com/Cratis/Arc/blob/main/Documentation/backend/csharp/chronicle/read-models/injecting-into-commands.md)
|
|
123
|
+
- [Concurrency and templates](https://github.com/Cratis/Arc/blob/main/Documentation/backend/csharp/chronicle/commands/concurrency.md)
|
|
124
|
+
- [Event tags](https://github.com/Cratis/Arc/blob/main/Documentation/backend/csharp/chronicle/commands/event-tags.md)
|
|
125
|
+
- [Completing streams](https://github.com/Cratis/Arc/blob/main/Documentation/backend/csharp/chronicle/commands/completing-streams.md)
|
|
@@ -14,13 +14,15 @@
|
|
|
14
14
|
|
|
15
15
|
## Declare the value and command
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
Requires Arc 22.66.0 for generated parameters.
|
|
18
|
+
|
|
19
|
+
Requires Arc 22.67.0 for scenario pinning.
|
|
20
|
+
|
|
21
|
+
Requires Arc 22.68.0 for the ARC0022–ARC0025 analyzers.
|
|
20
22
|
|
|
21
23
|
For the current threaded example, read [shop commands](shop-generation.md) and
|
|
22
24
|
[shop concepts](../../cratis-fundamentals-concept/references/shop-generation.md).
|
|
23
|
-
Those declarations
|
|
25
|
+
Those declarations show:
|
|
24
26
|
CustomerId (`cus_` + ULID), context-aware TypeID OrderId, NanoID InviteCode and
|
|
25
27
|
secret bytes ApiKey. They allocate responses, not events or persisted entities.
|
|
26
28
|
For a real Chronicle stream identity use `EventSourceId<T>`; return `(id, event)`
|
|
@@ -66,7 +68,7 @@ ordinary response, event and compliance contracts.
|
|
|
66
68
|
|
|
67
69
|
## Analyzer diagnostics
|
|
68
70
|
|
|
69
|
-
Arc
|
|
71
|
+
Arc reports these at compile time; none has a code fix. Runtime
|
|
70
72
|
handler-construction checks remain for declarations compiled without analyzers.
|
|
71
73
|
|
|
72
74
|
| Diagnostic | Severity | Fix |
|
|
@@ -117,17 +119,14 @@ Published guides:
|
|
|
117
119
|
[ARC0024](/arc/backend/csharp/code-analysis/arc0024/),
|
|
118
120
|
[ARC0025](/arc/backend/csharp/code-analysis/arc0025/).
|
|
119
121
|
|
|
120
|
-
Source
|
|
121
|
-
the prior verification): `Source/DotNET/Arc.Core/Commands/ModelBound/GeneratedValueAttribute.cs`,
|
|
122
|
+
Source: `Source/DotNET/Arc.Core/Commands/ModelBound/GeneratedValueAttribute.cs`,
|
|
122
123
|
`Commands/GeneratedValueParameters.cs`, `GeneratedValueFactories.cs`,
|
|
123
124
|
`CommandHandlerArgumentResolver.cs`, `GeneratedValueResolution.cs`;
|
|
124
125
|
`Source/DotNET/Arc.Core.CodeAnalysis/DiagnosticDescriptors.cs`; and
|
|
125
126
|
`Source/DotNET/Testing/Commands/CommandScenarioGeneratedValueExtensions.cs`.
|
|
126
127
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
setup](shop-generation.md). Neither tag supplies a native freshness/collision
|
|
131
|
-
allocator or a pattern contract. Screenplay 4.147.0+ separately admits concept `generate`
|
|
128
|
+
Contextual generation (received time and tenant) and Fundamentals' additional strategies need a newer Arc; [sources and Clock/Tenant
|
|
129
|
+
setup](shop-generation.md). Arc does not supply a native freshness/collision
|
|
130
|
+
allocator or a pattern contract. Screenplay separately admits concept `generate`
|
|
132
131
|
strategies and freshness; see `cratis-screenplay-command-surface/references/generated-values-and-responses.md`
|
|
133
132
|
for that language contract and Stage's explicit scopes, not native Arc freshness support.
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
- Cross-stream appends
|
|
10
10
|
- Failure shapes
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
(Chronicle dependency 19.39.1). Sources: `Source/DotNET/Arc.Core/Commands/CommandPipeline.cs`,
|
|
12
|
+
Source: `Cratis.Arc.Core` and `Cratis.Arc.Chronicle`. Sources: `Source/DotNET/Arc.Core/Commands/CommandPipeline.cs`,
|
|
14
13
|
`CommandOperationExecution.cs` and `Source/DotNET/Chronicle/Commands/CommandContextExtensions.cs`.
|
|
15
14
|
Read [decisions and routing](decisions-and-routing.md) for guarded reads,
|
|
16
15
|
stream templates, tags and post-commit completion.
|
|
@@ -137,8 +136,9 @@ public IEnumerable<object> Handle() =>
|
|
|
137
136
|
`EventStreamId` init members when the target stream is not the default.
|
|
138
137
|
Explicit wrapper routing wins over command-context routing in every return shape.
|
|
139
138
|
|
|
140
|
-
|
|
141
|
-
|
|
139
|
+
Requires Arc 22.49.0 and Chronicle 19.30.0 for event source definitions on commands.
|
|
140
|
+
|
|
141
|
+
A command that always appends through a Chronicle event source definition declares it with
|
|
142
142
|
`[EventSource<TSource>(stream)]` from `Cratis.Arc.Chronicle.Commands`; the definition
|
|
143
143
|
supplies the event source type and validates the optional stream name:
|
|
144
144
|
|