Commit Graph

118 Commits

Author SHA1 Message Date
c8e2b142db Split user-engine implementation planning 2026-05-22 19:50:12 +02:00
6892dfd758 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-05-22:
  - update .custodian-brief.md for net-kingdom
2026-05-22 19:45:22 +02:00
28da204cf2 Add user-engine architecture workplans 2026-05-22 19:28:00 +02:00
6aec040046 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-05-22:
  - update .custodian-brief.md for net-kingdom
2026-05-22 19:24:16 +02:00
8e720dd78a Implement NK-WP-0013 playbook capability contract 2026-05-22 14:49:25 +02:00
c3f721397a Implement NK-WP-0012 IAM profile specification 2026-05-22 14:35:31 +02:00
48cd174b00 Register NK-WP-0013 in State Hub
Backfill workstream and task ids from State Hub registration
(workstream 32a54d8e, 6 tasks).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 02:43:58 +02:00
09534f6617 Draft NK-WP-0013: Playbook Capability Contract
The orchestration-layer analog of the IAM Profile, realizing the
playbook-contract dependency named in ADR-0007's meta-orchestration
refinement. NetKingdom owns the contract schema (consumer-defines-contract,
IAM Profile precedent); Railiance authors playbooks and publishes
conformant declarations; execution stays in Railiance (ADR-0007 unchanged).

Six tasks: ownership ADR + versioning; capability vocabulary (aligned to
the C0-C6 ladder + responsibility-map resource kinds); parameter format
(defaults, constraints, security-sensitivity); responsibility/trust-state
claims; catalog + consumption model + conformance validator; reference
adoption with one Railiance playbook. Status proposed; not yet registered.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 02:41:17 +02:00
e852c23f5f Register NK-WP-0012 in State Hub
Backfill workstream and task ids from State Hub registration
(workstream 9b8e4afc, 6 tasks).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 02:25:26 +02:00
b29d30ff10 Draft NK-WP-0012: NetKingdom IAM Profile specification
Plan to make net-kingdom the canonical owner of the IAM Profile. A v0.1
draft exists in the-custodian canon (all-hubs, Custodian-flavored,
Keycloak as reference provider); this workplan relocates ownership and
evolves it to a provider-neutral, platform-neutral v0.2 that is tenant-
and agent-aware, carries explicit assurance evidence, specifies the claim
contract flex-auth consumes, and ships an executable conformance check.

Enables NK-WP-0011 (T6 conformance) and depends on NK-WP-0006 (recursive
tenant model). Status: proposed; not yet registered in the hub.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 02:21:59 +02:00
84e9a56f6c Add responsibility map; link from ADR-0010
Create docs/responsibility-map.md: the single home for NetKingdom's
orchestration relationships, kept out of the orchestrated repos' intents
per ADR-0010. Records the classification criterion, the current
minimal-foundation scope, and per orchestrated repo (railiance-infra,
railiance-cluster, railiance-platform, key-cape, flex-auth) the resources
held, what the repo owns (execution), and what NetKingdom orchestrates
(meta). Lists dependencies and out-of-scope repos so the scoping decision
is explicit and revisitable.

Update ADR-0010 to point at the now-created map.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 02:05:37 +02:00
6973440b3c Add ADR-0010: orchestration vs dependency, self-coherent intent
Record two foundational principles that emerged while aligning ecosystem
INTENT.md files:

1. Orchestration != dependency. NetKingdom orchestrates a repo when that
   repo holds resources NetKingdom must manage (users, roles, scopes,
   policies, infra resources). It depends on a repo when it merely uses it
   as a tool. Defining question: does the repo hold resources NetKingdom
   needs to orchestrate? (railiance-fabric = dependency;
   railiance-infra/cluster/platform = orchestrated.)
2. Intent is self-coherent. A repo's INTENT.md describes its own purpose
   abstractly; it must not reference NetKingdom, sister projects' intents,
   or even dependencies. Relationships live in the responsibility map /
   ADRs / interface contracts, not in intent.

Rejects the earlier "place in the NetKingdom landscape" block idea as a
Principle 2 violation.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 01:26:31 +02:00
88a30e3c0a Add meta-orchestration layer to ADR-0007; deepen NetKingdom INTENT
- ADR-0007: refine (not overturn) the orchestration boundary with the
  two-layer model — Railiance executes parametrized playbooks, NetKingdom
  does meta-orchestration (scenario->playbook selection, parametrization,
  responsibility map). Add the playbook/capability-contract dependency as
  the prerequisite, analogous to the IAM Profile.
- INTENT.md: add "Why NetKingdom" (the kingdom metaphor: governed,
  defended, living/evolving, tended by its people); Principle 7
  (Meta-Orchestration over Re-Implementation); an Operating Model section
  (kaizen-agent workforce for recurring duties + change/improvement); and
  matching Direction-of-Evolution entries.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 01:00:39 +02:00
1bff863143 Frame NetKingdom as capability-driven turn-key IT-sec framework
Make the lightweight->expanded decision explicitly capability-driven (not
scale-driven) and capture the turn-key, capability-selectable framework
ambition.

