Skip to content

feat: API key authorization policy #765

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

Merged
merged 2 commits into from
Jul 21, 2025
Merged

feat: API key authorization policy #765

merged 2 commits into from
Jul 21, 2025

Conversation

hburn7
Copy link
Collaborator

@hburn7 hburn7 commented Jul 18, 2025

This feature adds a new authorization policy which checks against the X-Api-Key header. This header & auth policy replace all instances of [AllowAnonymous] (with the exception of login/logout). This adds a protective layer against anonymous scraping.

So long as the correct header and secret is supplied, the request will succeed. otr-web is supplied this secret, but random users will not have access to this. Now, "anonymous" resources are accessible through platforms which we give the access to, rather than being completely open to the entire internet.

@hburn7 hburn7 added type:feature config-change Indicates a configuration change is required and removed size/L labels Jul 18, 2025
@SourMongoose
Copy link

There seem to be a lot of line-length formatting changes - was anything changed in terms of expected code formatting?

@hburn7
Copy link
Collaborator Author

hburn7 commented Jul 18, 2025

Good eye - this would be my laptop rider settings getting in the way most likely.

@hburn7
Copy link
Collaborator Author

hburn7 commented Jul 20, 2025

CleanShot 2025-07-20 at 15 30 53@2x

Needed to disable this checkbox. Finally resolved.

@hburn7 hburn7 force-pushed the feature/x-api-key branch from d3b3d90 to 40ab673 Compare July 20, 2025 13:38
@hburn7 hburn7 merged commit fee67b3 into master Jul 21, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config-change Indicates a configuration change is required size/L type:feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants