HLD for Redfish Certificate Provisioning Integration - #2461
shreyansh-nexthop wants to merge 4 commits into
Conversation
|
/azp run |
|
No pipelines are associated with this pull request. |
|
/azp run |
|
No pipelines are associated with this pull request. |
ba9b34e to
42192c3
Compare
|
/azp run |
|
No pipelines are associated with this pull request. |
|
/azp run |
|
No pipelines are associated with this pull request. |
High-level design for staging externally provisioned certificates into the redfish (bmcweb) container and enforcing mTLS, without modifying bmcweb. Signed-off-by: shreyansh-nexthop <shreyansh@nexthop.ai>
Address review comment: keep the secure-mode policy out of DEVICE_METADATA and store it in REDFISH|AUTHENTICATION_MODE:secure_mode instead. Signed-off-by: shreyansh-nexthop <shreyansh@nexthop.ai>
84d18b2 to
8b2b38c
Compare
|
/azp run |
|
No pipelines are associated with this pull request. |
rebuild-source: sonic-net#2461 @ nexthop-ai/SONiC 8b2b38c [case: upstream:open]
rebuild-source: sonic-net#2461 @ nexthop-ai/SONiC 8b2b38c [case: upstream:open]
rebuild-source: sonic-net#2461 @ nexthop-ai/SONiC 8b2b38c [case: upstream:open]
rebuild-source: sonic-net#2461 @ nexthop-ai/SONiC 8b2b38c [case: upstream:open]
rebuild-source: sonic-net#2461 @ nexthop-ai/SONiC 8b2b38c [case: upstream:open]
rebuild-source: sonic-net#2461 @ nexthop-ai/SONiC 8b2b38c [case: upstream:open]
rebuild-source: sonic-net#2461 @ nexthop-ai/SONiC 8b2b38c [case: upstream:open]
rebuild-source: sonic-net#2461 @ nexthop-ai/SONiC 8b2b38c [case: upstream:open]
rebuild-source: sonic-net#2461 @ nexthop-ai/SONiC 8b2b38c [case: upstream:open]
rebuild-source: sonic-net#2461 @ nexthop-ai/SONiC 8b2b38c [case: upstream:open]
rebuild-source: sonic-net#2461 @ nexthop-ai/SONiC 8b2b38c [case: upstream:open]
rebuild-source: sonic-net#2461 @ nexthop-ai/SONiC 8b2b38c [case: upstream:open]
rebuild-source: sonic-net#2461 @ nexthop-ai/SONiC 8b2b38c [case: upstream:open]
rebuild-source: sonic-net#2461 @ nexthop-ai/SONiC 8b2b38c [case: upstream:open]
rebuild-source: sonic-net#2461 @ nexthop-ai/SONiC 8b2b38c [case: upstream:open]
|
@qiluo-msft @yxieca for review |
Signed-off-by: Shreyansh Jain <shreyansh@nexthop.ai>
|
/azp run |
|
No pipelines are associated with this pull request. |
rebuild-source: sonic-net#2461 @ nexthop-ai/SONiC 62cb184 [case: upstream:open]
rebuild-source: sonic-net/pull/2461 @ nexthop-ai/SONiC 62cb184 [case: upstream:open]
rebuild-source: sonic-net#2461 @ nexthop-ai/SONiC 62cb184 [case: upstream:open]
rebuild-source: sonic-net/pull/2461 @ nexthop-ai/SONiC 62cb184 [case: upstream:open]
|
@shreyansh-nexthop you could refer to this config https://github.com/sonic-net/sonic-mgmt/tree/master/ansible/roles/testbed/nut/templates/config_patch/common .. we could have redfish config similar to how it is done for other services like gnmi/restapi/telemetry Sample config as below, so with this we can use the attributes server_crt/server_key/ca_crt etc and the other configs to set the port as configurable, client_auth = cert, where CN validation is enforced OR none. |
rebuild-source: sonic-net#2461 @ nexthop-ai/SONiC 62cb184 [case: upstream:open]
rebuild-source: sonic-net/pull/2461 @ nexthop-ai/SONiC 62cb184 [case: upstream:open]
Sure, this can be done, will update the HLD |
rebuild-source: sonic-net#2461 @ nexthop-ai/SONiC 62cb184 [case: upstream:open]
rebuild-source: sonic-net/pull/2461 @ nexthop-ai/SONiC 62cb184 [case: upstream:open]
Signed-off-by: Shreyansh Jain <shreyansh@nexthop.ai>
|
/azp run |
|
No pipelines are associated with this pull request. |
| - **Fail closed after first provisioning (secure mode).** A dedicated marker file, `/var/lib/bmcweb/provisioned`, is written on the first successful staging. Once it exists, every bmcweb start is gated: with no valid staged certificate, bmcweb does not start at all, instead of falling back to a self-signed cert. No CONFIG_DB attribute is involved, and the marker survives reboot and container recreation. Recovery is automatic when valid certs reappear. | ||
| - **Deletion behavior.** Deleting the source certificates does not tear down the running service (bmcweb keeps serving the last staged certificate), and it is not a way to revoke access: the running bmcweb keeps serving the already-loaded certificate and keeps trusting the same CA. To actually revoke, rotate the CA (clients whose certs were issued by the old CA then fail the mTLS handshake). | ||
| - **Observability.** The watcher publishes sync status to STATE_DB (`REDFISH_CERT_STATUS|global`: `in_sync`, `last_error`, fingerprints, served serial, plus `mtls_enforced` for the enforcement state) every cycle, and every decision is logged to syslog. A rotation that fails to land is visible, not silent; monitoring must watch `in_sync`. | ||
| - **Boot resilience preserved.** Before certificates are ever provisioned, the BMC still boots with bmcweb's self-signed certificate and the API is reachable. |
There was a problem hiding this comment.
So assuming the following is true
By default when BMC boots up for first time, the certificate bmcweb serves is not CA-signed.
It is a self-signed certificate that bmcweb generates itself at first startup -- There is no CA, no truststore, and mTLS is off. In that default state /redfish/v1 works.
Because no client certificate is required, you can reach it with curl -k https:///redfish/v1
No description provided.