Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
puppetpublic
base
Commits
1c31982a
Verified
Commit
1c31982a
authored
7 years ago
by
Adam Lewenberg
Browse files
Options
Downloads
Patches
Plain Diff
add extra_gssapi_only_user to ssh
parent
c40acf1c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
NEWS
+3
-0
3 additions, 0 deletions
NEWS
manifests/ssh.pp
+12
-7
12 additions, 7 deletions
manifests/ssh.pp
manifests/ssh/config/sshd.pp
+17
-0
17 additions, 0 deletions
manifests/ssh/config/sshd.pp
templates/ssh/sshd_config.erb
+6
-1
6 additions, 1 deletion
templates/ssh/sshd_config.erb
with
38 additions
and
8 deletions
NEWS
+
3
−
0
View file @
1c31982a
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
manifests/ssh.pp
+
12
−
7
View file @
1c31982a
...
@@ -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
)
{
...
...
This diff is collapsed.
Click to expand it.
manifests/ssh/config/sshd.pp
+
17
−
0
View file @
1c31982a
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
templates/ssh/sshd_config.erb
+
6
−
1
View file @
1c31982a
...
@@ -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
-%>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment