Skip to content

Implement the 'auth rotate' and 'auth status' commands - #897

Open
lmlg wants to merge 15 commits into
mainfrom
cephx-rotation
Open

lmlg wants to merge 15 commits into
mainfrom
cephx-rotation

Conversation

@lmlg

@lmlg lmlg commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

This patchset implements the aforementioned commands. The former works by rotating the microceph-managed CephX keys of an (optional) client, allowing users to explicitly select the key type. It performs the steps defined by the upstream Ceph community.

The latter command notifies users of potential problems with the key rotations. It lets users know what are the current blockers so that manual intervention can happen more effectively.

@johnramsden johnramsden left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(AI Review, Claude Opus 5.5)

This review was generated by an AI model and hasn't been verified by a human yet. Treat it as a starting point, not a verdict: individual findings may be wrong, overstated or missing context, so please check each one before acting on it. A human reviewer will follow up.

Reviewed at d5c45b0. Claims about Ceph behaviour were checked against the 19.2.6 source (the first Squid release with aes256k), not against 20.2.x, and nothing was run on a live cluster. "Upstream step N" refers to https://docs.ceph.com/en/latest/rados/configuration/auth-config-ref/#cephx-upgrade.

The structure is a good base: a singleton record, stage names that map onto the upstream procedure, and injectable *Func seams with unit tests. The main problems are in how the stages reach other nodes and services. Each point below has its own inline thread:

  • Daemon and client rotation only touch the node that runs the command. Other members keep old keys on disk and in memory.
  • --reload never restarts the rotated OSD, so it keeps the old key until its auth ticket expires (72h by default).
  • The pending-key keyring written for managed clients can't be loaded by Ceph (it contains a pending key = line).
  • Managed-client detection misfires when NFS or two-way replication is configured, and --client client.admin locks MicroCeph out.
  • Resuming starts over from scratch, there's no abort, and the whole run is one synchronous request with a 10-minute timeout and an unrenewed 10-minute lock.
  • make check-static is narrowed to errcheck only, and the new Robot suite isn't in the CI matrix, so neither the extra linters nor the integration test has exercised this code.

Comment thread microceph/ceph/auth_rotate.go Resolved
Comment thread microceph/ceph/auth_rotate.go Resolved
Comment thread microceph/ceph/auth_rotate.go Resolved
Comment thread microceph/ceph/auth_rotate.go Resolved
Comment thread microceph/ceph/auth_rotate.go Resolved
Comment thread microceph/ceph/auth_rotate_test.go Resolved
Comment thread microceph/cmd/microceph/auth.go Resolved
Comment thread microceph/cmd/microceph/auth.go Resolved
Comment thread microceph/cmd/microceph/auth.go Resolved
@johnramsden

Copy link
Copy Markdown
Member

I will follow up with a manual review after the AI review is addressed

@johnramsden johnramsden left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Review (omp:gpt-6-astra)

Comment thread microceph/database/schema.go Resolved
Comment thread microceph/ceph/auth_rotate.go Resolved
Comment thread microceph/ceph/auth_rotate.go Resolved
Comment thread microceph/ceph/auth_rotate.go Resolved
Comment thread microceph/ceph/auth_rotate.go Resolved
Comment thread microceph/ceph/auth_rotate.go Resolved
Comment thread microceph/ceph/auth_rotate.go Resolved
Comment thread microceph/ceph/auth_rotate.go Resolved
Comment thread microceph/ceph/auth_rotate.go Resolved
lmlg added 10 commits November 9, 2026 19:59
This patchset implements the aforemention commands. The former works by
rotating the microceph-managed CephX keys of an (optional) client, allowing
users to explicitly select the key type. It performs the steps defined by
the upstream Ceph community.

The latter command notifies users of potential problems with the key rotations.
It lets users know what are the current blockers so that manual intervention
can happen more effectively.

Signed-off-by: Luciano Lo Giudice <luciano.logiudice@canonical.com>
Signed-off-by: Luciano Lo Giudice <luciano.logiudice@canonical.com>
Signed-off-by: Luciano Lo Giudice <luciano.logiudice@canonical.com>
Signed-off-by: Luciano Lo Giudice <luciano.logiudice@canonical.com>
Signed-off-by: Luciano Lo Giudice <luciano.logiudice@canonical.com>
Signed-off-by: Luciano Lo Giudice <luciano.logiudice@canonical.com>
Signed-off-by: Luciano Lo Giudice <luciano.logiudice@canonical.com>
Signed-off-by: Luciano Lo Giudice <luciano.logiudice@canonical.com>
Signed-off-by: Luciano Lo Giudice <luciano.logiudice@canonical.com>
Signed-off-by: Luciano Lo Giudice <luciano.logiudice@canonical.com>
lmlg added 5 commits November 17, 2026 18:18
Signed-off-by: Luciano Lo Giudice <luciano.logiudice@canonical.com>
Signed-off-by: Luciano Lo Giudice <luciano.logiudice@canonical.com>
Signed-off-by: Luciano Lo Giudice <luciano.logiudice@canonical.com>
Signed-off-by: Luciano Lo Giudice <luciano.logiudice@canonical.com>
Signed-off-by: Luciano Lo Giudice <luciano.logiudice@canonical.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants