Skip to content

Commit

Permalink
(profile::util::keytab) make TGT non-forwardable
Browse files Browse the repository at this point in the history
Generally, we want to allow ssh between 2 pair of hosts only. We don't
not want the TGT to be reusable to make another hop from the destination
host.  If additional access from the destination ssh host is needed, a
role user TGT should also be present on the destination host.
  • Loading branch information
jhoblitt committed Sep 13, 2022
1 parent 0c8bcd7 commit 1bb6566
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion site/profile/manifests/util/keytab.pp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
}

cron { 'k5start_root':
command => "/usr/bin/k5start -f ${keytab_path} -U -o ${uid} -k /tmp/krb5cc_${uid} -H 60 > /dev/null 2>&1",
command => "/usr/bin/k5start -f ${keytab_path} -U -o ${uid} -k /tmp/krb5cc_${uid} -H 60 -F > /dev/null 2>&1",
user => 'root',
minute => '*/1',
require => File[$keytab_path],
Expand Down
2 changes: 1 addition & 1 deletion spec/defines/util/keytab_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

it do
is_expected.to contain_cron('k5start_root').with(
command: '/usr/bin/k5start -f /home/foo/.keytab -U -o 123 -k /tmp/krb5cc_123 -H 60 > /dev/null 2>&1',
command: '/usr/bin/k5start -f /home/foo/.keytab -U -o 123 -k /tmp/krb5cc_123 -H 60 -F > /dev/null 2>&1',
)
end

Expand Down

0 comments on commit 1bb6566

Please sign in to comment.