- arch doc: add capability-driven rationale to the identity-mode choice;
  add a "Capability Progression (Start Small -> Enterprise)" ladder
  (C0 bootstrap -> C6 self-optimizing), including the C2a/C2b 2FA split
  (Authelia built-in vs privacyIDEA); answer the lightweight/expanded
  open question as capability-driven
- INTENT.md: recast Progressive Expansion as capability-driven with a
  no-structural-breaks guarantee; add capability-selection + turn-key
  orchestration to the mission and identity

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 00:35:12 +02:00
57073af68c Register NK-WP-0011 in State Hub; archive NK-WP-0001
Set NK-WP-0001 status to canonical 'archived' (was non-canonical
'deferred', which the hub rejected). Backfill NK-WP-0011 workstream and
task ids from State Hub registration.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 00:07:06 +02:00
ab79a32eba Cancel NK-WP-0001-T04; extract Keycloak federation into NK-WP-0011
NK-WP-0001-T04 (privacyIDEA, Keycloak path) -> cancelled, superseded by
NK-WP-0003-T04 in the deployed KeyCape stack. T05-T08 (Keycloak SSO,
realm/MFA flow, user mgmt, DR) -> cancelled and migrated to NK-WP-0011.

NK-WP-0011 reframes the deferred Keycloak work as expanded-mode enterprise
federation: Keycloak as an identity broker for Entra ID / AD / SAML that
issues IAM Profile-conformant tokens, refined against the current stack
(OpenBao runtime secrets, CloudNativePG, flex-auth/Topaz PDP, recursive
platform/tenant model) rather than the original greenfield assumptions.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 23:48:51 +02:00
2037df49bc chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-05-20:
  - update .custodian-brief.md for net-kingdom
2026-05-20 22:52:26 +02:00
7b211acd57 Add OpenBao runtime secret authority; complete NK-WP-0006/0007/0008
Refine the recursive platform security architecture to make OpenBao the
canonical runtime secret authority, with SOPS/age, K8s Secrets, and the
emergency bundle reframed as bootstrap/delivery/break-glass mechanisms.

- credential-management standard v0.2: add OpenBao runtime authority
  section, rotation rules, and prohibited patterns (OpenBao-as-PDP,
  tenant platform-root)
- platform-identity-security-architecture: mark implemented; add
  flex-auth/Topaz implications, Coulomb onboarding path, and a
  production-readiness checklist
- NK-WP-0004/0005: document bootstrap-to-OpenBao handoff boundary
- NK-WP-0006/0007: status -> done with implementation reviews; add
  recursive platform/tenant split and OpenBao broker/audit role for
  object-storage STS vending
- NK-WP-0008: status -> done; repoint corpus to infospace-bench
- new ADR-0007 (orchestration boundary), ADR-0008 (STS vending
  boundary), and the object-storage STS credential-vending architecture

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 22:51:20 +02:00
b49631acef Add NK-WP-0010 genesis pattern completion plan 2026-05-19 07:12:08 +02:00
520bd6cb3d chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-05-19:
  - update .custodian-brief.md for net-kingdom
2026-05-19 04:20:30 +02:00
4b5679d24f Refresh agent instruction files 2026-05-18 16:55:46 +02:00
8910aae655 Improved documentation 2026-05-17 22:36:31 +02:00
d4adfa2c1b Add security architecture workplans 2026-05-17 14:17:55 +02:00
e528ea38a5 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-05-17:
  - update .custodian-brief.md for net-kingdom
2026-05-17 14:15:02 +02:00
1ad75b7a56 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-05-17:
  - NK-WP-0006-T7: pending → todo
2026-05-17 12:24:35 +02:00
f37a62ff61 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-05-17:
  - NK-WP-0006-T6: pending → todo
2026-05-17 12:24:35 +02:00
a826d789ee chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-05-17:
  - NK-WP-0006-T5: pending → todo
2026-05-17 12:24:35 +02:00
5c21cd7b18 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-05-17:
  - NK-WP-0006-T4: pending → todo
2026-05-17 12:24:35 +02:00
81fe5b7381 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-05-17:
  - NK-WP-0006-T3: pending → todo
2026-05-17 12:24:35 +02:00
3cffff1d42 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-05-17:
  - update .custodian-brief.md for net-kingdom
2026-05-17 12:23:12 +02:00
64a112f70c Document recursive platform security architecture 2026-05-17 12:18:29 +02:00
88fdb89e7d Formalized repo intent to INTENT.md 2026-05-03 19:38:55 +02:00
fafa3c83d1 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-05-02:
  - update .custodian-brief.md for net-kingdom
2026-05-02 17:32:24 +02:00
9009ca6b56 Net Kingdom cluster deployment finished 2026-05-02 17:28:44 +02:00
576cf0d95b Local Identity OICD bootstrap 2026-05-02 16:58:44 +02:00
d8fea09de7 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-05-01:
  - update .custodian-brief.md for net-kingdom
