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
d5232a09
Commit
d5232a09
authored
Mar 11, 2019
by
Christopher Schenk
Committed by
Drew Blessing
Sep 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make mapping between ldap and kerberos configurable
parent
4a1667c4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
5 deletions
+22
-5
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+1
-0
ee/changelogs/unreleased/2906-make-kerberos-mapping-configurable.yml
...gs/unreleased/2906-make-kerberos-mapping-configurable.yml
+6
-0
ee/lib/ee/gitlab/auth/ldap/person.rb
ee/lib/ee/gitlab/auth/ldap/person.rb
+15
-5
No files found.
config/initializers/1_settings.rb
View file @
d5232a09
...
...
@@ -731,6 +731,7 @@ Gitlab.ee do
Settings
[
'kerberos'
]
||=
Settingslogic
.
new
({})
Settings
.
kerberos
[
'enabled'
]
=
false
if
Settings
.
kerberos
[
'enabled'
].
nil?
Settings
.
kerberos
[
'keytab'
]
=
nil
if
Settings
.
kerberos
[
'keytab'
].
blank?
# nil means use default keytab
Settings
.
kerberos
[
'simple_ldap_linking_allowed_realms'
]
=
[]
if
Settings
.
kerberos
[
'simple_ldap_linking_allowed_realms'
].
blank?
Settings
.
kerberos
[
'service_principal_name'
]
=
nil
if
Settings
.
kerberos
[
'service_principal_name'
].
blank?
# nil means any SPN in keytab
Settings
.
kerberos
[
'use_dedicated_port'
]
=
false
if
Settings
.
kerberos
[
'use_dedicated_port'
].
nil?
Settings
.
kerberos
[
'https'
]
=
Settings
.
gitlab
.
https
if
Settings
.
kerberos
[
'https'
].
nil?
...
...
ee/changelogs/unreleased/2906-make-kerberos-mapping-configurable.yml
0 → 100644
View file @
d5232a09
---
title
:
Add simple_ldap_linking kerberos options to make the mapping between ldap and
kerberos configureable
merge_request
:
author
:
Christopher Schenk
type
:
added
ee/lib/ee/gitlab/auth/ldap/person.rb
View file @
d5232a09
...
...
@@ -31,12 +31,22 @@ module EE
uid
,
domain
=
principal
.
split
(
'@'
,
2
)
return
unless
uid
&&
domain
# In multi-forest setups, there may be several users with matching
# uids but differing DNs, so skip adapters configured to connect to
# non-matching domains
return
unless
domain
.
casecmp
(
domain_from_dn
(
adapter
.
config
.
base
))
==
0
if
::
Gitlab
.
config
.
kerberos
.
simple_ldap_linking_allowed_realms
.
blank?
find_by_uid
(
uid
,
adapter
)
# In multi-forest setups, there may be several users with matching
# uids but differing DNs, so skip adapters configured to connect to
# non-matching domains
return
unless
domain
.
casecmp
(
domain_from_dn
(
adapter
.
config
.
base
))
==
0
find_by_uid
(
uid
,
adapter
)
else
::
Gitlab
.
config
.
kerberos
.
simple_ldap_linking_allowed_realms
.
each
do
|
realm
|
if
domain
.
casecmp
(
realm
)
==
0
return
find_by_uid
(
uid
,
adapter
)
end
end
end
end
# Extracts the rightmost unbroken set of domain components from an
...
...
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