LDAP authentication - Dynamic authorization for different groups
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 47.8k
- Forks
- 5.1k
- Avg merge
- 7h 23m
- Merged PRs (30d)
- 5
Description
Never wanted to say it's an issue, but perhaps LDAP auth can be improved for Gogs.
I have also Dokuwiki setup for same LDAP, for different users, different groups, where users have different permissions according to the groups they belong.
I guess dokuwiki logic for LDAP work as following (https://www.dokuwiki.org/plugin:authldap:openldap#with_anonymous_bind_and_filters):
- Get list of groups from LDAP
- Admin belongs in group WikiAdmins
- On user login, following filter is checked with search base "dc=domain,dc=com":
(&(objectClass=posixGroup)(|(memberUid=[ADMIN_USER_UID])(gidNumber=[ADMIN_GROUP_GID])))
Reponse to this filter is for example as following:
cn=WikiAdmins
dn cn=WikiAdmins,ou=Groups,dc=domain,dc=com
cn WikiAdmins
Sample LDAP structure:
domain.com
Service Accounts (Application Bind Users)
AppUser
Admins (Admin accounts)
AdminUser
Persons (regular accounts)
Ted
Kelly
Ned
Groups (Groups to define access level to applications)
GogsAdmins
AdminUser
GogsUsers
Ted
Kelly
Ned
In my opinion, the current LDAP auth handling does not allow dynamic admin groups for administrating diffrent applications..
There are only super admins, which are users, created for example under "ADMINS" group, like it's meant that "Once admin, always admin". No option to have different users with different admin accesses to different applications.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue does not name files, tests, or entry points. Start by locating the LDAP authentication handling and the existing super-admin authorization flow, then determine how group membership should map to application-specific permissions. Done means agreeing on the authorization model and implementing dynamic group-based administration with coverage for the supported LDAP scenarios.
Written by the indexing model from the issue text.
Assessment
- Domain
- authentication, authorization, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100