Added new OAuth Parameters

Storyboard.conf now accepts authorization_code_ttl and a list of
valid_oauth_clients.

Change-Id: I29495a0b640c3ca097cca8c17349df5cc42388de
This commit is contained in:
Michael Krotscheck 2015-02-19 09:49:22 -08:00
parent 936abca6a6
commit 9cff9d2142
4 changed files with 20 additions and 1 deletions

View File

@ -30,9 +30,11 @@ class storyboard::application (
$cors_max_age = 3600,
# storyboard.conf parameters
$authorization_code_ttl = 300,
$access_token_ttl = 3600,
$refresh_token_ttl = 604800,
$openid_url,
$valid_oauth_clients = [$::fqdn],
$enable_token_cleanup = 'True',
$mysql_host = 'localhost',

View File

@ -24,9 +24,11 @@ class storyboard (
$mysql_user = 'storyboard',
$mysql_user_password,
$rabbitmq_user = 'storyboard',
$rabbitmq_user = 'storyboard',
$rabbitmq_user_password,
$valid_oauth_clients = [$::fqdn],
$hostname = $::fqdn,
$openid_url = 'https://login.launchpad.net/+openid',
@ -66,6 +68,7 @@ class storyboard (
mysql_database => $mysql_database,
mysql_user => $mysql_user,
mysql_user_password => $mysql_user_password,
valid_oauth_clients => $valid_oauth_clients,
rabbitmq_user => $rabbitmq_user,
rabbitmq_user_password => $rabbitmq_user_password

View File

@ -51,12 +51,18 @@ enable_notifications = <%= @enable_notifications %>
# OpenId Authentication endpoint
openid_url = <%= @openid_url %>
# Time in seconds before an authorization code expires.
authorization_code_ttl = <%= @authorization_code_ttl %>
# Time in seconds before an access_token expires
access_token_ttl = <%= @access_token_ttl %>
# Time in seconds before an refresh_token expires
refresh_token_ttl = <%= @refresh_token_ttl %>
# A list of valid client id's that may connect to StoryBoard.
valid_oauth_clients = <%= @valid_oauth_clients.join(',') %>
[cron]
# Storyboard's cron management configuration

View File

@ -3,6 +3,10 @@ node 'puppet-storyboard-precise64' {
mysql_user_password => 'storyboard',
rabbitmq_user_password => 'storyboard',
hostname => '192.168.99.22',
valid_oauth_clients => [
'192.168.99.22'
],
}
}
@ -11,5 +15,9 @@ node 'puppet-storyboard-trusty64' {
mysql_user_password => 'storyboard',
rabbitmq_user_password => 'storyboard',
hostname => '192.168.99.23',
valid_oauth_clients => [
'192.168.99.23'
],
}
}