Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions handbooks/Project_File.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Language-coupling column: ✱ means the field is honoured only for a specific la
| `persistence.entities` | object<entityName, descriptor> | optional | — | Per-entity descriptor overrides. Keys must match `x-entity` schemas in the bundled spec. |
| `persistence.schemaCheckTimeoutSeconds` | number | optional | — | Wall-clock cap for the startup schema-compatibility check, in seconds. Default `30`. |
| `encryption` | object | optional | — | Compliance floors and key scope for the `x-protection` axis. **Absent means no floors are applied and nothing warns** — see §15. |
| `encryption.profiles[]` | array<string> | optional | — | `law25` \| `pci` \| `soc2`. Composed as a **union of floors, not a ladder**. See §15. |
| `encryption.profiles[]` | array<string> | optional | — | `law25` \| `pci` \| `soc2`. Composed as a **union of floors, not a ladder**, and applied project-wide: `pci` floors `pii` as well as `cardholder` and `sad`, in every service. See §15. |
| `encryption.keyScope` | string | optional | — | `tenant` \| `global`. Governs `PROTECTION_ENCRYPTED_TENANT_SCOPE_REQUIRED` and the generated `EncryptionProfile.DeclaredKeyScope`. Absent disables both. See §15. |
| `authorization` | object | optional | ✱ C# runtime; validation for all | Authorization mode and the claims the generated C# runtime reads. Absent is `mode: roles`, byte-identical to before generator `0.14.0`. See §16. |
| `authorization.mode` | enum | optional | — | `roles` (default) \| `scopes`. `scopes` raises the role/scope coherence WARNINGs to ERROR and gates C# controllers with `[ScopesRequired]`. See §16. |
Expand Down Expand Up @@ -1408,9 +1408,11 @@ A **union of floors, not a ladder.** Each declared profile sets a minimum `atRes
| Profile | What it adds |
|---|---|
| `law25` | Privacy floors per classification token. A classified property below the floor is `PROTECTION_LAW25_FLOOR`, whose remedy is *declare `x-protection.atRest: encrypted`, or `hashed` (with a rationale stating the value is never read back in plaintext, unless classified `credential`)*. |
| `pci` | Cardholder-data floors. `cardholder` must be `atRest: encrypted` with `masking.first <= 6` and `masking.last <= 4`, or `atRest: hashed` with a rationale (PCI-DSS 3.5.1). `sad` must be `never-persist` — sensitive authentication data may not be stored after authorisation. Reported as `PROTECTION_PCI_FLOOR`. |
| `pci` | Cardholder-data floors, **and a floor on `pii`**. `cardholder` must be `atRest: encrypted` with `masking.first <= 6` and `masking.last <= 4`, or `atRest: hashed` with a rationale (PCI-DSS 3.5.1). `sad` must be `never-persist` — sensitive authentication data may not be stored after authorisation. `pii` must be `atRest: encrypted`, or `atRest: hashed` with a rationale — so under `pci` a rationale does not make `atRest: none` acceptable for `pii`, as it does under `law25`. The `pii` floor is deliberate: personal data in a PCI-scoped project is held alongside cardholder data, so it is not left in plaintext on a rationale alone. All three are reported as `PROTECTION_PCI_FLOOR`. |
| `soc2` | Not a floor but a metadata gate: it makes `rationale`, `reviewedOn` **and** `reviewedBy` mandatory on every declared `x-protection` (`PROTECTION_SOC2_METADATA_REQUIRED`). A `reviewedOn` older than 18 months is a **finding**, never a build failure — see §11.5 for why that is deliberate. |

**Profiles are project-wide.** `encryption.profiles` is one list for the whole project file, and each floor applies to every classified `x-entity` property in every specification the project generates from. So declaring `pci` puts the `pii` floor on **every** `pii` property in **every** service — including a service that holds no card data, and a property deliberately stored `atRest: none` with a rationale that `law25` alone would accept. There is no way to scope a profile to part of a project. Before declaring `pci`, find the `pii` properties declared `atRest: none` (`java -jar specfuse-generator.jar validate path/to/project.json` with `pci` declared reports each as `PROTECTION_PCI_FLOOR`) and decide for each whether to encrypt it or hash it with a rationale.

An unrecognised profile token is not a floor; it is simply not one of the three, and it configures nothing.

### `keyScope`
Expand Down
Loading