Repository navigation
Conversation
…access-ci # Conflicts: # .gitignore # README.md # Taskfile.yaml # docs/design.md # go.mod # go.sum
ecv
left a comment
There was a problem hiding this comment.
Request changes.
go.mod moves go.miloapis.com/service-catalog from v0.13.1 on main to v0.3.2-0.20260714005215-6a3cddd298b0, a downgrade (latest tag is v0.16.1), and fleet-manager imports it. The staging manager image is rebuilt from this go.mod on merge, so this is not prototype-only for staging: staging picks up the older service-catalog plus k8s 0.36→0.37 and controller-runtime 0.24→0.25. Keep service-catalog at v0.13.1 or newer. The rest is an approve.
- Manifests: infra staging renders only
./miloand./overlays/synthetic-stagingfromfleet-kustomize:v0.0.0-main; this PR touches nothing those render. The newconfig/crd,config/location,config/federationandconfig/managerdirs ship in the bundle but nothing consumes them. Production and edge reference no fleet bundle. - Cross-tenant: admission resolves the claim only in the session's own namespace, requires exactly one active allocation by claim UID and checks claim UID, name and namespace. The principal annotation is overwritten from
req.UserInfo.Usernameby afailurePolicy: Failwebhook, and spec and annotations are immutable after create (webhook plus CELself == oldSelf).allocationStillActivecompares binding, epoch, machine, location, member and route, so a reused allocation revokes the session. - Revocation: release sets the projection Revoked with
AuthorityFreshUntil=now; the Redfish handler checks expiry and freshness on every request and returns 503 AuthorityStale, so it fails closed within the 2 min bound. - Replay: the ed25519 proof covers domain, version, session UID, audience, timestamp and nonce with ±30s skew, and the nonce is consumed after verification.
go test -race ./internal/...passes.
Follow-ups:
allocationStillActivereturns false on any List error orlen != 1, and the caller setsrevoked-atpermanently, so one transient API error kills a live session. Distinguish error from not-found.- Session limits count from a cached list, so two sessions for one claim can both pass before the cache catches up.
- Journal identity is hash(session, method, path, body): a second identical
Resetreturns the first task and never runs, and an op leftPendingby a crash is never reconciled. Both need the client idempotency key the docs mention. gateway.runreturns on a relay dial failure but leaves the entry inr.active, so the session sits inRelayUnavailableuntil expiry.- Nonces are in memory and never pruned: a gateway restart reopens a 30s replay window, and the map grows for the process lifetime. The proof does not sign method, path or body.
- Freshness is an absolute central time checked against the gateway clock, so clock skew stretches the revocation bound; the TLS stream is not closed on staleness.
- Relay: one static gateway token shared by all gateways, sent in plaintext over the NodePort, with no cap on pending routes or unauthenticated connections.
secure-bmc-access.mdsays the proof signs the one-use route ID; the code signs the session UID.- No Milo IAM protected resource or role for
machinemanagementsessions; the principal is never checked against the claim, only RBACcreate. Needed before customer exposure.
|
Re-review requested on The prior blocking dependency issue is resolved:
Final CI is green:
|
Merge the secure BMC prototype and align public sessions, private bindings, and location projections with the current Metal/Fleet split. Restore the service-catalog baseline, fix projection freshness validation, and document remaining lifecycle integration and E2E verification gaps. Signed-off-by: Scot Wells <wells.scot@gmail.com>
…into t3/secure-bmc-fleet-sync
ecv
left a comment
There was a problem hiding this comment.
Approve.
The service-catalog hold is fixed: go.mod pins go.miloapis.com/service-catalog v0.13.1, same as main. I rendered ./milo and ./overlays/synthetic-staging (the two paths infra staging takes from fleet-kustomize:v0.0.0-main) with kustomize 5.8.1 on main (5047156) and on a git merge-tree of main and this head: both renders are byte-identical, so merging changes nothing in the staging render.
- The
fleet.datumapis.comtometal.datumapis.comCRD, IAM ProtectedResource and role renames are already on main (#44/#46), and infra staging already usesmetal.datumapis.com(MachineClass, MachineProfile, MachineCapacity, themetalService patches). This PR adds no further rename for staging, so no CRD is orphaned and no role is dropped. - This head alone, rendered without main, drops the
metal-machineslegacyResourceRegistrationthat #48 added toconfig/components/service-catalogto preserve old quota accounting. The merge keeps it (clean three-way on those paths), so resolve the README.md and docs/development/roadmap.md conflicts without reverting #48. Staging'sfleet-milo-configurationhasprune: false, so a revert would orphan rather than delete the registration. - The 3 new CRDs (
config/crd: sessions, bindings, projected sessions),config/federation,config/location,config/managerandconfig/rbacship in the bundle but neither staging path references them. - The staging manager image is rebuilt from this go.mod on merge, so staging also picks up k8s 0.36.1 to 0.37.2 and controller-runtime 0.24.1 to 0.25.2. The
virtual-bmcE2E (full Karmada/Kind/sushy run) andvalidatechecks pass on this head.
Follow-ups:
- The earlier open items still apply before customer exposure: Milo IAM role for
machinemanagementsessionsand a principal-to-claim check,allocationStillActivetreating any List error as revoked, in-memory nonces, and the shared plaintext relay token. - Mergeable state is CONFLICTING (docs only), so the branch needs main merged in before it can land.
The merge-base changed after approval.
# Conflicts: # README.md # docs/development/roadmap.md
kevwilliams
left a comment
There was a problem hiding this comment.
Hold: six new doc links are broken against current main, and the gateway sends BMC credentials over plain http when the enrollment endpoint allows it.
hack/validate-doc-links.shcallsrg, which ubuntu-latest lacks, so CI logsrg: command not foundand passes; run locally, it fails on thedesign.md,architecture.mdandimplementation.mdlinks moved by #47.- The gateway sends Basic-auth credentials to whatever
endpointthe enrollment Secret names,http://included; requirehttpsand offer a CA bundle option. - Test: an enrollment with an
http://endpoint is refused.
|
Closing as stale: this prototype has had no activity since 13 Nov, conflicts with main, and main has since reworked device custody and per-Device BMC credentials (#182). Reopen or start fresh from main if customer BMC access is still wanted; the branch is kept. |
Summary
Adds an allocation-scoped customer Redfish prototype under the existing Bare Metal service. Customers request a MachineManagementSession without receiving physical BMC addresses or credentials. Karmada projects narrow authority to one location; an outbound relay connects an ephemeral-key customer connector to the location gateway.
Sessions consume Fleet's protected Secret-backed lifecycle custody instead of synthetic MachineAllocation annotations. Admission shares the allocation/installation CAS boundary. Release waits for verified gateway request draining and effect settlement before cleanup or reuse; unknown effects retain custody. An explicit synthetic controller mode and fleet-session-fixture exercise real Coordinator allocation/release transitions. Production remains unready without authoritative integrations.
Public sessions/bindings use metal.datumapis.com; location projections use coordination.fleet.datumapis.com. Includes schemas, plugin, relay/gateway, durable operation journal, manifests, tests, and a Linux sushy/libvirt E2E harness. Integrated current main, including documentation reorganization and the separate synthetic provider.
Verified CI evidence
Exact head:
62d88c4234028c0269c2ab87552ed6399b40463e.The prior fixture startup panic was fixed by isolating CLI flags, with a regression test. Earlier baseline runs and zero-schema validator results are historical diagnostics, not the evidence for this head. The final passing run does not establish the cause of earlier intermittent Karmada/connection failures or long-run reliability.
Remaining production work
Caller-preserving Milo authorization, trusted observations, durable project quota, policy renewal, executor/replica fencing, interrupted operation recovery, relay/nonce/clock/rotation hardening, and physical hardware qualification remain incomplete. The production authorization plan specifies permissions, retained decisions, durable limits and acceptance gates; it does not enable production access. Synthetic cleanup and virtual BMC evidence do not qualify physical hardware.
See docs/implementation/machine-management-prototype.md, secure-bmc-lifecycle.md, synthetic-bmc-fixture.md and secure-bmc-authorization.md for contracts, commands and historical evidence. The CI links above supersede the documents' pending combined-run status. Existing live sessions require accounted teardown before removing old schemas or migrating custody.