Skip to content
This repository was archived by the owner on Jul 28, 2020. It is now read-only.

Commit 1eba576

Browse files
committed
Fixed spec and recipes to handle new st2auth config
1 parent 2352212 commit 1eba576

4 files changed

Lines changed: 13 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# stackstorm cookbook CHANGELOG
22

33
## In Development
4+
## 0.7.1
5+
* Updated recipes and tests to handle new st2auth settings.
46

57
## 0.7.0
68

metadata.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
license 'Apache-2.0'
55
description 'Installs/Configures stackstorm'
66
long_description 'Installs/Configures stackstorm'
7-
version '0.7.0'
7+
version '0.7.1'
88

99
supports 'ubuntu', '= 14.04'
1010
supports 'redhat', '~> 7.5'

recipes/default.rb

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111
include_recipe 'stackstorm::_services'
1212

1313
# Generate username & password for htpasswd flat-file authentication
14-
htpasswd ':add credentials to htpasswd file' do
15-
file node['stackstorm']['config']['auth_standalone_file']
16-
user node['stackstorm']['username']
17-
password node['stackstorm']['password']
18-
action :add
14+
if node['stackstorm']['config']['auth_backend'] == 'flat_file'
15+
htpasswd ':add credentials to htpasswd file' do
16+
file node['stackstorm']['config']['auth_backend_kwargs']['file_path']
17+
user node['stackstorm']['username']
18+
password node['stackstorm']['password']
19+
action :add
20+
end
1921
end

spec/recipes/config_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,9 @@
168168
'auth_use_ssl' => false,
169169
'auth_debug' => false,
170170
'auth_enable' => true,
171-
'auth_standalone_file' => '/etc/st2/htpasswd',
171+
'auth_mode' => 'standalone',
172+
'auth_backend' => 'flat_file',
173+
'auth_backend_kwargs' => { file_path: '/etc/st2/htpasswd' },
172174

173175
'syslog_enabled' => false,
174176
'syslog_host' => '127.0.0.1',

0 commit comments

Comments
 (0)