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

events: Check token and ACLs on request #19138

Merged
merged 3 commits into from
Feb 10, 2023
Merged

Commits on Feb 10, 2023

  1. events: Check token and ACLs on request

    This checks the request against the `read` permission for
    `sys/events/subscribe/{eventType}` on the initial subscribe.
    
    Future work includes moving this to its own verb (`subscribe`)
    and periodically rechecking the request.
    
    Tested locally by minting a token with the wrong permissions
    and verifying that they are rejected as expected, and that
    they work if the policy is adjusted to `sys/event/subscribe/*`
    (or the specific topic name) with `read` permissions.
    
    I had to change the `core.checkToken()` to be publicly accessible,
    as it seems like the easiest way to check the token on the
    `logical.Request` against all relevant policies, but without
    going into all of the complex logic further in `handleLogical()`.
    Christopher Swenson committed Feb 10, 2023
    Configuration menu
    Copy the full SHA
    d17b2e1 View commit details
    Browse the repository at this point in the history
  2. Update http/events.go

    Co-authored-by: Tom Proctor <tomhjp@users.noreply.github.com>
    Christopher Swenson and tomhjp authored Feb 10, 2023
    Configuration menu
    Copy the full SHA
    650ac7f View commit details
    Browse the repository at this point in the history
  3. Address review comments

    Christopher Swenson committed Feb 10, 2023
    Configuration menu
    Copy the full SHA
    a70e386 View commit details
    Browse the repository at this point in the history