2026-05-01 23:20:21 +02:00
f172f50f95 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-05-01:
  - update .custodian-brief.md for net-kingdom
2026-05-01 23:05:42 +02:00
d13a2b9b39 Scope update from repo-scoping refactor 2026-05-01 12:28:04 +02:00
69763056fa chore(session): read .custodian-brief.md before MCP call in session init
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 17:48:52 +01:00
4942ee1bba chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-03-26:
  - update .custodian-brief.md for net-kingdom
2026-03-26 17:47:51 +01:00
8612e6b8a2 Decision for KeyCape Implementation Language Go 2026-03-26 09:21:17 +01:00
c054241a5c feat(t09): backup, break-glass, DR drill — NK-WP-0003-T09 done
- Apply SQLite backup CronJobs (LLDAP, Authelia, privacyIDEA) — all verified running
- Fix authelia-backup: remove scale-down/up dance; concurrent local-path PVC mount
  works on single-node k3s, sqlite3 .backup is safe for concurrent access
- Fix privacyidea-backup: add supplementalGroups: [999] so uid=1000 can read enckey
- Add allow-backup-to-kube-api NetworkPolicy (backup pod → 10.43.0.1:443)
- Create break-glass LLDAP account (net-kingdom-admins); fix ((PASS++)) set-e trap
- SQLite restore drill: LLDAP backup valid (2 users, all tables)
- verify-t08.sh: PASS=15, FAIL=0; fix counter bug + enckey PVC path (/etc/privacyidea)
- Update DR-RUNBOOK.md Authelia restore procedure
- T09 deferred: CNPG backup (needs MinIO/S3), Prometheus (needs kube-prometheus-stack)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 23:56:40 +00:00
4c47c9035f chore(workplan): NK-WP-0003 T04+T08 — testuser provisioned, pi-admin TOTP deferred
testuser fully provisioned in LLDAP + privacyIDEA (TOTP00007147 validated).
pi-admin TOTP deferred: requires admin realm setup (SQLresolver), pi-manage
has no enroll command, WebUI only works for resolver-backed users.
T08 unblocked — proceed to KeyCape acceptance tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 11:49:51 +00:00
331eeaf378 fix(lldap): fix gql() brace bug + use LDAP for password setting
Three fixes:
1. gql() default vars '${2:-{}}' — bash parsed first '}' as closing the
   parameter expansion, appending a stray '}' to every caller's vars.
   Fixed by storing '{}' in a local variable first.
2. make_vars() — add VAR_INT_KEYS support so groupId is emitted as a
   JSON integer (Int!) rather than a string, matching LLDAP's schema.
3. Password setting — LLDAP has no GraphQL mutation for admin password
   reset. Replace the broken resetUserPasswordFromAdmin mutation with
   an RFC 3062 LDAP Password Modify operation via kubectl port-forward
   to the in-cluster LLDAP service, using ldap3.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 11:49:26 +00:00
3a76774dec feat(lldap): add --test flag to create-user.sh for auto-derived passwords
--test derives the password from the display name (spaces → hyphens, append -Pwd),
e.g. "Test User" → "Test-User-Pwd". Skips the interactive prompt.
Useful for provisioning test accounts in a non-interactive flow.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 11:49:26 +00:00
ca69f6bb73 fix(lldap): use env vars in create-user.sh to avoid shell injection
Pass GraphQL query/variables and group names via environment variables
to python3 instead of shell argument interpolation. Prevents breakage
when display names, emails, or passwords contain quotes or spaces.

Also adds --admin flag support and interactive password prompt.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 11:49:26 +00:00
e802fe3a9d feat(lldap): add create-user.sh for user provisioning
Creates a user in LLDAP via GraphQL, adds them to net-kingdom-users,
optionally net-kingdom-admins (--admin flag), and sets a password interactively.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 11:49:26 +00:00
35fa3a5767 fix(privacyidea): create pi-admin-all-rights policy in bootstrap-admin.sh
Once any admin policy exists, PI enforces it for all admins. Without an
explicit policy, pi-admin is locked out of the REST API after trigger-admin-rights
is created. Add pi-admin-all-rights (scope=admin, action=*) via pi-manage
(in-pod) as step 5, before the REST-based trigger-admin-rights step.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 11:49:26 +00:00
afbf968c76 fix(privacyidea): bootstrap-realm scope fixes + netpol for PI→LLDAP
bootstrap-realm.sh:
- Remove Content-Type header from GET requests (Werkzeug 3.x BadRequest fix)
- Fix resolver type check — result path is result.value.<name>.type, not .data
- Fix self-enrollment policy scope: 'user' not 'enrollment' (PI 3.12)

NetworkPolicies:
- allow-egress-to-lldap (mfa ns): privacyIDEA → LLDAP :3890
- allow-privacyidea-to-lldap (sso ns): ingress from mfa/privacyIDEA → LLDAP :3890

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 11:49:26 +00:00
88bbd585fd fix(privacyidea): rename realm netkingdom → coulomb in bootstrap-realm.sh
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 11:49:26 +00:00