Skip to content

Commit d34351f

Browse files
Deydra71claude
andcommitted
Add EDPM-aware application credential revocation for Nova and Ceilometer
For ctlplane only services (Barbican, Glance...), the existing consumer finalizer added by each service operator is sufficient: once the service pod restarts with the new secret, the operator removes its finalizer and keystone-operator's cleanupUnusedRotatedSecrets revokes the old credential in Keystone and deletes the K8s Secret. For EDPM services (Nova, Ceilometer) the service operator restarts its control plane pod quickly, but the old credential is still baked into dataplane node configs. Revoking it before the nodes redeploy would break running workloads. This commit adds a second protection layer: an edpm-ac-consumer finalizer on the AC secret that blocks keystone-operator revocation until EDPM nodes have fully redeployed with the new credential. Implementation uses two annotations on the KeystoneApplicationCredential CR to track EDPM state: - openstack.org/edpm-deployed-secret: the AC secret name currently deployed to EDPM nodes. - openstack.org/edpm-synced-config-hash: a combined hash of the EDPM config secrets at the time nodes were last confirmed in sync. A two-phase check (reconcileEDPMSync) runs each reconcile cycle: Phase 1 - detects that the service operator has re-rendered the EDPM config with the new credential (combined config hash changed). Phase 2 - verifies all OpenStackDataPlaneNodeSet SecretHashes match the live config, confirming nodes have been redeployed. When both phases pass, the edpm-ac-consumer finalizer is removed from the old secret and tracking annotations are updated. Keystone-operator then sees no remaining consumer finalizers and proceeds with revocation (Keystone API call + K8s Secret deletion). Note: Currently and previous AC Secret is always protected by ac-protection finalizer. The EDPM sync check (HasPendingEDPMSync) runs at the end of the main OpenstackControlPlane reconcile loop, after all services have been processed. This ensures all EDPM services update their configs in a single reconcile cycle, so a single EDPM deployment is sufficient to sync all services simultaneously. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Veronika Fisarova <vfisarov@redhat.com>
1 parent 5977b36 commit d34351f

35 files changed

Lines changed: 1191 additions & 207 deletions

bindata/crds/barbican.openstack.org_barbicans.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,13 @@ spec:
840840
status:
841841
description: BarbicanStatus defines the observed state of Barbican
842842
properties:
843+
applicationCredentialSecret:
844+
description: |-
845+
ApplicationCredentialSecret - the AC secret barbican is currently
846+
consuming and protecting with the openstack.org/barbican-ac-consumer
847+
finalizer. Tracked so the controller can remove its finalizer from the
848+
old secret when the openstack-operator rotates the reference.
849+
type: string
843850
barbicanAPIReadyCount:
844851
description: ReadyCount of Barbican API instances
845852
format: int32

bindata/crds/cinder.openstack.org_cinders.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2144,6 +2144,10 @@ spec:
21442144
type: object
21452145
description: API endpoints
21462146
type: object
2147+
applicationCredentialSecret:
2148+
description: ApplicationCredentialSecret - the AC secret cinder is
2149+
currently consuming
2150+
type: string
21472151
cinderAPIReadyCount:
21482152
default: 0
21492153
description: ReadyCount of Cinder API instance

bindata/crds/designate.openstack.org_designateapis.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,13 @@ spec:
442442
type: object
443443
description: API endpoints
444444
type: object
445+
applicationCredentialSecret:
446+
description: |-
447+
ApplicationCredentialSecret - the AC secret DesignateAPI is currently
448+
consuming and protecting with the openstack.org/designateapi-ac-consumer
449+
finalizer. Tracked so the controller can remove its finalizer from the
450+
old secret when the openstack-operator rotates the reference.
451+
type: string
445452
conditions:
446453
description: Conditions
447454
items:

bindata/crds/glance.openstack.org_glanceapis.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1603,6 +1603,10 @@ spec:
16031603
type: string
16041604
description: API endpoint
16051605
type: object
1606+
applicationCredentialSecret:
1607+
description: ApplicationCredentialSecret - Secret that GlanceAPI is
1608+
actively consuming (AC consumer finalizer present)
1609+
type: string
16061610
conditions:
16071611
description: Conditions
16081612
items:

