Add application credential finalizer management#1108
Conversation
Signed-off-by: Veronika Fisarova <vfisarov@redhat.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Deydra71 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/09a52fa229b0443eae25a234ac4cd247 ✔️ openstack-meta-content-provider SUCCESS in 4h 16m 43s |
|
Note: this PR does not include EDPM-aware revocation blocking. Nova-operator and telemetry-operator will not need code changes for the EDPM tracking problem. The EDPM credential lifecycle gap (old AC secrets being revoked while EDPM nodes still use them) will be handled entirely in keystone-operator, building on the The plan:
This keeps the tracking responsibility centralized in keystone-operator (the credential owner) rather than duplicating NodeSet awareness across service operators. Same pattern as infra-operator's ae1787c for RabbitMQ user deletion. |
Service operators are not allowed to depend on the OpenStackControlPlane or So this also breaks the architecture by creating a circular dependency between A better approach is to follow how the RabbitMQ rotation works We just need to provide the reference to those in the config maps that we The keystone operator does not need to actually do anything special. It can |
|
Hi @SeanMooney - thanks for flagging the concern, I want to clarify the planned approach since there's no keystone-operator code up for review yet regarding the EDMP tracking issue, and I want to make sure we align before publishing a PR. What we're planning to do (and not do):
With that, the check is unidirectional: NodeSet status flows into keystone-operator's decision on whether to revoke old rotated application credentials. There is no feedback path - keystone-operator's actions (revoking an AC, deleting a Secret) do not trigger NodeSet status changes and that is identical to what infra-operator does in On the referenced guideline: On the reconciliation loop concern: With the above - my questions to resolve before proceeding:
|
|
so the issue is service operator like keyston are not allwo to read OpenStackDataPlaneNodeSet.Status or interact with CRs of that kind/CRD at all. the infra operator is not a service operator. the keystone-oporatr shoudl jsut watch the ApplciationCredtial CR for the finaliser to be remvoed and the openstack operator shoudl do the removal of the filaiser from the applciation creditail cr when all edpm nodes are updated. if the keystone operatort is aware of OpenStackDataPlaneNodeSet at all directly thats a problem you are not ment to have refence to the CRDs contained in https://github.com/openstack-k8s-operators/openstack-operator in service operators, the infra operator was created so that service operator could depend on resouce form a common operatior that was not the openstack operator. so my meta point is its not ok to implemnt the same pattern the infa operator does in teh keystone operator. |
|
@SeanMooney Alright, I now understand the full picture and the difference from infra-operator, thanks for explaining. With that the updated approach is:
Please let me know if it now makes sense. |
|
Note: The openstack-k8s-operators/openstack-operator#1781 was reworked, so the rpevious approach is no longer applicable. The PR now only guards |
|
We could have this updated approach after #1781 lands - There are two paths where an old credential can be revoked while EDPM nodes still use it:
A finalizer on the AC CR would only guard path 1. It does not guard path 2, because rotation cleanup operates on the AC secret - the CR stays alive, keystone-operator just revokes the old secret (immediately previous secret is still guarded too) underneath it once consumer finalizers are gone. Proposed approach:
Specifically in openstack-operator:
@SeanMooney Could you please review this updated proposed approach whether it aligns with the intended architecture/design? |
yes that makes sense and is what i expected intially
so this should be blocked by the keystone operator because the finaliser exists
so this shoudl not happen unless there is a bug in the finaler removal logic in the openstack operator as it shoudl only remove it once the deployment has succeeded.
the finalise shoudl guard both because rothation shoudl be doen by creating a new CR not by modifying the content of the secret
if you do rotation via changing the CR that is reference we do not to mutate the secret content or have additional secret hashes. we can hash the secret conte to know when we need to restart pod and triger the rolout but it would not be requried to know if the secret is used but it could be used for that as well.
i think this is better but i still think we shoudl be passign the CRs not the secrets to the service operators and the finealers should be placed on the crs with rotaion implemted by the openstack operator not the keystoen operator. the desgin you are propsoing is more optimal then the current one but still less correct then if we pass CRs names instead of secrete names to the service operators. the same way we pass transport URL or Database accoutn CRs not the secrets. |
Jira: OSPRH-29269
Application Credential dev-doc: https://github.com/openstack-k8s-operators/dev-docs/blob/main/application_credentials.md
Status.ApplicationCredentialSecretopenstack.org/nova-ac-consumerfinalizer to the AC secret after service config is renderedThis ensures that the keystone-operator cannot revoke a rotated AC secret while Nova is still consuming it.
Depends-On: openstack-k8s-operators/keystone-operator#685
Assisted-by: Claude Opus 4.6 noreply@anthropic.com