1 # frozen_string_literal: true
3 control 'shellinabox configuration' do
4 title 'should match desired lines'
8 file = '/etc/sysconfig/shellinaboxd'
10 siab_stanza = <<~SIAB_STANZA
12 # SSL is disabled because it is terminated in Nginx. Adjust as needed.
13 OPTS="--disable-ssl --no-beep --service=/shell.fixme.example.net:SSH"
15 when 'debian', 'ubuntu'
16 file = '/etc/default/shellinabox'
18 siab_stanza = <<~SIAB_STANZA
20 # SSL is disabled because it is terminated in Nginx. Adjust as needed.
21 SHELLINABOX_ARGS="--disable-ssl --no-beep --service=/shell.fixme.example.net:AUTH:HOME:SHELL"
24 describe file(file) do
26 it { should be_owned_by 'root' }
27 it { should be_grouped_into 'root' }
28 its('mode') { should cmp '0644' }
31 # rubocop:disable Layout/LineLength
32 "File managed by Salt at <salt://arvados/shell/config/files/#{tpl}/shell-shellinabox.tmpl.jinja>."
33 # rubocop:enable Layout/LineLength
36 its('content') { should include(siab_stanza) }
40 control 'libpam-arvados configuration' do
41 title 'should match desired lines'
43 libpam_stanza = <<~LIBPAM_STANZA
44 auth [success=1 default=ignore] /usr/lib/pam_arvados.so fixme.example.net shell.fixme.example.net
47 describe file('/etc/pam.d/arvados') do
49 it { should be_owned_by 'root' }
50 it { should be_grouped_into 'root' }
51 its('mode') { should cmp '0644' }
54 # rubocop:disable Layout/LineLength
55 'File managed by Salt at <salt://arvados/shell/config/files/default/shell-libpam-arvados.tmpl.jinja>.'
56 # rubocop:enable Layout/LineLength
59 its('content') { should include(libpam_stanza) }