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

Add Authenticator for when serving OIDC as a proxy #877

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

DiamondJoseph
Copy link
Contributor

@DiamondJoseph DiamondJoseph commented Feb 3, 2025

WIP: adds an Authenticator implementation for use when serving Tiled behind a proxy.
This is intended be used to define an alternative decode_access_token
In order to inject the desired behaviour for decode_access_token has required a fairly weighty refactor, inverting the creation order of a lot of router objects.

  • Removes injection of password into security obj
  • Removes use of dependency_override which is intended for use in tests

Checklist

  • Add a Changelog entry
  • Add the ticket number which this PR closes to the comment section

- Prevents having to inject the password late into the oauth2_schema, and allows supporting Proxied credentials
- Such that decode_access_token can be overriden
  when serving behind proxied OIDC
- Removes injection of password into security obj
- Removes use of dependency_override which is
  intended for use in tests
description: Optional[str] = None,
):
self.model: APIKey = APIKey(
**{"in": APIKeyIn.header}, name=name, description=description
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I hate this but I see why it is required (in is a reserved keyword but APIKey uses it as an init arg... using _in does not work, as it is a serialisation alias only).

@DiamondJoseph
Copy link
Contributor Author

why setattr
do not call public keys with every request- find reasonable TTL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant