summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Neel <brian@gitlab.com>2016-11-10 20:14:54 -0500
committerBrian Neel <brian@gitlab.com>2016-11-14 17:10:20 -0500
commit067da6224ef2cc53ae4ac38e3f3d1c99d1a97f96 (patch)
tree0399ffb2062fa48066fab183c0b426b31402fdb9
parenta3fd8521fb036b1f7153cad58234e8cb08246278 (diff)
downloadgitlab-ce-fix-shibboleth-auth-with-no-uid.tar.gz
fix shibboleth misconfigurations resulting in authentication bypassfix-shibboleth-auth-with-no-uid
-rw-r--r--changelogs/unreleased/fix-shibboleth-auth-with-no-uid.yml4
-rw-r--r--config/initializers/devise.rb4
2 files changed, 8 insertions, 0 deletions
diff --git a/changelogs/unreleased/fix-shibboleth-auth-with-no-uid.yml b/changelogs/unreleased/fix-shibboleth-auth-with-no-uid.yml
new file mode 100644
index 00000000000..56fa2170be3
--- /dev/null
+++ b/changelogs/unreleased/fix-shibboleth-auth-with-no-uid.yml
@@ -0,0 +1,4 @@
+---
+title: fix shibboleth misconfigurations resulting in authentication bypass
+merge_request: 7428
+author:
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index a0a8f88584c..a5b415457db 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -254,6 +254,10 @@ Devise.setup do |config|
end
end
+ if provider['name'] == 'shibboleth'
+ provider['args'][:fail_with_empty_uid] = true
+ end
+
# A Hash from the configuration will be passed as is.
provider_arguments << provider['args'].symbolize_keys
end