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

[FIX] Ensure token forwarded to n-APIs does not include an extra scheme string #134

Merged
merged 6 commits into from
Nov 1, 2024

Conversation

alyssadai
Copy link
Contributor

@alyssadai alyssadai commented Nov 1, 2024

Changes proposed in this pull request:

  • Bearer auth scheme is now stripped from incoming tokens (in f-API) before the request authorization header to n-APIs is constructed, to avoid scheme duplication which can cause issues with token parsing

Checklist

This section is for the PR reviewer

  • PR has an interpretable title with a prefix ([ENH], [FIX], [REF], [TST], [CI], [MNT], [INF], [MODEL], [DOC]) (see our Contributing Guidelines for more info)
  • PR has a label for the release changelog or skip-release (to be applied by maintainers only)
  • PR links to GitHub issue with mention Closes #XXXX
  • Tests pass
  • Checks pass

For new features:

  • Tests have been added

For bug fixes:

  • There is at least one test that would fail under the original bug conditions.

@alyssadai alyssadai added release Create a release when this PR is merged pr-patch Incremental feature improvement, will increment patch version when merged (0.0.+1) labels Nov 1, 2024
@alyssadai alyssadai requested a review from surchs November 1, 2024 18:29
Copy link
Contributor

@surchs surchs left a comment

Choose a reason for hiding this comment

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

neat, thanks @alyssadai

verified locally that this works. One clarification comment, then

🧑‍🍳

app/api/security.py Outdated Show resolved Hide resolved
app/api/security.py Outdated Show resolved Hide resolved
@alyssadai alyssadai merged commit f191115 into main Nov 1, 2024
5 checks passed
@alyssadai alyssadai deleted the fix-token-forwarding branch November 1, 2024 19:47
Copy link
Contributor

neurobagel-bot bot commented Nov 1, 2024

🚀 PR was released in v0.4.2 🚀

@neurobagel-bot neurobagel-bot bot added the released This issue/pull request has been released. label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-patch Incremental feature improvement, will increment patch version when merged (0.0.+1) release Create a release when this PR is merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

f-API forwards malformed token to n-APIs
2 participants