This repository was archived by the owner on Aug 29, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +40
-1
lines changed Expand file tree Collapse file tree 3 files changed +40
-1
lines changed Original file line number Diff line number Diff line change 37
37
before => Exec[' Broker gem dependencies' ],
38
38
}
39
39
40
+ file {'Console htpasswd config' :
41
+ path => ' /var/www/openshift/console/httpd/conf.d/openshift-origin-auth-remote-user-basic.conf' ,
42
+ content =>
43
+ template (' openshift_origin/console/plugins/auth/basic/openshift-origin-auth-remote-user-basic.conf.erb' ),
44
+ owner => ' apache' ,
45
+ group => ' apache' ,
46
+ mode => ' 0644' ,
47
+ require => [
48
+ Package[' rubygem-openshift-origin-auth-remote-user' ],
49
+ File [' Broker htpasswd config' ],
50
+ ],
51
+ notify => Service[' openshift-console' ],
52
+ before => Exec[' Console gem dependencies' ],
53
+ }
54
+
40
55
file { 'Auth plugin config' :
41
56
path => ' /etc/openshift/plugins.d/openshift-origin-auth-remote-user.conf' ,
42
57
content => template (' openshift_origin/broker/plugins/auth/basic/remote-user.conf.plugin.erb' ),
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ BROKER_API_SSL_OPTIONS={:verify_mode => OpenSSL::SSL::VERIFY_NONE}
53
53
# during startup of the console and any errors will prevent
54
54
# load.
55
55
#
56
- CONSOLE_SECURITY=basic
56
+ CONSOLE_SECURITY=<%= scope . lookupvar ( '::openshift_origin::broker_auth_plugin' ) == 'mongo' ? ' basic' : 'remote_user' %>
57
57
58
58
#
59
59
# The name of the request env variable or header that indicates a
Original file line number Diff line number Diff line change
1
+ LoadModule auth_basic_module modules/mod_auth_basic.so
2
+ LoadModule authn_file_module modules/mod_authn_file.so
3
+ LoadModule authz_user_module modules/mod_authz_user.so
4
+
5
+ # Turn the authenticated remote-user into an Apache environment variable for the console security controller
6
+ RewriteEngine On
7
+ RewriteCond %{LA-U:REMOTE_USER} (.+)
8
+ RewriteRule . - [E=RU:%1]
9
+ RequestHeader set X-Remote-User "%{RU}e" env=RU
10
+
11
+ < Location /console>
12
+ AuthName "OpenShift Developer Console"
13
+ AuthType Basic
14
+ AuthUserFile /etc/openshift/htpasswd
15
+ require valid-user
16
+
17
+ # The node-> broker auth is handled in the Ruby code
18
+ BrowserMatch Openshift passthrough
19
+ Allow from env=passthrough
20
+
21
+ Order Deny,Allow
22
+ Deny from all
23
+ Satisfy any
24
+ </ Location >
You can’t perform that action at this time.
0 commit comments