fastlane #28
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Meta/Campaign
Meta/Epic
Meta/Session
Priority/Critical
Priority/High
Priority/Low
Priority/Medium
Reviewed/Confirmed
Reviewed/Curated
Reviewed/Duplicate
Reviewed/Invalid
Reviewed/Won't Fix
Scope/Campaign
Status/Abandoned
Status/Blocked
Status/Conflicted
Status/In Progress
Status/In Review
Status/Need Grooming
Status/Need More Info
Status/Ready
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Ting/Vedanta!28
Loading…
Reference in a new issue
No description provided.
Delete branch "fastlane"
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?
First time this code has actually been run through clippy — its own doc comment said as much ("not yet cargo built"). Construct PrincipalShapeProgram with its fields set at initialization instead of Default::default() followed by two field assignments.Everything before this declared an Allow and stopped; nothing in this binary ever actually wrote to lldap. This is the first effect that gets executed, not just declared: - principal-shape's ascent program now also derives an `identity.mint` effect (kind + `{"sub":...}` params) alongside its Allow conclusion, joined by (key, reason) per Derived::effects' own contract. `Derived` no longer discards effects with `..Default::default()`. - src/lldap.rs: AdminClient, a session against lldap's GraphQL admin API — NOT the raw LDAP protocol `connect()` already used for reconcile. Confirmed live, by introspecting heimdallr's actual running lldap (Mutation type, CreateUserInput), not assumed from docs: lldap has no LDAP-protocol write path for user creation, and CreateUserInput has no password field at all — credential-setting is a separate, unbuilt flow. These accounts are meant to be passwordless (owner, 2026-08-09): they authenticate through modron's token contract, not an Authelia login window, so the missing password field is the correct end state here, not a gap to fill in later. - `vedanta mint-agent <name> --display-name <display>` (sub = a+<name>) and `vedanta mint-service <name> --display-name <display>` (sub = sa+<name>) run the SAME principal-shape gate `serve` would — no side channel that skips it — and only execute the declared effect on Allow. `worker-` (pool slots) deliberately stays out: that's the pool-manager's checkout/reissue cycle, not a one-shot mint. - reqwest pulled in via --no-default-features: this only ever talks http://127.0.0.1 (lldap's own loopback listener), and the default TLS backend (rustls + aws-lc-rs) would be dead weight in both the binary and the Nix build closure for a connection that is never TLS. Scope, deliberately: user creation only — no group membership, no custom attributes (librefang_node, pool_*), no password. Each of those is its own undecided question already flagged in the schema docs (default groups for a freshly minted identity, credential rotation) — this effector executes what's actually settled and stops there, same posture principal-shape itself took. Verified against the real thing, not a mock: `nix build` + `nix copy` to heimdallr + `vedanta mint-service minttest --display-name "Mint Test (disposable)"` actually created uid=sa+minttest in the live directory (confirmed via a direct GraphQL query), then deleted to leave the directory clean. cargo test / clippy --all-targets -- -D warnings clean.lldap left the fleet at flake-ops#51 on 2026-08-10; its sops keys went at phase 5 the day after. Every directory line here addressed it, so the gigachad recipe was not stale but broken — it read a deleted secret path. Vedanta now holds its OWN kanidm identity: service account `sa-vedanta`, one read-write api-token, delivered through DOTENV_FILE. The alternative was the operator path the off-repo spike uses — ssh as root, `kanidmd recover-account idm_admin` — and it was refused (owner, 2026-08-11) for reasons worth not re-arguing: recovering idm_admin at will IS admin, so it is not the narrow grant it looks like; it forces this unit to run as root and discard module.nix's NoNewPrivileges and ProtectSystem=strict; and a token's rights can be read out of the directory, where root's cannot. The rights themselves are granted at bootstrap, never in the flake (owner: "no admin in the flake"), by lar.ad/flake-ops#98. A privileged helper standing behind Vedanta was refused too: Vedanta IS the privileged component. Every call was made against the live instance before it was written, the standard the lldap effector set. What that bought, none of it in the docs: - kanidm refuses `+` in a NAME (400 schemaviolation) but accepts it in MAIL. So a+/sa+ stays a JWT `sub` contract, the entity is a-freki, the plus-addressed mailbox survives where it is load-bearing, and the two are joined by UUID. This is why the spike writes `sa-<persona>` — a workaround nobody had recorded as one. - A person cannot hold an api-token (MissingClass("service_account")), so the service-account choice flake-ops#72 ruled is forced, not preferred. - A `-w` token in idm_service_account_admins creates accounts and writes group members. That premise is true, which is the whole reason this shape works. The gate is untouched: mint() still routes through Steward::evaluate and only then effects. Partial success is reported, not rolled back — if the roster group join fails the account exists and the error says so, with the uuid already logged. Nothing here grows a revoke path. reqwest gains TLS (feature `rustls`, not the pre-0.13 `rustls-tls` spelling), aimed at the public origin rather than kanidm's self-signed loopback, so no client here is taught to accept an unverified peer. Refs Ting/Vedanta#5, lar.ad/flake-ops#51, #72, #97, #98`/run/secrets/vedanta/kanidm_token` is not created by deploying — sops-nix materializes DECLARED secrets and nothing else, and flake-ops declares no `vedanta/*` yet (lar.ad/flake-ops#91). This recipe exists precisely to run code in production BEFORE that lands, so it now falls back to the sops file the token was minted into (lar.ad/flake-ops#98) and uses the host path when something finally does declare one. The credential goes over STDIN, never the command line: `ssh host "TOKEN=abc vedanta"` puts it in heimdallr's process table for the life of the call, readable by anyone on the box. And a missing credential now fails at 78 (EX_CONFIG) instead of limping. Observed for real: `VEDANTA_KANIDM_TOKEN="$(cat missing)"` does not stop a shell — `cat` writes to stderr, the substitution yields an EMPTY string, and kanidm answers `401 notauthenticated`, which reads as "your token is wrong" when the truth is "you have no token". Verified end to end against the live directory: INFO vedanta: reconcile: kanidm reachable, no reconciliation rules defined yet — no-op [email protected] Refs Ting/Vedanta#5, lar.ad/flake-ops#91, #98Pull request closed