Validate PasswordSecret namespace matches OpenStackBaremetalSet namespace - #422
Conversation
…pace The PasswordSecret field (corev1.SecretReference) was not validated to restrict its namespace. This could allow a user to reference a secret in an arbitrary namespace and have the operator read it on their behalf. Add validation that PasswordSecret must be in the OpenStackBaremetalSet's own namespace (where the user already has RBAC access), since this secret is only consumed by this operator and not passed to Metal3 directly. Also enforce secret namespace validation on update (previously only on create). Signed-off-by: rabi <ramishra@redhat.com>
|
Build failed (check pipeline). Post ❌ openstack-baremetal-operator-content-provider FAILURE in 14m 14s |
|
recheck |
|
Build failed (check pipeline). Post ✔️ openstack-baremetal-operator-content-provider SUCCESS in 2h 08m 15s |
|
recheck |
|
Build failed (check pipeline). Post ❌ openstack-baremetal-operator-content-provider FAILURE in 13m 57s |
|
recheck |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rabi, steveb The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
5b306b0
into
openstack-k8s-operators:main
|
/cherry-pick 18-stable |
|
@rabi: new pull request created: #433 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Add validation that PasswordSecret must be in the OpenStackBaremetalSet's own namespace (where the user already has RBAC access).
Extend the existing secret namespace validation to cover PasswordSecret and also enforce it on update (previously only on create).
jira: OSPRH-33377