bindata/crds/heat.openstack.org_heats.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2093,6 +2093,13 @@ spec:
20932093
status:
20942094
description: HeatStatus defines the observed state of Heat
20952095
properties:
2096+
applicationCredentialSecret:
2097+
description: |-
2098+
ApplicationCredentialSecret - the AC secret Heat is currently
2099+
consuming and protecting with the openstack.org/heat-ac-consumer
2100+
finalizer. Tracked so the controller can remove its finalizer from the
2101+
old secret when the openstack-operator rotates the reference.
2102+
type: string
20962103
conditions:
20972104
description: Conditions
20982105
items:

bindata/crds/ironic.openstack.org_ironics.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,6 +1292,13 @@ spec:
12921292
type: object
12931293
description: API endpoint
12941294
type: object
1295+
applicationCredentialSecret:
1296+
description: |-
1297+
ApplicationCredentialSecret - the AC secret ironic is currently
1298+
consuming and protecting with the openstack.org/ironic-ac-consumer
1299+
finalizer. Tracked so the controller can remove its finalizer from the
1300+
old secret when the openstack-operator rotates the reference.
1301+
type: string
12951302
conditions:
12961303
description: Conditions
12971304
items:
@@ -1342,6 +1349,12 @@ spec:
13421349
type: string
13431350
description: Map of hashes to track e.g. job status
13441351
type: object
1352+
inspectorApplicationCredentialSecret:
1353+
description: |-
1354+
InspectorApplicationCredentialSecret - the AC secret ironic-inspector is
1355+
currently consuming and protecting with the
1356+
openstack.org/ironic-inspector-ac-consumer finalizer.
1357+
type: string
13451358
ironicAPIReadyCount:
13461359
description: ReadyCount of Ironic API instance
13471360
format: int32

bindata/crds/keystone.openstack.org_keystoneapplicationcredentials.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,10 @@ spec:
209209
for this ApplicationCredential.
210210
format: int64
211211
type: integer
212+
previousSecretName:
213+
description: PreviousSecretName - name of the previous AC secret.
214+
Only current and previous are protected by finalizer.
215+
type: string
212216
rotationEligibleAt:
213217
description: |-
214218
RotationEligibleAt indicates when rotation becomes eligible (start of grace period window).

bindata/crds/manila.openstack.org_manilas.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1901,6 +1901,10 @@ spec:
19011901
status:
19021902
description: ManilaStatus defines the observed state of Manila
19031903
properties:
1904+
applicationCredentialSecret:
1905+
description: ApplicationCredentialSecret - Secret that Manila is actively
1906+
consuming (AC consumer finalizer present)
1907+
type: string
19041908
conditions:
19051909
description: Conditions
19061910
items:

bindata/crds/neutron.openstack.org_neutronapis.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,6 +1607,13 @@ spec:
16071607
status:
16081608
description: NeutronAPIStatus defines the observed state of NeutronAPI
16091609
properties:
1610+
applicationCredentialSecret:
1611+
description: |-
1612+
ApplicationCredentialSecret - the AC secret NeutronAPI is currently
1613+
consuming and protecting with the openstack.org/neutronapi-ac-consumer
1614+
finalizer. Tracked so the controller can remove its finalizer from the
1615+
old secret when the openstack-operator rotates the reference.
1616+
type: string
16101617
conditions:
16111618
description: Conditions
16121619
items:

bindata/crds/nova.openstack.org_nova.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1914,6 +1914,13 @@ spec:
19141914
from nova-api
19151915
format: int32
19161916
type: integer
1917+
applicationCredentialSecret:
1918+
description: |-
1919+
ApplicationCredentialSecret - the AC secret nova is currently
1920+
consuming and protecting with the openstack.org/nova-ac-consumer
1921+
finalizer. Tracked so the controller can remove its finalizer from the
1922+
old secret when the openstack-operator rotates the reference.
1923+
type: string
19171924
conditions:
19181925
description: Conditions
19191926
items:

0 commit comments

Comments
 (0)