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

[DOP-21268] - integration with SSO (Keycloak) #123

Merged
merged 10 commits into from
Nov 14, 2024
Merged

Conversation

maxim-lixakov
Copy link
Contributor

@maxim-lixakov maxim-lixakov commented Nov 11, 2024

Change Summary

  • Implemented KeycloakAuthProvider for Single Sign-On (SSO) authentication.
  • Implemented DummyAuthProvider for development and testing environments.
  • Enabled dynamic selection of authentication provider via environment variable SYNCMASTER__AUTH__PROVIDER:
 # syncmaster.backend.providers.auth.keycloak_provider.KeycloakAuthProvider for Keycloak.
 SYNCMASTER__AUTH__PROVIDER=syncmaster.backend.providers.auth.keycloak_provider.KeycloakAuthProvider
  # syncmaster.backend.providers.auth.dummy_provider.DummyAuthProvider for Dummy authentication.
  SYNCMASTER__AUTH__PROVIDER=syncmaster.backend.providers.auth.dummy_provider.DummyAuthProvider
  • Updated User model to include email, first_name, middle_name, and last_name fields.
  • split Settings into SyncmasterSettings, WorkerSettings(SyncmasterSettings), BackendSettings(SyncmasterSettings)
  • add KeycloakAuthProvider and DummyAuthProvider docs

Related issue number

Checklist

  • Commit message and PR title is comprehensive
  • Keep the change as small as possible
  • Unit and integration tests for the changes exist
  • Tests pass on CI and coverage does not decrease
  • Documentation reflects the changes where applicable
  • docs/changelog/next_release/<pull request or issue id>.<change type>.rst file added describing change
    (see CONTRIBUTING.rst for details.)
  • My PR is ready to review.

@maxim-lixakov maxim-lixakov self-assigned this Nov 11, 2024
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

Attention: Patch coverage is 67.44868% with 111 lines in your changes missing coverage. Please review.

Project coverage is 85.73%. Comparing base (af13e94) to head (4748ad7).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...master/backend/providers/auth/keycloak_provider.py 28.20% 56 Missing ⚠️
...yncmaster/backend/providers/auth/dummy_provider.py 62.06% 22 Missing ⚠️
syncmaster/backend/api/v1/auth.py 64.00% 9 Missing ⚠️
...yncmaster/backend/dependencies/get_access_token.py 37.50% 5 Missing ⚠️
syncmaster/backend/utils/jwt.py 66.66% 3 Missing and 1 partial ⚠️
syncmaster/backend/utils/state.py 50.00% 4 Missing ⚠️
syncmaster/worker/transfer.py 0.00% 4 Missing ⚠️
syncmaster/backend/handler.py 77.77% 1 Missing and 1 partial ⚠️
syncmaster/backend/services/get_user.py 90.47% 1 Missing and 1 partial ⚠️
syncmaster/backend/middlewares/__init__.py 80.00% 0 Missing and 1 partial ⚠️
... and 2 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #123      +/-   ##
===========================================
- Coverage    87.52%   85.73%   -1.80%     
===========================================
  Files          143      157      +14     
  Lines         3342     3560     +218     
  Branches       251      261      +10     
===========================================
+ Hits          2925     3052     +127     
- Misses         355      444      +89     
- Partials        62       64       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

.env.docker Outdated Show resolved Hide resolved
.env.docker Outdated Show resolved Hide resolved
.env.docker Outdated Show resolved Hide resolved
.env.docker Outdated Show resolved Hide resolved
.env.docker Outdated Show resolved Hide resolved
.env.docker Show resolved Hide resolved
.env.docker Outdated Show resolved Hide resolved
@maxim-lixakov maxim-lixakov merged commit 6f9d6b0 into develop Nov 14, 2024
16 of 18 checks passed
@maxim-lixakov maxim-lixakov deleted the feature/DOP-21268 branch November 14, 2024 12:11
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.

3 participants