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

Support getting all user-accessible spaces by permission #204475

Open
jeramysoucy opened this issue Dec 16, 2024 · 1 comment
Open

Support getting all user-accessible spaces by permission #204475

jeramysoucy opened this issue Dec 16, 2024 · 1 comment
Labels
Feature:Security/Authorization Platform Security - Authorization Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!

Comments

@jeramysoucy
Copy link
Contributor

Describe the feature: Currently there is no way to get the spaces which a user can access based on a specific capability. Contributors often want to get a list of spaces for which a user is authorized to perform some specific action, as opposed to a list of spaces that the user is authorized to see in any capacity. Solving for this means brining authorization into core, which is currently blocked on Platform Security’s re-imagining of our authorization services. The APIs we currently expose are not ideal to work with, and we don’t want to simply copy them into core as-is.

Describe a specific use case for the feature:

Example: an o11y feature that wants to enumerate the available spaces. This feature will not care, for example, about spaces where the user is only authorized for security solution.

Mock usage:

const authorizedSpaces = await spacesStart.spacesService.getAll("some capability")
for (space of authorizedSpaces) {
   const client = core.savedObjects.asScoped(request, space)
   await client.doSomething()
}

Related to #203042, where the original implementation introduced a public getSearchableSpaces function that was later abandoned because the relevant feature was only available to admins, and could rely on the global spaces list.

@jeramysoucy jeramysoucy added Feature:Security/Authorization Platform Security - Authorization Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! labels Dec 16, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Security/Authorization Platform Security - Authorization Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!
Projects
None yet
Development

No branches or pull requests

2 participants