feat: een RegelHet noemt in spec.fsc4b.origins de browserapps die FSC voor Burgers mogen aanroepen #47
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/plugin-fsc4b-origins"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds
spec.fsc4b.originsto the RegelHet CRD. The plugin passes it to the chart valuefsc4b.origins(REGELHET_FSC4B_ORIGINS, added in #39), so a browser app such as the citizen's app (#42) can call a RegelHet's FSC voor Burgers routes from its own address. Before this, the only way was a manual patch of the HelmRelease, which the plugin reverts.What changes
api/v1alpha1, regeneratedcrds/regelhet.regelrecht.nl_regelhets.yaml):fsc4b.origins: [string], at most 20. Each entry matcheshttps://host[:port], orhttp://localhost[:port]/http://127.0.0.1[:port]for an app on a developer's machine. No path, no trailing slash, no wildcard. A CEL rule refuses origins withoutfsc4b.enabled. FSC voor Burgers is test mode only already, so origins are too.resources.go):validateSpecapplies the same checks for objects that did not come through the API server.chartValuessetsfsc4b: {enabled: true, origins: [...]}when origins are given and leaves the value out otherwise.fsc4b.originsin the spec table.The plugin version stays v0.7.0, as on main.
Unrelated to this change: the committed
crds/regelhet.regelrecht.nl_organisaties.yamlis out of date with the doc comments inapi/v1alpha1on main ("regelhets" vs "RegelHet instances"). I left that file out of this PR.Tests
go test ./...: origins reach the chart values and the HelmRelease; they are refused withoutfsc4b.enabled; invalid origins are refused (http elsewhere, a path, a trailing slash,*, empty) and valid ones accepted (a port, localhost, 127.0.0.1).node --test console-test/*.test.js: the wizard puts origins in the spec only with FSC voor Burgers on, splits the input on commas and whitespace, and checks it as the CRD does.🤖 Generated with Claude Code
https://claude.ai/code/session_01XDZRnqjJJ2izeL3kP33bnv