Skip to content
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

Add --no-cross-namespace-refs to tf-controller #677

Merged
merged 1 commit into from
Jun 21, 2023

Conversation

squaremo
Copy link
Contributor

The Flux convention is to use the flag --no-cross-reference-refs (as encoded in github.com/fluxcd/pkg/acl) to deny cross-namespace references, thereby closing a potential security hole.

This commit adds support for the flag to the controller, and a test that it does indeed ban cross-namespace refs.

controllers/tc000015_source_cross_ns_denied_test.go Outdated Show resolved Hide resolved
controllers/tc000015_source_cross_ns_denied_test.go Outdated Show resolved Hide resolved
controllers/tc000015_source_cross_ns_denied_test.go Outdated Show resolved Hide resolved
controllers/tc000015_source_cross_ns_denied_test.go Outdated Show resolved Hide resolved
controllers/tc000015_source_cross_ns_denied_test.go Outdated Show resolved Hide resolved
controllers/tc000015_source_cross_ns_denied_test.go Outdated Show resolved Hide resolved
@squaremo squaremo force-pushed the no-cross-ns-controller branch 3 times, most recently from 89050a7 to 20ecd27 Compare June 20, 2023 21:59
@squaremo squaremo requested a review from bigkevmcd June 20, 2023 22:00
bigkevmcd
bigkevmcd previously approved these changes Jun 21, 2023
The Flux convention is to use the flag --no-cross-reference-refs (as
encoded in github.com/fluxcd/pkg/acl) to deny cross-namespace
references, thereby closing a potential security hole.

This commit adds support for the flag to the controller, and a test
that it does indeed ban cross-namespace refs.

Signed-off-by: Michael Bridgen <michael.bridgen@weave.works>
@squaremo squaremo merged commit d7b110c into main Jun 21, 2023
6 checks passed
@squaremo squaremo deleted the no-cross-ns-controller branch June 21, 2023 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants