Enable LDAP support on Gitea #139
Closed
opened 2020-02-20 16:02:52 +00:00 by greg
·
16 comments
No Branch/Tag Specified
Labels
Clear labels
monitoring
bug
design
dev environment
docs
duplicate
enhancement
feature
good first issue
idea
invalid
kredits-1
kredits-2
kredits-3
on hold
ops
question
security
ui/ux
wontfix
service
discourse
Kosmos Community Forums
Infrastructure metrics, alerts, notifications, etc.
service
accounts
Kosmos Accounts
service
drone-ci
Kosmos Drone CI
service
email
mail.kosmos.org
service
garage
S3-compatible object storage
service
gitea
Kosmos Gitea
service
ipfs
Kosmos IPFS
service
mastodon
kosmos.social
service
nostr
Relays, Blossom server, etc.
service
postgres
Database cluster
service
remotestorage
Portable data storage for the Web
service
wiki
Kosmos Wiki
service
xmpp
Kosmos Chat
Something is not working
Graphic/visual design
Config, builds, CI, deployment, etc.
Documentation
This issue or pull request already exists
Improving existing functionality
New functionality
Dive in, and start contributing
Something to consider
Not a bug
Small contribution
Medium contribution
Large contribution
Currently not actionable
Manual IT ops activities
Looking for an answer
release
major
release
minor
release
patch
All your base are belong to us
User interface, process design, etc.
This won't be fixed
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: kosmos/chef#139
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Update the GiteaThe setting to disable Gitea organization creation by default was already in our production configapp.inito disable Gitea organization creation by defaultNo need for a filtered role, all accounts should have access to Gitea.
Gitea authentication docs
I got LDAP authentication to add user accounts to a test Gitea setup (docker-compose).
I used the following settings:
Right now I cannot login through LDAP, I'm figuring out what is missing.Then I will add an attribute for Gitea admin users. By default the users created from LDAP can create Gitea organizations.I can now login in my test Gitea instance, the issue was missing ACIs on users that allow them to read and search their own attributes. The way Gitea has implemented LDAP support using BindDN requires it
Got admin users to work. Added
admin: trueto my user, created a user for Gitea and an admin roleRelevant ACIs for users to search and get their own attributes:
Relevant ACIs for the gitea user:
There is a cron job in Gitea to synchronize users from an external source such as Gitea. By default it runs every 24 hours, and does not run on startup. It only runs if the auth source has "User Synchronization" enabled on it: example config.
Alternatively, when a user successfully logs in for the first time from an LDAP account, the user is automatically created in the Gitea database if it did not exist already
I have renamed my own user (from the user settings page from gregkare to greg.
I have also performed a spring cleanup on the user accounts. Now we have 12 accounts in Gitea, all members of the Hackerhouse, Kosmos and/or Kredits organizations.
I have changed the email addresses for 3 users in Gitea, they had a different address than in LDAP
We need to turn that off, because we agreed that org creation requires a separate donation (or proof of Kosmos contributions).
BTW, I think the task list is out of date, from reading your comments from today...
I found the setting to disable organization creation by default (https://github.com/go-gitea/gitea/blob/8d2059a20184842d9a7a573d285956dd998d42c4/custom/conf/app.ini.sample#L548). It needs to be added to our
app.iniI have made a private list that sorts the users in three different categories:
I have updated the checklist. We have to write a different email for each category
We do not have to write an email for people who didn't have Gitea accounts yet. I think that email should be a single one to all users, when we have a page explaining their unified account and which services they have access to. (They should also know about the wiki for example.)
I created a pad for the emails: https://cryptpad.fr/code/#/2/code/edit/cLRIbvVL0lh7BWBG+Qxhpzsw/
Could I get some feedback or corrections?
I have edited the emails quite a bit. Looks good to me now.
Running in production, closing this one!
We ran into an issue and had to switch the existing user accounts to the LDAP auth source, with the "Authentication Sign-In Name" for each account being the username
Nice. Great work 👍
W00t w0000t!