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

Bug: fix groups in children scopes being filtered out by grants #5418

Merged

Conversation

bosorawis
Copy link
Collaborator

@bosorawis bosorawis commented Jan 8, 2025

Resources are being filtered out due to missing ParentScopeId when constructing Resource to pass into authResults.FetchActionSetForId. This PR includes adding utility functions to help with setting up proper authorization

johanbrandhorst
johanbrandhorst previously approved these changes Jan 9, 2025
Copy link
Member

@elimt elimt left a comment

Choose a reason for hiding this comment

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

Do we need

elimt
elimt previously approved these changes Jan 9, 2025
internal/daemon/controller/handlers/groups/grants_test.go Outdated Show resolved Hide resolved
@bosorawis bosorawis added this to the 0.19.x milestone Jan 10, 2025
@bosorawis bosorawis force-pushed the bosorawis-bug-fix-list-resource-filtering-out-children-scope branch from f3ade6c to d195247 Compare January 10, 2025 18:18
ddebko
ddebko previously approved these changes Jan 22, 2025
bosorawis and others added 19 commits January 23, 2025 14:36
set the `ParentScopeId` before fetching authorized actions for alias
set the `ParentScopeId` before fetching authorized actions for worker
* fix(user): children scopes being filtered out by grants for user

Resources are being filtered out due to missing ParentScopeId when constructing Resource to pass into authResults.FetchActionSetForId.
set the `ParentScopeId` before fetching authorized actions for worker
set the `ParentScopeId` before fetching authorized actions for target
* fix(roles): set parent scope id for roles resource

set the `ParentScopeId` before fetching authorized actions for role resource
* fix(managed-group): set parent scope id for managed-group resource

set the ParentScopeId before fetching authorized actions for managed resource
set the `ParentScopeId` before fetching authorized actions for host resource
set the ParentScopeId before fetching authorized actions for host-set resource
set the ParentScopeId before fetching authorized actions for host-catalog resource
…rce (#5458)

set the ParentScopeId before fetching authorized actions for credential-store resource
* handlers/authmethods: fix children permission

* documentation

* formatting
set the `ParentScopeId` before fetching authorized actions for credential resource
* handlers/accounts: fix children grants filtering out results unexpectedly

* make gen
* fix authtokens not passing children scope ID

* make gen
… fetching action sets (#5467)

* fix(common) set parent ID before fetching action sets

* make gen

* additional test

* rename test

* more tests

* remove duplicate test

* make gen
@bosorawis bosorawis force-pushed the bosorawis-bug-fix-list-resource-filtering-out-children-scope branch from bf4a4c3 to 72892f2 Compare January 23, 2025 22:39
tmessi
tmessi previously approved these changes Jan 24, 2025
CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Johan Brandhorst-Satzkorn <[email protected]>
@bosorawis bosorawis merged commit 7c4451d into main Jan 24, 2025
61 of 63 checks passed
@bosorawis bosorawis deleted the bosorawis-bug-fix-list-resource-filtering-out-children-scope branch January 24, 2025 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants