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

Simplify security.rs and authorization logic #674

Merged
merged 1 commit into from
Oct 20, 2022
Merged

Commits on Oct 20, 2022

  1. This refactors security.rs and our auth* related axum extractors.

    Some specifics
    * Many of our extractors had redundant information, or largely unused fields. This PR removes them
    * The `Permissions` struct has been simplified a bit, namely by moving things into an enum (as opposed to using the `type_` enum just as a tag.
    * Removed the axum extractor for `Permissions`. We often chain authorization logic on top of the `Permissions`. However, the axum extractor for `Permissions` only authenticates requests, it doesn't authorize them.
    * Fixes a discrepancy between `list_event_types` and `get_event_type`. `list_event_types` was not checking for Organization privileges like `get_event_types` was.
    * `AuthenticatedOrganization`, `AuthenticatedApp`, etc, were also simplified a bit, and moved into a separate `permissions.rs` module.
    svix-gabriel committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    cc01b84 View commit details
    Browse the repository at this point in the history