Commit Graph

20 Commits

Author SHA1 Message Date
20fd300e88 Exploring multi tenancy 2026-05-25 21:47:40 +02:00
e45dd4f9eb Guide OpenBao custody ceremony order 2026-05-25 02:02:14 +02:00
d555a33695 bootstrapping guidance ui and missing stuff 2026-05-24 17:04:15 +02:00
1d0b0e7330 openbao king credential bootstrapping 2026-05-24 09:26:02 +02:00
97423c6110 Complete user-engine boundary contracts 2026-05-22 22:26:36 +02:00
c8e2b142db Split user-engine implementation planning 2026-05-22 19:50:12 +02:00
28da204cf2 Add user-engine architecture workplans 2026-05-22 19:28:00 +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
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
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
8910aae655 Improved documentation 2026-05-17 22:36:31 +02:00
64a112f70c Document recursive platform security architecture 2026-05-17 12:18:29 +02:00
576cf0d95b Local Identity OICD bootstrap 2026-05-02 16:58:44 +02:00
e7bafd69fc feat(local-identity): Stage 4 — security hardening (NK-WP-0002-T04)
Permission enforcement on startup: enforce_permissions() checks store dir
(700), user files (600), signing key, TLS key, audit.log, revoked.json.
CLI and run_server() call it before any sensitive operation.

New modules:
  security.py  check_store(), enforce_permissions(), print_security_check()
  audit.py     log_event() — append-only TSV audit log (mode 600)
  revoke.py    revoke(jti), is_revoked(jti) — revocation list (mode 600)

New CLI commands:
  security-check          Print per-check pass/warn/fail report; exit 1 on failure
  revoke-token <jti|jwt>  Add JTI to revocation list; accepts raw JTI or full JWT

Serve integration:
  Audit log written for auth request, token issuance, and userinfo calls
  Revocation checked at /userinfo; revoked tokens return 401

Docs: security model section in LocalIdentity.md — threat model,
assumptions, non-guarantees, SELinux/AppArmor guidance, revocation usage.

138 tests passing (34 new for Stage 4).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 08:06:56 +01:00
dad8365e6a feat(local-identity): Stage 2 — Keycloak export & bootstrap integration (NK-WP-0002-T02)
export.py:
  - split_fullname(): last-token strategy (Bernd Worsch → firstName/lastName)
  - _deterministic_id(): uuid5(DNS, "local-identity.{realm}.{username}") for stable,
    re-import-idempotent Keycloak IDs
  - user_to_keycloak(): full Keycloak Admin REST API user representation;
    production_identity mapping applied to username + realm; isolation attributes
    (local_identity_environment, local_identity_generated) always present;
    validate_keycloak_user() called on every conversion to catch schema drift
  - bulk_export_body(): partial import body (ifResourceExists/realm/users)

cli.py: add `export` subcommand
  - export <username>         single user, prints Keycloak JSON
  - export (no args)          bulk; primary users only; stderr note on skipped test users
  - export --include-test     bulk; all users including generated
  - --realm / --if-resource-exists flags

docs/LocalIdentity.md: add two new sections
  - Keycloak import procedure: export → partialImport API → password reset → retire
  - Isolation guarantee: attribute schema, Keycloak Condition authenticator config,
    production_identity mapping walkthrough

tests/test_export.py: 34 new tests (88 total, all passing)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 00:23:39 +01:00
6ed0061962 feat(local-identity): add NK-WP-0002 workplan and LocalIdentity.md
Follows resolved decisions D4 and D5 (2026-03-01, Tegwick):

D4 — ESO chosen as secret injection strategy. NK-WP-0001 T01 Phase 0b
updated to specify ESO; T01 done-criteria updated to require a working ESO
test injection.

D5 — Local Identity implemented in-repo (not a separate repo). Four
deliverables:
- docs/LocalIdentity.md: capability overview, design principles, user
  schema, OIDC provider description, risk mitigations, scope boundaries
- workplans/NK-WP-0002-local-identity.md: four-stage implementation plan
  (core file store, bootstrap integration, minimal OIDC, security hardening)
  with State Hub task IDs
- NK-WP-0001 updated: D2/D4/D5 rows resolved, T07 bootstrap section now
  references NK-WP-0002 and documents the export→Keycloak migration path,
  Open Questions condensed to two remaining artefacts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 23:49:06 +01:00