Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
034b65d1
Commit
034b65d1
authored
Mar 27, 2022
by
Alvin Gounder
Committed by
Evan Read
Mar 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add OID filter example to LDAP troubleshooting doc
parent
aad2b222
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
doc/administration/auth/ldap/ldap-troubleshooting.md
doc/administration/auth/ldap/ldap-troubleshooting.md
+22
-1
No files found.
doc/administration/auth/ldap/ldap-troubleshooting.md
View file @
034b65d1
...
...
@@ -71,7 +71,28 @@ options = {
filter:
Net
::
LDAP
::
Filter
.
eq
(
'cn'
,
'*'
),
# :attributes is optional
# the attributes we want to get returnedk
# the attributes we want to get returned
attributes:
%w(dn cn memberuid member submember uniquemember memberof)
}
adapter
.
ldap_search
(
options
)
```
When using OIDs in the filter, replace
`Net::LDAP::Filter.eq`
with
`Net::LDAP::Filter.construct`
:
```
ruby
adapter
=
Gitlab
::
Auth
::
Ldap
::
Adapter
.
new
(
'ldapmain'
)
options
=
{
# :base is required
# use .base or .group_base
base:
adapter
.
config
.
base
,
# :filter is optional
# This filter includes OID 1.2.840.113556.1.4.1941
# It will search for all direct and nested members of the group gitlab_grp in the LDAP directory
filter:
Net
::
LDAP
::
Filter
.
construct
(
"(memberOf:1.2.840.113556.1.4.1941:=CN=gitlab_grp,DC=example,DC=com)"
),
# :attributes is optional
# the attributes we want to get returned
attributes:
%w(dn cn memberuid member submember uniquemember memberof)
}
adapter
.
ldap_search
(
options
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment