Skip to content

Commit c35f6dc

Browse files
CodePhaseMark Fitchop-cttrevor-vaughan
authored
(SIMP-10736) Add pubkey ssh support for AD (#124)
Allow public key logins over ssh for ActiveDirectory computers and accounts SIMP-10736 #close Co-authored-by: Mark Fitch <[email protected]> Co-authored-by: op-ct <[email protected]> Co-authored-by: Trevor Vaughan <[email protected]>
1 parent 628b6a1 commit c35f6dc

File tree

6 files changed

+65
-4
lines changed

6 files changed

+65
-4
lines changed

CHANGELOG

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
* Fri Jul 15 2022 Mark Fitch <[email protected]> - 7.4.1
2+
- Fixed:
3+
- Added missing parameters `ldap_user_extra_attrs` and
4+
`ldap_user_ssh_public_key` to allow SSH keys to be fetched from AD
5+
16
* Wed Jun 22 2022 Yehuda Katz <[email protected]> - 7.4.1
27
- Allow `krb5_server` to be optional as implemented in the template
38

REFERENCE.md

+36-3
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,18 @@ Install the required packages for SSSD
373373

374374
The following parameters are available in the `sssd::install` class:
375375

376+
* [`install_client`](#install_client)
376377
* [`install_user_tools`](#install_user_tools)
377378
* [`package_ensure`](#package_ensure)
378379

380+
##### <a name="install_client"></a>`install_client`
381+
382+
Data type: `Boolean`
383+
384+
If ``true``, install the ``sssd`` client
385+
386+
Default value: ``true``
387+
379388
##### <a name="install_user_tools"></a>`install_user_tools`
380389

381390
Data type: `Boolean`
@@ -1747,6 +1756,8 @@ The following parameters are available in the `sssd::provider::ad` defined type:
17471756
* [`ldap_use_tokengroups`](#ldap_use_tokengroups)
17481757
* [`ldap_group_objectsid`](#ldap_group_objectsid)
17491758
* [`ldap_user_objectsid`](#ldap_user_objectsid)
1759+
* [`ldap_user_extra_attrs`](#ldap_user_extra_attrs)
1760+
* [`ldap_user_ssh_public_key`](#ldap_user_ssh_public_key)
17501761

17511762
##### <a name="ad_domain"></a>`ad_domain`
17521763

@@ -2156,6 +2167,26 @@ Data type: `Optional[String[1]]`
21562167

21572168

21582169

2170+
Default value: ``undef``
2171+
2172+
##### <a name="ldap_user_extra_attrs"></a>`ldap_user_extra_attrs`
2173+
2174+
Data type: `Optional[String[1]]`
2175+
2176+
Can be used to enable public key storage for ssh
2177+
When used this way, set this param and param ldap_user_ssh_public_key
2178+
to 'altSecurityIdentities'
2179+
2180+
Default value: ``undef``
2181+
2182+
##### <a name="ldap_user_ssh_public_key"></a>`ldap_user_ssh_public_key`
2183+
2184+
Data type: `Optional[String[1]]`
2185+
2186+
Can be used to enable public key storage for ssh
2187+
When used this way, set this param and param ldap_user_extra_attrs
2188+
to 'altSecurityIdentities'
2189+
21592190
Default value: ``undef``
21602191

21612192
### <a name="sssdproviderfiles"></a>`sssd::provider::files`
@@ -2516,9 +2547,11 @@ The name of the associated domain section in the configuration file.
25162547

25172548
##### <a name="krb5_server"></a>`krb5_server`
25182549

2519-
Data type: `Simplib::Host`
2550+
Data type: `Optional[Simplib::Host]`
2551+
25202552

25212553

2554+
Default value: ``undef``
25222555

25232556
##### <a name="krb5_realm"></a>`krb5_realm`
25242557

@@ -2905,7 +2938,7 @@ Default value: ``true``
29052938

29062939
##### <a name="ldap_search_base"></a>`ldap_search_base`
29072940

2908-
Data type: `String[1]`
2941+
Data type: `Optional[String[1]]`
29092942

29102943

29112944

@@ -2921,7 +2954,7 @@ Default value: `'rfc2307'`
29212954

29222955
##### <a name="ldap_default_bind_dn"></a>`ldap_default_bind_dn`
29232956

2924-
Data type: `String[1]`
2957+
Data type: `Optional[String[1]]`
29252958

29262959

29272960

manifests/install.pp

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Install the required packages for SSSD
22
#
3+
# @param install_client
4+
# If ``true``, install the ``sssd`` client
5+
#
36
# @param install_user_tools
47
# If ``true``, install the 'sssd-tools' package for administrative
58
# changes to the SSSD databases

manifests/provider/ad.pp

+10
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,14 @@
8585
# @param ldap_use_tokengroups
8686
# @param ldap_group_objectsid
8787
# @param ldap_user_objectsid
88+
# @param ldap_user_extra_attrs
89+
# Can be used to enable public key storage for ssh
90+
# When used this way, set this param and param ldap_user_ssh_public_key
91+
# to 'altSecurityIdentities'
92+
# @param ldap_user_ssh_public_key
93+
# Can be used to enable public key storage for ssh
94+
# When used this way, set this param and param ldap_user_extra_attrs
95+
# to 'altSecurityIdentities'
8896
#
8997
# @author https://github.com/simp/pupmod-simp-sssd/graphs/contributors
9098
#
@@ -139,6 +147,8 @@
139147
Boolean $ldap_use_tokengroups = true,
140148
Optional[String[1]] $ldap_group_objectsid = undef,
141149
Optional[String[1]] $ldap_user_objectsid = undef,
150+
Optional[String[1]] $ldap_user_extra_attrs = undef,
151+
Optional[String[1]] $ldap_user_ssh_public_key = undef,
142152
) {
143153
sssd::config::entry { "puppet_provider_${name}_ad":
144154
content => template("${module_name}/provider/ad.erb")

spec/defines/provider/ad_spec.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@
100100
:ldap_idmap_autorid_compat => false,
101101
:ldap_idmap_helper_table_size => 8,
102102
:ldap_group_objectsid => 'my_ldap_group_objectsid',
103-
:ldap_user_objectsid => 'my_ldap_user_objectsid'
103+
:ldap_user_objectsid => 'my_ldap_user_objectsid',
104+
:ldap_user_extra_attrs => 'altSecurityIdentities',
105+
:ldap_user_ssh_public_key => 'altSecurityIdentities'
104106
}}
105107

106108
it do
@@ -155,6 +157,8 @@
155157
ldap_use_tokengroups = true
156158
ldap_group_objectsid = my_ldap_group_objectsid
157159
ldap_user_objectsid = my_ldap_user_objectsid
160+
ldap_user_extra_attrs = altSecurityIdentities
161+
ldap_user_ssh_public_key = altSecurityIdentities
158162
EXPECTED
159163

160164
is_expected.to create_sssd__config__entry("puppet_provider_#{title}_ad").with_content(expected)

templates/provider/ad.erb

+6
Original file line numberDiff line numberDiff line change
@@ -150,3 +150,9 @@ ldap_group_objectsid = <%= @ldap_group_objectsid %>
150150
<% if @ldap_user_objectsid -%>
151151
ldap_user_objectsid = <%= @ldap_user_objectsid %>
152152
<% end -%>
153+
<% if @ldap_user_extra_attrs -%>
154+
ldap_user_extra_attrs = <%= @ldap_user_extra_attrs %>
155+
<% end -%>
156+
<% if @ldap_user_ssh_public_key -%>
157+
ldap_user_ssh_public_key = <%= @ldap_user_ssh_public_key %>
158+
<% end -%>

0 commit comments

Comments
 (0)