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
faf86c22
Verified
Commit
faf86c22
authored
7 years ago
by
Adam Lewenberg
Browse files
Options
Downloads
Patches
Plain Diff
change how authorized_keys parameter in ssh is used
parent
00d4613e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
NEWS
+1
-1
1 addition, 1 deletion
NEWS
manifests/ssh.pp
+15
-5
15 additions, 5 deletions
manifests/ssh.pp
with
16 additions
and
6 deletions
NEWS
+
1
−
1
View file @
faf86c22
...
@@ -23,7 +23,7 @@ release/005.007 (unreleased)
...
@@ -23,7 +23,7 @@ release/005.007 (unreleased)
[ssh] Add the parameter $pubkey to the ssh class to allow ssh key-pair
[ssh] Add the parameter $pubkey to the ssh class to allow ssh key-pair
logins (this way you do not have to do class inheritance). Also add a
logins (this way you do not have to do class inheritance). Also add a
parameter to allow root users to login using ssh key-pairs. Both of
parameter to allow root users to login using ssh key-pairs. Both of
these parameters are set to
false
by default. [adamhl]
these parameters are set to
have no effect
by default. [adamhl]
release/005.006 (2017-02-16)
release/005.006 (2017-02-16)
...
...
This diff is collapsed.
Click to expand it.
manifests/ssh.pp
+
15
−
5
View file @
faf86c22
...
@@ -22,18 +22,23 @@
...
@@ -22,18 +22,23 @@
# server.
# server.
# Default: false
# Default: false
# $allow_pubkey_for_root: set to true if you want to allow root logins
# $root_authorized_keys: Set this to a Puppet template URL to
# using ssh key-pairs. This is especially useful for Kerberos KDCs that
# instantiate that file as /root/.ssh/authorized_keys.
# This is especially useful for Kerberos KDCs that
# are not clients of the production KDC. Use with caution.
# are not clients of the production KDC. Use with caution.
# If you set this to true you should also set $pubkey to true.
# If you set this to true you should also set $pubkey to true.
# Default: false
#
# Example:
# root_authorized_keys => template('mymodule/root/.ssh/authorized_keys.erb'),
#
# Default: undef
class
base::ssh
(
class
base::ssh
(
$pam_afs
=
true
,
$pam_afs
=
true
,
$pam_duo
=
false
,
$pam_duo
=
false
,
$pam_slurm
=
false
,
$pam_slurm
=
false
,
$pubkey
=
false
,
$pubkey
=
false
,
$
allow_pubkey_for_root
=
false
,
$
root_authorized_keys
=
undef
,
$filter_sunetids
=
[],
$filter_sunetids
=
[],
){
){
...
@@ -110,7 +115,12 @@ class base::ssh(
...
@@ -110,7 +115,12 @@ class base::ssh(
notify
=>
Service
[
'ssh'
],
notify
=>
Service
[
'ssh'
],
}
}
if
(
!
$allow_pubkey_for_root
)
{
if
(
$root_authorized_keys
)
{
file
{
'/root/.ssh/authorized_keys'
:
ensure
=>
present
,
content
=>
$root_authorized_keys
,
}
}
else
{
# Make sure public key authentication to root does not work and clean up
# Make sure public key authentication to root does not work and clean up
# after the authorized_keys file generated during the build process. Some
# after the authorized_keys file generated during the build process. Some
# clients (HPC) will need to override this (for GPFS, for example).
# clients (HPC) will need to override this (for GPFS, for example).
...
...
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