Skip to content

Commit

Permalink
fix: dns level is called dns_support_level
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibaultDewailly committed Apr 22, 2024
1 parent 0e82d89 commit f1569c2
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,13 @@ Whether to display last login information on connection

Default value: `$thebastion::params::display_last_login`

##### `dns_level`
##### `dns_support_level`

Data type: `Integer[0,2]`

Manage DNS Level resolution, 0 being no resolution, 1 forced resolution, 2 full resolution

Default value: `$thebastion::params::dns_level`
Default value: `$thebastion::params::dns_support_level`

##### `documentation_url`

Expand Down
2 changes: 1 addition & 1 deletion manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
'defaultAccountEgressKeySize' => $thebastion::default_account_egress_key_size,
'defaultLogin' => $thebastion::default_login,
'displayLastLogin' => $thebastion::display_last_login,
'dnsLevel' => $thebastion::dns_level,
'dnsSupportLevel' => $thebastion::dns_support_level,
'documentationURL' => $thebastion::documentation_url,
'egressKeysFrom' => $thebastion::egress_keys_from,
'enableAccountAccessLog' => $thebastion::enable_account_access_log,
Expand Down
4 changes: 2 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
# The default remote user to use for egress ssh connections where no user has been specified by bastion's caller
# @param display_last_login
# Whether to display last login information on connection
# @param dns_level
# @param dns_support_level
# Manage DNS Level resolution, 0 being no resolution, 1 forced resolution, 2 full resolution
# @param documentation_url
# The URL of the documentation where users will be pointed to, for example when displaying help
Expand Down Expand Up @@ -256,7 +256,7 @@
Integer[256,8192] $default_account_egress_key_size = $thebastion::params::default_account_egress_key_size,
String $default_login = $thebastion::params::default_login,
Boolean $display_last_login = $thebastion::params::display_last_login,
Integer[0,2] $dns_level = $thebastion::params::dns_level,
Integer[0,2] $dns_support_level = $thebastion::params::dns_support_level,
Stdlib::HTTPUrl $documentation_url = $thebastion::params::documentation_url,
Array[Stdlib::IP::Address::V4] $egress_keys_from = $thebastion::params::egress_keys_from,
Boolean $enable_account_access_log = $thebastion::params::enable_account_access_log,
Expand Down
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
$default_account_egress_key_size = 256
$default_login = ''
$display_last_login = true
$dns_level = 2
$dns_support_level = 2
$documentation_url = 'https://ovh.github.io/the-bastion/'
$egress_keys_from = []
$enable_account_access_log = true
Expand Down
6 changes: 4 additions & 2 deletions spec/classes/thebastion_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
default_account_egress_key_size: 4096,
default_login: 'root',
display_last_login: false,
dns_level: 1,
dns_support_level: 1,
documentation_url: 'http://my.cutiedoc.com/bastion/',
egress_keys_from: ['127.0.0.1', '192.0.1.0/24'],
enable_account_access_log: false,
Expand Down Expand Up @@ -226,7 +226,7 @@
expect(parsed['defaultAccountEgressKeySize']).to eq(4096)
expect(parsed['defaultLogin']).to eq('root')
expect(parsed['displayLastLogin']).to be false
expect(parsed['dnsLevel']).to eq(1)
expect(parsed['dnsSupportLevel']).to eq(1)
expect(parsed['documentationURL']).to eq('http://my.cutiedoc.com/bastion/')
expect(parsed['enableAccountAccessLog']).to be false
expect(parsed['enableAccountSqlLog']).to be false
Expand Down Expand Up @@ -303,6 +303,7 @@
default_account_egress_key_size: 16_384,
default_login: 42,
display_last_login: 'yes',
dns_support_level: 42,
documentation_url: 'https:/my.sypertypo.org/bastion/',
enable_account_access_log: 'yes',
enable_account_sql_log: 'yes',
Expand Down Expand Up @@ -372,6 +373,7 @@
it { is_expected.to compile.and_raise_error(%r{default_login}) }
it { is_expected.to compile.and_raise_error(%r{display_last_login}) }
it { is_expected.to compile.and_raise_error(%r{documentation_url}) }
it { is_expected.to compile.and_raise_error(%r{dns_support_level}) }
it { is_expected.to compile.and_raise_error(%r{egress_keys_from}) }
it { is_expected.to compile.and_raise_error(%r{enable_account_access_log}) }
it { is_expected.to compile.and_raise_error(%r{enable_account_sql_log}) }
Expand Down

0 comments on commit f1569c2

Please sign in to comment.