-
Notifications
You must be signed in to change notification settings - Fork 524
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
authorization: introduce anonymous + agent/service-specific auth #5422
Conversation
Introduce a Resource type, which describes a specific resource for which authorization is being queried. This can later be used to restrict access to specific agents and services. If the supplied resource is the zero value, then the query is interpreted as checking if the requester has any access at all. If the resource is non-zero, then the query is interpreted as checking if the requester has access to that specific resource (agent/service).
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall changes look good. Left two comments that are no blockers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good.
* beater/authorization: introduce Resource type Introduce a Resource type, which describes a specific resource for which authorization is being queried. This can later be used to restrict access to specific agents and services. If the supplied resource is the zero value, then the query is interpreted as checking if the requester has any access at all. If the resource is non-zero, then the query is interpreted as checking if the requester has access to that specific resource (agent/service). * beater/authorization: add context functions * beater/authorization: introduce AnonymousAuth * beater: check authorization for agent+service (cherry picked from commit 05cde22)
…) (#5434) * beater/authorization: introduce Resource type Introduce a Resource type, which describes a specific resource for which authorization is being queried. This can later be used to restrict access to specific agents and services. If the supplied resource is the zero value, then the query is interpreted as checking if the requester has any access at all. If the resource is non-zero, then the query is interpreted as checking if the requester has access to that specific resource (agent/service). * beater/authorization: add context functions * beater/authorization: introduce AnonymousAuth * beater: check authorization for agent+service (cherry picked from commit 05cde22) Co-authored-by: Andrew Wilkins <[email protected]>
Motivation/summary
Introduce the concept of "anonymous access", i.e. what we do for RUM today. Currently anonymous access is restricted to RUM, but we would like to extend this to the iOS agent.
In addition, we would like to be be able to restrict anonymous access to sending data for a fixed set of service names, to ensure they cannot create arbitrary data streams. To achieve this we change the
authorization.Authorization
interface'sAuthorizedFor
method to accept a newauthorization.Resource
type (replacing the oldelasticsearch.Resource
param) which may contain an agent and/or service name. The authorization implementation can use these to restrict access, either through config or later for API Keys through additional_has_privilege
queries.Checklist
- [ ] Update CHANGELOG.asciidoc- [ ] Documentation has been updatedHow to test these changes
Non-functional change.
Related issues
#5347