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

Feat/custom authentification #2976

Merged
merged 28 commits into from
Jul 17, 2024
Merged

Conversation

jacquesfize
Copy link
Contributor

@jacquesfize jacquesfize commented Mar 29, 2024

Link to issue : #3111

This PR propose to enable the customization of the authentification process in GeoNature. This PR is a work in progress !

TODOLIST :

  • Possibility to force the use of one provider
  • Refact the ExternalGeoNatureProvider according to last changes in the Authentication class
  • Deactivate the user edition in GeoNature if not logged with the localProvider
  • Change the MTD sync according to changes in the new configuration schema
  • clean branch history
  • Transform is_uh to is_external
  • Instead of declaring all module in PROVIDERS --> declare it in the identity provider configuration (imply to remove name attr of Authentication)
  • configuration_schema() method to be deleted --> if validation schema needed, insert it in the configure() method
  • insert_or_update_rrole -> update only attribute indicated in json
  • remove unused AuthGuard
  • Local provider in the config
  • add test for the : AuthManager, AuthenticationClass*
  • complete documentation with new functionalities
  • Ajouter dans changelog
  • pull dernier commit sur UH-AM

@TheoLechemia TheoLechemia force-pushed the feat/custom-authentification branch 2 times, most recently from d89a39e to f46318a Compare April 2, 2024 12:21
Copy link
Contributor

@bouttier bouttier left a comment

Choose a reason for hiding this comment

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

Premier retour, mais je ne suis pas sûr d’avoir tous les tenant et aboutissant, ça serait sans doute plus pratique d’en discuter de vive voix !
Globalement j’ai deux remarques :

  • config a laisser plutôt dans geonature.utils.config
  • je serai plutôt partisan que le (ou les) provider soient la ref de module (comme dans django), pour pouvoir facilement importer du code fourni par du code externe, typiquement l’auth INPN.

backend/geonature/app.py Outdated Show resolved Hide resolved
backend/geonature/core/gn_meta/routes.py Outdated Show resolved Hide resolved
backend/geonature/custom_ter.py Outdated Show resolved Hide resolved
backend/geonature/custom_ter.py Outdated Show resolved Hide resolved
backend/geonature/utils/config_schema.py Outdated Show resolved Hide resolved
config/custom.py Outdated Show resolved Hide resolved
frontend/src/assets/sht Outdated Show resolved Hide resolved
@TheoLechemia TheoLechemia force-pushed the feat/custom-authentification branch from b841cad to c6fa4e7 Compare April 29, 2024 09:43
@TheoLechemia TheoLechemia force-pushed the feat/custom-authentification branch from 8fbb015 to e09c80e Compare June 3, 2024 15:28
@jacquesfize jacquesfize force-pushed the feat/custom-authentification branch from 83d7592 to 8fe5093 Compare July 1, 2024 15:09
@jacquesfize jacquesfize force-pushed the feat/custom-authentification branch from bd40158 to 4f32e64 Compare July 2, 2024 08:51
@jacquesfize jacquesfize linked an issue Jul 3, 2024 that may be closed by this pull request
@jacquesfize jacquesfize force-pushed the feat/custom-authentification branch from 1fc5643 to 50d9da5 Compare July 5, 2024 10:05
@jacquesfize jacquesfize requested a review from bouttier July 5, 2024 10:08
Copy link

codecov bot commented Jul 5, 2024

Codecov Report

Attention: Patch coverage is 95.65217% with 1 line in your changes missing coverage. Please review.

Project coverage is 81.63%. Comparing base (911e000) to head (a2df826).
Report is 8 commits behind head on develop.

Files Patch % Lines
backend/geonature/core/gn_monitoring/routes.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2976      +/-   ##
===========================================
+ Coverage    78.13%   81.63%   +3.49%     
===========================================
  Files           90       85       -5     
  Lines         7346     6850     -496     
===========================================
- Hits          5740     5592     -148     
+ Misses        1606     1258     -348     
Flag Coverage Δ
pytest 81.63% <95.65%> (+3.49%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@jacquesfize jacquesfize force-pushed the feat/custom-authentification branch from 4a6e80a to a56dd23 Compare July 17, 2024 07:52
@jacquesfize jacquesfize merged commit 763d682 into develop Jul 17, 2024
7 checks passed
@jacquesfize jacquesfize deleted the feat/custom-authentification branch July 17, 2024 08:38
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.

Connexion à différents fournisseurs d'identités
3 participants