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

WIP: Add rudimentary LDAP group support #7349

Closed
wants to merge 0 commits into from

Conversation

stertingen
Copy link

@stertingen stertingen commented Jul 3, 2019

Targeting #2212.

Features:

  • Restrict automatic registration with a group filter
  • Allow admin access based on a group filter
  • Arbitrary kinds of LDAP groups are supported (custom filter with custom user attribute)

Sub-tasks

  • Add configuration options for the admin backend
  • Extend login code with new group options
  • Tests for new options suitable for the test OpenLDAP server
  • Test with another LDAP setup (not using dn as user attribute in group)
  • Refactor LDAP code to remove duplication (esp. SearchEntry and SearchEntries)
  • Add CLI options (see Add CLI commands to manage LDAP authentication source #6681)
  • Test CLI options

@stertingen stertingen changed the title Added rudimentary LDAP group support WIP: Added rudimentary LDAP group support Jul 3, 2019
@stertingen
Copy link
Author

Well, I forgot to apply the changes to SearchEntries().

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 3, 2019
@codecov-io
Copy link

codecov-io commented Jul 6, 2019

Codecov Report

Merging #7349 into master will increase coverage by 0.16%.
The diff coverage is 56.38%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7349      +/-   ##
==========================================
+ Coverage    41.4%   41.56%   +0.16%     
==========================================
  Files         478      478              
  Lines       63944    64028      +84     
==========================================
+ Hits        26473    26616     +143     
+ Misses      34021    33954      -67     
- Partials     3450     3458       +8
Impacted Files Coverage Δ
modules/auth/auth_form.go 100% <ø> (ø) ⬆️
routers/admin/auths.go 33.6% <100%> (+1.37%) ⬆️
modules/auth/ldap/ldap.go 55% <53.93%> (+0.59%) ⬆️
models/repo.go 49.02% <0%> (+0.38%) ⬆️
models/login_source.go 27.08% <0%> (+0.78%) ⬆️
routers/repo/view.go 43.54% <0%> (+1.01%) ⬆️
models/repo_list.go 73.09% <0%> (+1.01%) ⬆️
modules/context/auth.go 24.71% <0%> (+4.49%) ⬆️
models/unit.go 67.56% <0%> (+5.4%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a678ea4...a9b63ea. Read the comment docs.

@lunny lunny added the type/enhancement An improvement of existing functionality label Jul 6, 2019
@stertingen stertingen changed the title WIP: Added rudimentary LDAP group support Add rudimentary LDAP group support Jul 15, 2019
@stale
Copy link

stale bot commented Oct 16, 2019

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions.

@stale stale bot added the issue/stale label Oct 16, 2019
@stale stale bot removed the issue/stale label Oct 30, 2019
@lunny
Copy link
Member

lunny commented Nov 2, 2019

CI is still failed and will you finish the left sub tasks on the comment?

@stertingen stertingen changed the title Add rudimentary LDAP group support WIP: Add rudimentary LDAP group support Nov 2, 2019
@stertingen stertingen closed this Nov 3, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants