[SQL-283] Authentication for CSV export#467
Merged
kelvinqian00 merged 14 commits intocsv-exportfrom Mar 10, 2025
Merged
Conversation
cliffcaseyyet
approved these changes
Mar 7, 2025
Member
cliffcaseyyet
left a comment
There was a problem hiding this comment.
This seems like it should work well. I was questioning the table reuse/repurpose but i think its been pretty well handled.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement authentication for the
GET /admin/csvendpoint, as HTMLdownloadattributes cannot have headers, thus making the usual JWT authentication impossible.We introduce the concept of "one-time JWTs" that have "one-time IDs." These one-time JWTs are stored in the
jwt_blocklistSQL table (added in v0.8.0), where if theone_time_idcolumn is not null then they are ignored during the query for blocked JWTs. Thus, these JWTs can easily be blocked/revoked by updatingone_time_idto be null, which happens once they are validated. These one-time JWTs can be added as atokenparameter for any GET endpoint, this case the CSV download endpoint.