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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
cd13e4ae
Commit
cd13e4ae
authored
Jun 09, 2017
by
Michael Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Verify certificates in `omniauth-ldap`
parent
612b3864
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
1 deletion
+32
-1
lib/gitlab/ldap/config.rb
lib/gitlab/ldap/config.rb
+2
-1
spec/lib/gitlab/ldap/config_spec.rb
spec/lib/gitlab/ldap/config_spec.rb
+30
-0
No files found.
lib/gitlab/ldap/config.rb
View file @
cd13e4ae
...
...
@@ -62,7 +62,8 @@ module Gitlab
base:
base
,
encryption:
options
[
'encryption'
],
filter:
omniauth_user_filter
,
name_proc:
name_proc
name_proc:
name_proc
,
disable_verify_certificates:
!
options
[
'verify_certificates'
]
)
if
has_auth?
...
...
spec/lib/gitlab/ldap/config_spec.rb
View file @
cd13e4ae
...
...
@@ -238,6 +238,36 @@ describe Gitlab::LDAP::Config, lib: true do
password:
'super_secret'
)
end
context
'when verify_certificates is enabled'
do
it
'specifies disable_verify_certificates as false'
do
stub_ldap_config
(
options:
{
'host'
=>
'ldap.example.com'
,
'port'
=>
686
,
'encryption'
=>
'simple_tls'
,
'verify_certificates'
=>
true
}
)
expect
(
config
.
omniauth_options
).
to
include
({
disable_verify_certificates:
false
})
end
end
context
'when verify_certificates is disabled'
do
it
'specifies disable_verify_certificates as true'
do
stub_ldap_config
(
options:
{
'host'
=>
'ldap.example.com'
,
'port'
=>
686
,
'encryption'
=>
'simple_tls'
,
'verify_certificates'
=>
false
}
)
expect
(
config
.
omniauth_options
).
to
include
({
disable_verify_certificates:
true
})
end
end
end
describe
'#has_auth?'
do
...
...
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