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

Remove "namespace" parameters from various helpers #49515

Merged
merged 6 commits into from
Dec 2, 2024

Conversation

codingllama
Copy link
Contributor

@codingllama codingllama commented Nov 27, 2024

Remove the namespace parameters from various helpers that flow into authz checks.

This serves a dual purpose:

  1. Simplify existing code
  2. Make it clearer when only apidefaults.Namespace is used

I've painstakingly followed the changed calls to make sure they always passed apidefaults.Namespace as the parameter, so assuming I didn't miss anything this PR is largely a noop.

Exceptions to the above are on commit 86943f6 - Nodes/Servers already don't accept non-"default" namespaces (see ae99259) and "saml_idp_service_provider" seems to be only following the surrounding code (as in it doesn't really work for non-default namespaces).

After the changes it's clear that only 14-ish calls to ServerWithRoles.actionNamespace remain. These are largely contained to Nodes/Servers, Apps and Databases, the older Teleport resources that use namespaced storage keys.

#49509

@codingllama codingllama added the no-changelog Indicates that a PR does not require a changelog entry label Nov 27, 2024
@codingllama
Copy link
Contributor Author

I suggest reviewing commit-by-commit, as it should make the changes more obvious.

@codingllama codingllama force-pushed the codingllama/namespace-cleanup branch from 86943f6 to 66f89cb Compare November 27, 2024 20:04
@codingllama
Copy link
Contributor Author

Rebased onto fresh master to fix a few newly-added tests.

@codingllama
Copy link
Contributor Author

Friendly ping @Joerger @rosstimothy @fspmarshall ?

@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from rosstimothy December 2, 2024 18:53
@codingllama
Copy link
Contributor Author

Thanks!

@codingllama codingllama added this pull request to the merge queue Dec 2, 2024
Merged via the queue into master with commit c946cb1 Dec 2, 2024
40 checks passed
@codingllama codingllama deleted the codingllama/namespace-cleanup branch December 2, 2024 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Indicates that a PR does not require a changelog entry size/sm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants