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

Store active role in cookie instead of token #891

Merged
merged 1 commit into from
Sep 13, 2023
Merged

Conversation

camargo
Copy link
Member

@camargo camargo commented Sep 13, 2023

When discussing the change role endpoint in the Gateway with @mattdailis, he pointed out we don't really need it and can just store the active role in a cookie like we do with the user. This greatly simplifies the Gateway API, and makes it easier to maintain. We still get security because Hasura automatically does the role check via the x-hasura-role header.

To test:

  • Make sure changing the active role still works

Gateway PR: NASA-AMMOS/aerie-gateway#44

@camargo camargo requested a review from a team as a code owner September 13, 2023 16:15
@camargo camargo temporarily deployed to test-workflow September 13, 2023 16:15 — with GitHub Actions Inactive
@camargo camargo requested a review from mattdailis September 13, 2023 16:15
@camargo camargo self-assigned this Sep 13, 2023
@camargo camargo added the refactor A code change that neither fixes a bug nor adds a feature label Sep 13, 2023
Copy link
Collaborator

@duranb duranb left a comment

Choose a reason for hiding this comment

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

lgtm!

@camargo camargo merged commit 90d4fe8 into develop Sep 13, 2023
4 checks passed
@camargo camargo deleted the refactor/active-role branch September 13, 2023 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor A code change that neither fixes a bug nor adds a feature
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants