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

Make security pluggable by authentication type #1526

Closed
RobbeSneyders opened this issue May 6, 2022 · 3 comments
Closed

Make security pluggable by authentication type #1526

RobbeSneyders opened this issue May 6, 2022 · 3 comments
Assignees
Milestone

Comments

@RobbeSneyders
Copy link
Member

It would be great to refactor the security middleware to be pluggable by authentication type. The goal would be to be able to register a handler, a class or function with an interface we define, to check certain security schemes.

This way people can still use unsuported authentication types (eg. #694), and possibly contribute it back to connexion.

@RobbeSneyders RobbeSneyders added this to the Connexion 3.0 milestone May 6, 2022
@Ruwann
Copy link
Member

Ruwann commented May 6, 2022

I like the way Starlette handles this in their AuthentictionMiddleware:
https://github.com/encode/starlette/blob/master/starlette/middleware/authentication.py
https://github.com/encode/starlette/blob/master/starlette/authentication.py
https://www.starlette.io/authentication/

I think it's worth investigating whether we can base the connexion security middleware on this.

@MiltiadisKoutsokeras
Copy link

This would be very helpful, plus 1 from me also. There is also another scenario we would like to have: be able to add on the same application 2 different API Specs with completely different security schemes defined in the spec. For example we could have an end-user API and an administration API which should be able to use completely different authentication logic.

@RobbeSneyders
Copy link
Member Author

Fixed by #1671

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

No branches or pull requests

3 participants