Add OAuth2 authentication support#420
Open
dioubernardo wants to merge 10 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds OAuth2/SSO authentication support to the Helios voting system, building on the existing GitHub authentication implementation and tested with Keycloak. It also adds support for custom CA certificates in HTTP transport.
- Adds a new generic OAuth2 authentication system that can be configured for custom OAuth2/SSO providers
- Introduces CA_CERTS configuration for custom certificate authority support
- Updates login UI to display custom OAuth provider names
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| settings.py | Adds OAuth2 configuration variables (client ID, secret, URIs, etc.) and CA_CERTS setting; fixes trailing whitespace |
| helios_auth/views.py | Adds oauth_name context variable to login views for custom OAuth provider display; whitespace cleanup |
| helios_auth/templates/login_box.html | Updates login UI to conditionally display custom OAuth provider name instead of generic "oauth" label |
| helios_auth/media/login-icons/oauth.png | Adds OAuth login icon image |
| helios_auth/auth_systems/oauth.py | New OAuth2 authentication module implementing OAuth2 flow with CA cert support |
| helios_auth/auth_systems/init.py | Registers the new OAuth authentication system |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
This implementation builds upon the existing GitHub authentication code, using it as a base to support a custom OAuth2/SSO server, and has been tested with Keycloak. It also adds the ability to provide custom CA certificates (CA_CERTS) to the HTTP transport.