-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Skip Resolving Secrets From Restricted Namespace #4645
fix: Skip Resolving Secrets From Restricted Namespace #4645
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Can you please update the release notes and add some tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we check also the current namespace? I mean, if the ScaledObject/ScaledJob is in the allowed namespace, we should read the secret
Well probably not "current" but the one that is restricted. |
/run-e2e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Indresh2410 for this PR. Just a few comments.
Sorry for delay in addressing review comments. Will address it soon @tobotg / @JorTurFer based on this issue If KEDA_RESTRICT_SECRET_ACCESS is enabled, we can remove secrets from clusterrole But we would still require list/watch access to secrets right? which won't be available for secrets once ENV variable is set Apologies if something doesn't make sense here |
yeah, this is because as default, KEDA can read secrets from all the cluster, restricting the secret access we don't block the access to the secrets, we just limit it to keda's namespace. In fact, list/watch isn't enough because the certificate management requires more verbs, but that's deployed in other role/rolebinding: https://github.com/kedacore/keda/blob/main/config/rbac/role.yaml#L122-L139 KEDA will always have access to the secrets inside its own namespace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Indresh2410 any update on this? we are about to release a new version.
Hi. Sorry for delay. Will push changes by EOD
…On Wed, Jun 21, 2023, 12:54 PM Zbynek Roubalik ***@***.***> wrote:
***@***.**** commented on this pull request.
@Indresh2410 <https://github.com/Indresh2410> any update on this? we are
about to release a new version.
—
Reply to this email directly, view it on GitHub
<#4645 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A7A3MRZWCHK4MAPWWEDK6ZLXMKORPANCNFSM6AAAAAAY2NKJCA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thanks! |
Thanks @JorTurFer .This helps 😄 |
@Indresh2410 could you please rebase this PR and fix the conflict in Changelog? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Indresh2410 could you please fix the path here? pkg/mock/mock_secretLister/mock_interfaces.go
make it lowercase only: pkg/mock/mock_secretlister/mock_interfaces.go
@Indresh2410 do you think you'll be able to tackle the rest of the problems today? We plan to release a new version in a few hours. |
Yes. Will address changes in next 1 hour. Hope it's fine for you
…On Thu, Jun 22, 2023, 7:06 PM Zbynek Roubalik ***@***.***> wrote:
@Indresh2410 <https://github.com/Indresh2410> do you think you'll be able
to tackle the rest of the problems today? We plan to release a new version
in a few hours.
—
Reply to this email directly, view it on GitHub
<#4645 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/A7A3MR7XJAKUA7PDIP6KRR3XMRC6FANCNFSM6AAAAAAY2NKJCA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thanks! |
Signed-off-by: Indresh-Prakash <indreshprakash24@gmail.com>
b1d2eec
to
02f810a
Compare
Signed-off-by: Indresh-Prakash <indreshprakash24@gmail.com>
HI @zroubalik . I've addressed all review comments. Please let me know if any other change is required |
Signed-off-by: Indresh-Prakash <indreshprakash24@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Indresh2410 now there are both pkg/mock/mock_secretLister/mock_interfaces.go
and pkg/mock/mock_secretlister/mock_interfaces.go
.
Could you please fix that?
Signed-off-by: Indresh2410 <130135623+Indresh2410@users.noreply.github.com>
Signed-off-by: Indresh2410 <130135623+Indresh2410@users.noreply.github.com> Signed-off-by: Indresh-Prakash <indreshprakash24@gmail.com>
…2410/keda into fix-restricted-namespace-secrets Signed-off-by: Indresh-Prakash <indreshprakash24@gmail.com>
Have fixed it @zroubalik . Thanks |
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Indresh2410 unfortunately there are some static errors and also errors in the unit test. Could you please check?
Signed-off-by: Benjamin Herbert <benjamin@herbert.cc>
Signed-off-by: Indresh-Prakash <indreshprakash24@gmail.com>
Signed-off-by: Indresh-Prakash <indreshprakash24@gmail.com>
…2410/keda into fix-restricted-namespace-secrets
Signed-off-by: Indresh-Prakash <indreshprakash24@gmail.com>
Hi @zroubalik . Looks like static check is still failing and I would like to take some time to fix the issues. Hope we can merge it to next release ? Sorry for inconvenience caused |
@Indresh2410 are you able to run the test locally?
|
Exporting variables and running tests worked fine for me @zroubalik |
@Indresh2410 your branch is faling (the test) for me locally as well. It is fine if you don't have a time to fix it now, we can postpone it to the next release. Just let me know. |
Yes @zroubalik . We'll push it as part of next release. Will sort out issues sometime in next few days. Thanks for quick reviews 😃 |
kedacore#4558) --- Accreditation --- Original PR: kedacore#3828 Borrows from the work originally implemented by: https://github.com/keegancwinchester Note: I would have loved to have pulled the commit from the original branch, but I could not be able to. Documentation MR by original implementor: kedacore/keda-docs#932 --- Fixes --- Fixes # kedacore#3656 --- PR Notes --- Introduce annotation to pause ScaledJobs. Signed-off-by: BenJ <benjamin.jessop@fluxfederation.com> Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com> Co-authored-by: Zbynek Roubalik <zroubalik@gmail.com>
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
Signed-off-by: Indresh-Prakash <indreshprakash24@gmail.com>
…2410/keda into fix-restricted-namespace-secrets
Hi @zroubalik . Sry for inconvenience caused. Have raised another PR with same changes Closing this in favour of the above |
Fixes #4519