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

Refactor authentication #340

Merged
merged 10 commits into from
Apr 27, 2023
Merged

Refactor authentication #340

merged 10 commits into from
Apr 27, 2023

Conversation

SamuelWei
Copy link
Collaborator

@SamuelWei SamuelWei commented Apr 20, 2023

Type (Highlight the corresponding type)

  • Bugfix
  • Feature
  • Documentation
  • Refactoring (e.g. Style updates, Test implementation, etc.)
  • Other (please describe):

Checklist

  • Code updated to current masters head
  • Passes CI checks
  • Is a part of an issue
  • Tests added for the bugfix or newly implemented feature, describe below why if not
  • Changelog is updated
  • Documentation of code and features exists

Changes

  • Refactor external login via LDAP
  • Refactor and improve attribute and role mapping
  • Restructure docs

Other information

Checky-Picking from #336 to sperate PRs and make them easier to review

Authentication with LDAP has been fundamentally refactored.
In the process, some .env variables were changed, added or removed. The following table provides an overview of the changes.

Old .env Attribute New .env Attribute Description
LDAP_ROLE_ATTRIBUTE Removed Attribute with the users role, can be a multi value attribute, replaced with new mapping json file
LDAP_ROLE_MAP Removed Map the attribute to the name of a local role, replaced with new mapping json file
AUTH_LOG_LDAP_ROLES AUTH_LOG_ROLES Show found roles during mapping
- LDAP_GUID_KEY Attribute with GUID; OpenLDAP (default): 'entryuuid', AD: 'objectGUID'
- LDAP_OBJECT_CLASSES Comma seperated list of the object class (default: top,person,organizationalperson,inetorgperson)
- LDAP_LOGIN_ATTRIBUTE Attribute by which the user should be found in the LDAP (default: uid)

Please have a look at the external authentication documentation

@codecov
Copy link

codecov bot commented Apr 26, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.18 🎉

Comparison is base (4de18c0) 94.96% compared to head (d1330a0) 95.14%.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #340      +/-   ##
============================================
+ Coverage     94.96%   95.14%   +0.18%     
- Complexity      828      858      +30     
============================================
  Files           226      234       +8     
  Lines          5523     5625     +102     
  Branches        500      498       -2     
============================================
+ Hits           5245     5352     +107     
+ Misses          263      259       -4     
+ Partials         15       14       -1     
Impacted Files Coverage Δ
app/Console/Kernel.php 30.00% <ø> (ø)
app/Models/User.php 97.22% <ø> (ø)
app/Providers/AuthServiceProvider.php 100.00% <ø> (ø)
app/Providers/EventServiceProvider.php 100.00% <ø> (ø)
...ources/js/components/Login/LocalLoginComponent.vue 100.00% <ø> (ø)
...omponents/User/AuthenticationSettingsComponent.vue 100.00% <ø> (ø)
resources/js/components/User/ProfileComponent.vue 98.79% <ø> (ø)
resources/js/router.js 75.18% <ø> (ø)
resources/js/views/Login.vue 100.00% <ø> (ø)
app/Auth/ExternalUser.php 100.00% <100.00%> (ø)
... and 27 more

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@SamuelWei SamuelWei merged commit 2535a0c into master Apr 27, 2023
@SamuelWei SamuelWei deleted the refactor-auth branch April 27, 2023 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant