Skip to content
Snippets Groups Projects
Verified Commit 1c31982a authored by Adam Lewenberg's avatar Adam Lewenberg
Browse files

add extra_gssapi_only_user to ssh

parent c40acf1c
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,9 @@ unreleased (2017-??-??) ...@@ -2,6 +2,9 @@ unreleased (2017-??-??)
Starting the work to make the code Puppet 4 compatible. [adamhl] Starting the work to make the code Puppet 4 compatible. [adamhl]
[ssh] Add $extra_gssapi_only_users parameter to list accounts extra
accounts that should skip Duo. [adamhl]
release/005.009 (2017-07-07) release/005.009 (2017-07-07)
[ntp] Push "tinker-panic 0" to the top of the ntp.conf file to help [ntp] Push "tinker-panic 0" to the top of the ntp.conf file to help
......
...@@ -49,6 +49,9 @@ ...@@ -49,6 +49,9 @@
# #
# Default: undef # Default: undef
# $extra_gssapi_only_users: See documentation in base::ssh::config::sshd.
# Default: []
class base::ssh( class base::ssh(
$pam_afs = true, $pam_afs = true,
$pam_duo = false, $pam_duo = false,
...@@ -65,9 +68,10 @@ class base::ssh( ...@@ -65,9 +68,10 @@ class base::ssh(
'192.168.0.0/16', '192.168.0.0/16',
'204.63.224.0/21' '204.63.224.0/21'
], ],
$pubkey = false, $pubkey = false,
$root_authorized_keys = undef, $root_authorized_keys = undef,
$filter_sunetids = [], $filter_sunetids = [],
$extra_gssapi_only_users = [],
){ ){
# Install the openssh server package. # Install the openssh server package.
...@@ -129,10 +133,11 @@ class base::ssh( ...@@ -129,10 +133,11 @@ class base::ssh(
# Install sshd (server) configuration file. # Install sshd (server) configuration file.
base::ssh::config::sshd { '/etc/ssh/sshd_config': base::ssh::config::sshd { '/etc/ssh/sshd_config':
ensure => present, ensure => present,
pam_duo => $pam_duo, pam_duo => $pam_duo,
pubkey => $pubkey, pubkey => $pubkey,
notify => Service['ssh'], extra_gssapi_only_users => $extra_gssapi_only_users,
notify => Service['ssh'],
} }
if ($root_authorized_keys) { if ($root_authorized_keys) {
......
...@@ -32,6 +32,22 @@ ...@@ -32,6 +32,22 @@
# useful for bastion hosts. # useful for bastion hosts.
# Default: undef # Default: undef
# $extra_gssapi_only_users: Due to problems with Duo, we skip Duo for users
# matching these strings: root,root.*,*.root,admin.*,*.admin. These users
# can ONLY use GSSAPI (no passwords). If you want to skip accounts IN
# ADDITION to this list, set this parameter to an array of such
# accounts. For example, if you want to skip Duo authentication for
#
# root
# root.*
# *.root
# admin.*
# *.admin
# wallet
#
# you would set $extra_gssapi_only_users to ['wallet']
# Default: []
define base::ssh::config::sshd( define base::ssh::config::sshd(
$ensure = 'present', $ensure = 'present',
$gitolite = false, $gitolite = false,
...@@ -47,6 +63,7 @@ define base::ssh::config::sshd( ...@@ -47,6 +63,7 @@ define base::ssh::config::sshd(
$rootloginwithpswd = 'no', $rootloginwithpswd = 'no',
$pam_duo = false, $pam_duo = false,
$max_sessions = 'NOT DEFINED', $max_sessions = 'NOT DEFINED',
$extra_gssapi_only_users = [],
) { ) {
if ($source) { if ($source) {
$template = undef $template = undef
......
...@@ -134,7 +134,12 @@ MaxSessions <%= @max_sessions %> ...@@ -134,7 +134,12 @@ MaxSessions <%= @max_sessions %>
# Because we are enabling Duo but root logins cannot use Duo (yet), # Because we are enabling Duo but root logins cannot use Duo (yet),
# we have to configure the authentications for root separately. # we have to configure the authentications for root separately.
Match User root,root.*,*.root,admin.*,*.admin <%-
gssapi_only = ['root', 'root.*', '*.root', 'admin.*', '*.admin']
gssapi_only = admin_users + @extra_gssapi_only_users
gssapi_only_list = admin_users.join(',')
-%>
Match User <%= gssapi_only_list %>
AuthenticationMethods gssapi-with-mic AuthenticationMethods gssapi-with-mic
MaxSessions 3 MaxSessions 3
<% end -%> <% end -%>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment