Commit d34351f
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
File tree
- bindata/crds
- config/operator
- hack
- internal
- controller/core
- openstack
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
840 | 840 | | |
841 | 841 | | |
842 | 842 | | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
843 | 850 | | |
844 | 851 | | |
845 | 852 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2144 | 2144 | | |
2145 | 2145 | | |
2146 | 2146 | | |
| 2147 | + | |
| 2148 | + | |
| 2149 | + | |
| 2150 | + | |
2147 | 2151 | | |
2148 | 2152 | | |
2149 | 2153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
445 | 452 | | |
446 | 453 | | |
447 | 454 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1603 | 1603 | | |
1604 | 1604 | | |
1605 | 1605 | | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
1606 | 1610 | | |
1607 | 1611 | | |
1608 | 1612 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2093 | 2093 | | |
2094 | 2094 | | |
2095 | 2095 | | |
| 2096 | + | |
| 2097 | + | |
| 2098 | + | |
| 2099 | + | |
| 2100 | + | |
| 2101 | + | |
| 2102 | + | |
2096 | 2103 | | |
2097 | 2104 | | |
2098 | 2105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1292 | 1292 | | |
1293 | 1293 | | |
1294 | 1294 | | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
1295 | 1302 | | |
1296 | 1303 | | |
1297 | 1304 | | |
| |||
1342 | 1349 | | |
1343 | 1350 | | |
1344 | 1351 | | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
1345 | 1358 | | |
1346 | 1359 | | |
1347 | 1360 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
212 | 216 | | |
213 | 217 | | |
214 | 218 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1901 | 1901 | | |
1902 | 1902 | | |
1903 | 1903 | | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
1904 | 1908 | | |
1905 | 1909 | | |
1906 | 1910 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1607 | 1607 | | |
1608 | 1608 | | |
1609 | 1609 | | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
1610 | 1617 | | |
1611 | 1618 | | |
1612 | 1619 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1914 | 1914 | | |
1915 | 1915 | | |
1916 | 1916 | | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
1917 | 1924 | | |
1918 | 1925 | | |
1919 | 1926 | | |
| |||
0 commit comments