← Back to Pull requests

DFBUGS-12798: keep csi cephx keys on aes #4401

Closed
unknown closed this pull request without merging on Nov 25, 2026 08:50 UTC
View on GitHub
unknown unknown commented on Nov 18, 2026 05:39 UTC
Author

In internal mode, rook creates the CSI ceph users. OCS opeator left security.cephx.csi.keyType empty, so Rook created the keys with the mon default key type, which is aes256k. Kernels without aes256k support can't mont volumes with these keys

On fresh installs the CSI keys (rook-csi-rbd-node, rook-csi-rbd-provisioner, rook-csi-cephfs-node, rook-csi-cephfs-provisioner) are created as aes256k. ocs-operator does not set security.cephx.csi.keyType, so Rook uses the mon
default auth_preferred_cipher, which is aes256k. Node kernels without aes256k support (for example RHEL 9.2) cannot mount volumes with these keys.

4.19 and later are not affected. There the CSI users are CephClients created by ocs-operator with keyType: aes.

Fix is to set security.cephx.csi.keyType: aes on the CephCluster

Tested upgraded from 4.18 (without fix) to 4.18 (with fix)

  • Before fix: CSI is using aes256k

  •  security:
          cephx:
            allowedCiphers:
            - aes
            - aes256k
            csi: {}
            daemon: {}
            rbdMirrorPeer:
              keyType: aes
          keyRotation:
            enabled: false
            schedule: '@weekly'
          kms:
    
    ocs-operator.v4.18.999-rhodf
    ocs-operator.v4.18.999-rhodf
    
    client.csi-cephfs-node.1
    	key: AgDTQABr+wIYMSAArd7JjphjkxAqio2NxylzYL0M+yDQOb4EMzjc/7pc/+0=
    	caps: [mds] allow rw
    	caps: [mgr] allow rw
    	caps: [mon] allow r
    	caps: [osd] allow rw tag cephfs *=*
    client.csi-cephfs-provisioner.1
    	key: AgDTQABrNHApECAA6vMWeTYqq7ftzJXHQHryCqvRBs9YFbFd4s8vZbLLzfg=
    	caps: [mds] allow *
    	caps: [mgr] allow rw
    	caps: [mon] allow r, allow command 'osd blocklist'
    	caps: [osd] allow rw tag cephfs metadata=*
    client.csi-rbd-node.1
    	key: AgDSQABrO9HSKiAA86M5maMlUfZvMfik6FZ8wA+mrcRqK+9a/BCIFTmeWkY=
    	caps: [mgr] allow rw
    	caps: [mon] profile rbd
    	caps: [osd] profile rbd
    client.csi-rbd-provisioner.1
    	key: AgDSQABrN0zFCSAASDnMYm1w1V9aXhDEmMXGlFgAknaXU2IoGvsrtS7j2mU=
    	caps: [mgr] allow rw
    	caps: [mon] profile rbd, allow command 'osd blocklist'
    	caps: [osd] profile rbd
    

    ———————

  • After this fix:
  •  security:
          cephx:
            allowedCiphers:
            - aes
            - aes256k
            csi:
              keyType: aes
            daemon: {}
            rbdMirrorPeer:
              keyType: aes
          keyRotation:
            enabled: false
            schedule: '@weekly'
    

    Keys don’t rotate. They are still aes:

    client.csi-cephfs-node.1
    	key: AgDTQABr+wIYMSAArd7JjphjkxAqio2NxylzYL0M+yDQOb4EMzjc/7pc/+0=
    	caps: [mds] allow rw
    	caps: [mgr] allow rw
    	caps: [mon] allow r
    	caps: [osd] allow rw tag cephfs *=*
    client.csi-cephfs-provisioner.1
    	key: AgDTQABrNHApECAA6vMWeTYqq7ftzJXHQHryCqvRBs9YFbFd4s8vZbLLzfg=
    	caps: [mds] allow *
    	caps: [mgr] allow rw
    	caps: [mon] allow r, allow command 'osd blocklist'
    	caps: [osd] allow rw tag cephfs metadata=*
    client.csi-rbd-node.1
    	key: AgDSQABrO9HSKiAA86M5maMlUfZvMfik6FZ8wA+mrcRqK+9a/BCIFTmeWkY=
    	caps: [mgr] allow rw
    	caps: [mon] profile rbd
    	caps: [osd] profile rbd
    client.csi-rbd-provisioner.1
    	key: AgDSQABrN0zFCSAASDnMYm1w1V9aXhDEmMXGlFgAknaXU2IoGvsrtS7j2mU=
    	caps: [mgr] allow rw
    	caps: [mon] profile rbd, allow command 'osd blocklist'
    	caps: [osd] profile rbd
    
    

    —————
  • Attempted rotation of the CSI keys

  • security:
          cephx:
            allowedCiphers:
            - aes
            - aes256k
            csi:
              keepPriorKeyCountMax: 1
              keyGeneration: 2
              keyRotationPolicy: KeyGeneration
              keyType: aes
            daemon: {}
            rbdMirrorPeer:
              keyType: aes
          keyRotation:
            enabled: false
            schedule: '@weekly'
    

  • CSI keys got rotated. New keys are aes

  • cephx:
          admin: {}
          cephExporter:
            keyCephVersion: 19.2.1-423
            keyGeneration: 1
          crashCollector:
            keyCephVersion: 19.2.1-423
            keyGeneration: 1
          csi:
            keyCephVersion: 19.2.1-423
            keyGeneration: 2
            keyType: aes
            priorKeyCount: 1
    

    client.csi-cephfs-node.1
    	key: AgDTQABr+wIYMSAArd7JjphjkxAqio2NxylzYL0M+yDQOb4EMzjc/7pc/+0=
    	caps: [mds] allow rw
    	caps: [mgr] allow rw
    	caps: [mon] allow r
    	caps: [osd] allow rw tag cephfs *=*
    client.csi-cephfs-node.2
    	key: AQC7VQBrcE5ROBAAlD5YlaqBr/QdJNoyiSzChg==
    	caps: [mds] allow rw
    	caps: [mgr] allow rw
    	caps: [mon] allow r
    	caps: [osd] allow rw tag cephfs *=*
    client.csi-cephfs-provisioner.1
    	key: AgDTQABrNHApECAA6vMWeTYqq7ftzJXHQHryCqvRBs9YFbFd4s8vZbLLzfg=
    	caps: [mds] allow *
    	caps: [mgr] allow rw
    	caps: [mon] allow r, allow command 'osd blocklist'
    	caps: [osd] allow rw tag cephfs metadata=*
    client.csi-cephfs-provisioner.2
    	key: AQC6VQBrvrQnHxAA5gV7mVdw3jKY375UXTD/aw==
    	caps: [mds] allow *
    	caps: [mgr] allow rw
    	caps: [mon] allow r, allow command 'osd blocklist'
    	caps: [osd] allow rw tag cephfs metadata=*
    client.csi-rbd-node.1
    	key: AgDSQABrO9HSKiAA86M5maMlUfZvMfik6FZ8wA+mrcRqK+9a/BCIFTmeWkY=
    	caps: [mgr] allow rw
    	caps: [mon] profile rbd
    	caps: [osd] profile rbd
    client.csi-rbd-node.2
    	key: AQC5VQBrI4s9BhAA8SD/EFmb/KXlKqGEtZ9B2w==
    	caps: [mgr] allow rw
    	caps: [mon] profile rbd
    	caps: [osd] profile rbd
    client.csi-rbd-provisioner.1
    	key: AgDSQABrN0zFCSAASDnMYm1w1V9aXhDEmMXGlFgAknaXU2IoGvsrtS7j2mU=
    	caps: [mgr] allow rw
    	caps: [mon] profile rbd, allow command 'osd blocklist'
    	caps: [osd] profile rbd
    client.csi-rbd-provisioner.2
    	key: AQC3VQBrKEjvKBAAzz7HEM5qAc2dvRp+uVsKng==
    	caps: [mgr] allow rw
    	caps: [mon] profile rbd, allow command 'osd blocklist'
    	caps: [osd] profile rbd
    

     oc rsh -n openshift-storage $(oc get pods -o wide -n openshift-storage|grep rook-ceph-operator|awk '{print$1}') ceph --conf=/var/lib/rook/openshift-storage/openshift-storage.config --cluster=openshift-storage --name=client.admin  status
      cluster:
        id:     6c4336c6-f66d-46db-bd89-312533599bfc
        health: HEALTH_OK
                (muted: AUTH_INSECURE_CLIENT_KEY_TYPE AUTH_INSECURE_KEYS_ALLOWED AUTH_INSECURE_KEYS_CREATABLE AUTH_INSECURE_ROTATING_SERVICE_KEY_TYPE)
    
      services:
        mon: 3 daemons, quorum a,b,c (age 94m)
        mgr: a(active, since 4m), standbys: b
        mds: 1/1 daemons up, 1 hot standby
        osd: 3 osds: 3 up (since 93m), 3 in (since 94m)
    
      data:
        volumes: 1/1 healthy
        pools:   4 pools, 113 pgs
        objects: 631 objects, 1.6 GiB
        usage:   4.5 GiB used, 295 GiB / 300 GiB avail
        pgs:     113 active+clean
    
      io:
        client:   4.9 KiB/s rd, 272 KiB/s wr, 3 op/s rd, 8 op/s wr
    

    Note: Restarted the workloads pods after key rotation. Volumes remounted with the .2 aes keys and data was intact.

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: BlaineEXE Review duration: 10270m
    All Vouch review confidence checks passed
    Residual risk 0.22 = Change Risk (0.52) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 650 lines diff across 8 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #4401"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52% (MEDIUM) · Higher = larger blast radius
    52%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 22.5% · Safe to merge
    22.5%