Skip to content

➕(backend) add django-lasuite dependency #839

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

qbey
Copy link
Member

@qbey qbey commented Apr 3, 2025

Purpose

We work on a common library for our project (https://github.com/suitenumerique/django-lasuite), this is the first step on this.

Proposal

Use the OIDC backends from the new library.

  • Override the OIDCAuthenticationBackend
  • Update code and tests
  • Set the proper version of django-lasuite in the pyproject.toml file

@qbey qbey self-assigned this Apr 3, 2025
@qbey qbey mentioned this pull request Apr 3, 2025
3 tasks
@qbey qbey force-pushed the qbey/use-django-lasuite branch 7 times, most recently from 671336c to 9af8edd Compare April 10, 2025 08:02
@qbey qbey marked this pull request as ready for review April 10, 2025 08:02
@qbey qbey requested review from Copilot and lunika April 10, 2025 08:02
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

src/backend/core/tests/authentication/test_views.py:1

  • The removal of authentication view tests may lead to reduced test coverage for the logout and callback flows. Please double-check that the new OIDC functionality from django-lasuite is comprehensively tested elsewhere.
Removed entire file

@qbey qbey force-pushed the qbey/use-django-lasuite branch from 9af8edd to 067b41f Compare April 10, 2025 12:44
@qbey qbey force-pushed the qbey/use-django-lasuite branch from 067b41f to b724000 Compare April 11, 2025 13:30
Comment on lines -36 to +37
USER_OIDC_FIELD_TO_SHORTNAME: "given_name"
USER_OIDC_FIELDS_TO_FULLNAME: "given_name,usual_name"
OIDC_USERINFO_SHORTNAME_FIELD: "given_name"
OIDC_USERINFO_FULLNAME_FIELDS: "given_name,usual_name"
Copy link
Member

Choose a reason for hiding this comment

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

I don't know how to deal with it. Renaming it directly is a breaking change. Having both makes non sense has the new settings will overwrite the legacy one.

Use the OIDC backend from the new library and add settings to setup OIDC
token storage required for later calls to OIDC Resource Servers.
@qbey qbey force-pushed the qbey/use-django-lasuite branch from b724000 to 07911a8 Compare April 23, 2025 08:32
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.

2 participants