Enable oauth2 in openstackid configuration

Add oauth2_enable and ssl_enable options to openstackid's server.php
configuration file.

Change-Id: Ib613ffeb550b682940e67273fbeaa8a101796f57
This commit is contained in:
Marton Kiss 2014-12-19 09:46:25 +01:00
parent a266ab3e7a
commit 65255adaf0
3 changed files with 22 additions and 0 deletions

View File

@ -55,6 +55,7 @@ function site_init {
ln -sf /etc/openstackid/recaptcha.php $target_dir/app/config/packages/greggilbert/recaptcha/$LARAVEL_ENV/config.php
ln -sf /etc/openstackid/database.php $target_dir/app/config/$LARAVEL_ENV/database.php
ln -sf /etc/openstackid/log.php $target_dir/app/config/$LARAVEL_ENV/log.php
ln -sf /etc/openstackid/server.php $target_dir/app/config/$LARAVEL_ENV/server.php
# convert app/storage into symlink and set permissions
mv $target_dir/app/storage $SITE_ROOT/
chmod 02770 $SITE_ROOT/storage
@ -164,6 +165,7 @@ function site_update {
ln -sf /etc/openstackid/recaptcha.php $target_dir/app/config/packages/greggilbert/recaptcha/$LARAVEL_ENV/config.php
ln -sf /etc/openstackid/database.php $target_dir/app/config/$LARAVEL_ENV/database.php
ln -sf /etc/openstackid/log.php $target_dir/app/config/$LARAVEL_ENV/log.php
ln -sf /etc/openstackid/server.php $target_dir/app/config/$LARAVEL_ENV/server.php
# link shared app/storage directory
rm -rf $target_dir/app/storage
ln -s $SITE_ROOT/storage $target_dir/app

View File

@ -49,6 +49,8 @@ class openstackid (
$id_recaptcha_private_key = '',
$id_recaptcha_template = '',
$openstackid_release = 'latest',
$ssl_enable = 'true',
$oauth2_enable = 'true',
) {
# php packages needed for openid server
@ -133,6 +135,17 @@ class openstackid (
]
}
file { '/etc/openstackid/server.php':
ensure => present,
content => template('openstackid/server.php.erb'),
owner => 'root',
group => 'www-data',
mode => '0640',
require => [
File['/etc/openstackid'],
]
}
$docroot_dirs = [ '/srv/openstackid' ]
file { $docroot_dirs:
@ -216,6 +229,7 @@ class openstackid (
File['/etc/openstackid/database.php'],
File['/etc/openstackid/log.php'],
File['/etc/openstackid/environment.php'],
File['/etc/openstackid/server.php'],
Package['curl'],
Package[$php5_packages] ],
}
@ -232,6 +246,7 @@ class openstackid (
File['/etc/openstackid/database.php'],
File['/etc/openstackid/log.php'],
File['/etc/openstackid/environment.php'],
File['/etc/openstackid/server.php'],
Package[$php5_packages] ],
}

5
templates/server.php.erb Normal file
View File

@ -0,0 +1,5 @@
<?php
return array(
'SSL_Enable' => <%= @ssl_enable %>,
'OAuth2_Enable' => <%= @oauth2_enable %>,
);