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

api: apply new ACL check for wildcard namespace #13608

Merged
merged 2 commits into from
Jul 6, 2022

Conversation

lgfa29
Copy link
Contributor

@lgfa29 lgfa29 commented Jul 6, 2022

In #13606 the ACL check was refactored to better support the all
namespaces wildcard (*). This commit applies the changes to the jobs
and alloc list endpoints.

Comment on lines 1285 to +1289
Label: "all namespaces with insufficient token",
Namespace: "*",
Allocs: []*structs.Allocation{},
Token: ns1tokenInsufficient.SecretID,
Error: true,
Message: structs.ErrPermissionDenied.Error(),
Copy link
Contributor Author

@lgfa29 lgfa29 Jul 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the only test the failed after the refactoring, but I think returning a 403 is the correct result in this case since the test token doesn't have the read-job capability?

Looking through the documentation I couldn't find any expected output.

Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

lgfa29 added 2 commits July 6, 2022 15:25
In #13606 the ACL check was refactored to better support the all
namespaces wildcard (`*`). This commit applies the changes to the jobs
and alloc list endpoints.
@lgfa29 lgfa29 force-pushed the refactor-wildcard-ns-acl-check-job-alloc branch from 54f3d21 to 98d8fee Compare July 6, 2022 19:25
@lgfa29 lgfa29 merged commit f587868 into main Jul 6, 2022
@lgfa29 lgfa29 deleted the refactor-wildcard-ns-acl-check-job-alloc branch July 6, 2022 20:17
@lgfa29 lgfa29 added this to the 1.3.2 milestone Jul 6, 2022
@github-actions
Copy link

github-actions bot commented Nov 4, 2022

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/1.3.x backport to 1.3.x release line
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants