Version information
This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
- Puppet >= 4.7.0 <= 7.0.0
- ,
Start using this module
Add this module to your Puppetfile:
mod 'encore-ipa', '0.2.1'
Learn more about managing modules with a PuppetfileDocumentation
ipa Puppet module
Overview
This module will install and configure IPA servers, replicas, and clients. This module was forked from huit-ipa, and refactored with a focus on simplicity and ease of use. It has been further refactored to support Red Hat installations only.
The following features work great:
- Creating a domain.
- Adding IPA server replicas.
- Autofs configuration.
- Trust-ad join.
- Joining clients.
- Firewalld management.
The following features were stripped out and are currently unavailable:
- Sudo rule management.
- Host management (beyond simple clinet domain joins).
- Host joins via one time passwords.
- Dns zone management (beyond creating an initial zone).
- Admin configuration
- Web configuration
Dependencies
This module requires:
- puppetlabs/stdlib >= 4.13.0.
- crayfishx/firewalld >= 3.0.0.
Usage
Example usage:
Creating an IPA master, with ad-trust to corp.domain.com.
class { '::ipa':
ad_domain => 'corp.domain.com',
ad_groups => ['linux_admins','linux_users'],
ad_trust_admin => 'ad_admin@domain.com',
ad_trust_password => 'ad_admin_password',
ad_trust_realm => 'corp.domain.com',
admin_password => 'ChangeM3!',
automount_home_dir => "/home/ipa/${ad_domain}",
automount_home_share => 'nfs01.corp.domain.com:/srv/nfs/homes/&',
domain => 'ipa.corp.domain.com',
ds_password => 'ChangeM3!',
install_ipa_client => false,
ipa_master_fqdn => $facts['fqdn'],
ipa_role => 'master',
sssd_debug_level => '3',
}
Adding a replica:
class { '::ipa':
admin_password => 'ChangeM3!',
automount_home_dir => '/home/ipa/corp.domain.com',
configure_replica_ca => true,
domain => 'ipa.corp.domain.com',
domain_join_password => 'ChangeM3!',
ipa_master_fqdn => 'ipa01.corp.domain.com',
ipa_role => 'replica',
sssd_debug_level => '3',
}
Adding a client:
class { '::ipa':
automount_home_dir => '/home/ipa/corp.domain.com',
domain => 'ipa.corp.domain.com',
domain_join_password => 'ChangeM3!',
ipa_master_fqdn => 'ipa01.corp.domain.com',
ipa_role => 'client',
}
Mandatory Parameters
domain
Mandatory. The name of the IPA domain to create or join.
ipa_role
Mandatory. What role the node will be. Options are 'master', 'replica', and 'client'.
admin_password
Mandatory if ipa_role
is set as 'Master' or 'Replica'.
Password which will be assigned to the IPA account named 'admin'.
ds_password
Mandatory if ipa_role
is set as 'Master'.
Password which will be passed into the ipa setup's parameter named "--ds-password".
Optional Parameters
configure_dns_server
If true, then the parameter '--setup-dns' is passed to the IPA server installer. Also, triggers the install of the required dns server packages.
configure_replica_ca
If true, then the parameter '--setup-ca' is passed to the IPA replica installer.
configure_ntp
If false, then the parameter '--no-ntp' is passed to the IPA server installer.
custom_dns_forwarders
Each element in this array is prefixed with '--forwarder ' and passed to the IPA server installer.
domain_join_principal
The principal (usually username) used to join a client or replica to the IPA domain.
domain_join_password
The password for the domain_join_principal.
enable_hostname
If true, then the parameter '--hostname' is populated with the parameter 'ipa_server_fqdn' and passed to the IPA installer.
enable_ip_address
If true, then the parameter '--ip-address' is populated with the parameter 'ip_address' and passed to the IPA installer.
fixed_primary
If true, then the parameter '--fixed-primary' is passed to the IPA installer.
idstart
From the IPA man pages: "The starting user and group id number".
install_autofs
If true, then the autofs packages are installed.
install_epel
If true, then the epel repo is installed. The epel repo is usually required for sssd packages.
install_kstart
If true, then the kstart packages are installed.
install_sssdtools
If true, then the sssdtools packages are installed.
install_ipa_client
If true, then the IPA client packages are installed if the parameter 'ipa_role' is set to 'client'.
install_ipa_server
If true, then the IPA server packages are installed if the parameter 'ipa_role' is not set to 'client'.
install_sssd
If true, then the sssd packages are installed.
ipa_master_fqdn
FQDN of the server to use for a client or replica domain join.
manage_host_entry
If true, then a host entry is created using the parameters 'ipa_server_fqdn' and 'ip_address'.
mkhomedir
If true, then the parameter '--mkhomedir' is passed to the IPA client installer.
no_ui_redirect
If true, then the parameter '--no-ui-redirect' is passed to the IPA server installer.
realm
The name of the IPA realm to create or join (UPPERCASE).
Cipher hardening on CentOS/RHEL 8
NOTE: These settings are automatically applied inside of ipa::params
,
they are documented here as a reference.
# IPA on RHEL/CentOS 8 switched to mod_ssl, away from mod_nss
# mod_ssl in RHEL/CentOS 8 uses the "system" cryto policy for its ciphers and protocols
# see:
# https://www.redhat.com/en/blog/how-customize-crypto-policies-rhel-82
# https://access.redhat.com/articles/3642912
# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/security_hardening/using-the-system-wide-cryptographic-policies_security-hardening
$nss_ssl_ciphers = []
$nss_ssl_protocols = []
$ds_ssl_ciphers = [
# TLS 1.2
'+TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256',
'+TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384',
'+TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256',
'+TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384',
# TLS 1.3
'+TLS_AES_128_GCM_SHA256',
'+TLS_AES_256_GCM_SHA384',
'+TLS_CHACHA20_POLY1305_SHA256',
]
$ds_ssl_min_version = 'TLS1.2'
# Dogtag PKI Tomcat
# you _must_ set both the TLS 1.2 and 1.3 ciphers here though, otherwise you'll get an error
# when registering your clients:
# Joining realm failed: HTTP POST to URL 'https://freeipa.maludy.home:443/ipa/xml' failed. libcurl failed even to execute the HTTP transaction, explaining: SSL certificate problem: EE certificate key too weak
$pki_ssl_ciphers = [
# TLS 1.2
'+TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256',
'+TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384',
'+TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256',
'+TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384',
# TLS 1.3
'+TLS_AES_128_GCM_SHA256',
'+TLS_AES_256_GCM_SHA384',
'+TLS_CHACHA20_POLY1305_SHA256',
]
# PKI Tomcat doesn't, yet, support tls1_3 protocol, so leave it to 1.2
# if you try to set it to tls1_2:tls1_3 pki-tomcatd@pki-tomcat.service service will fail to start
$pki_ssl_protocol_range = 'tls1_2:tls1_2'
class { 'ipa':
ipa_role => 'master',
# nss ciphers and protocols not used in CentOS 8
nss_ssl_ciphers => $nss_ssl_ciphers,
nss_ssl_protocols => $nss_ssl_protocols,
ds_ssl_ciphers => $ds_ssl_ciphers,
ds_ssl_min_version => $ds_ssl_min_version,
pki_ssl_ciphers => $pki_ssl_ciphers,
pki_ssl_protocol_range => $pki_ssl_protocol_range,
}
Limitations
This module has only been tested on RHEL 7.
Testing
A vagrantfile is provided for easy testing.
Steps to get started:
- Install vagrant.
- Install virtualbox.
- Clone this repo.
- Run
vagrant up
in a terminal window from the root of the repo. - Open a browser and navigate to
https://localhost:8440
. Log in with usernameadmin
and passwordvagrant123
.
License
jpuskar/puppet-easy_ipa forked from: huit/puppet-ipa - Puppet module that can manage an IPA master, replicas and clients.
Copyright (C) 2013 Harvard University Information Technology
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
puppet-ipa
Development
v0.2.1 (2021-01-21)
- Fixed bug with
initial_password
inipa_user
. Contributed by Nick Maludy (@nmaludy)
v0.2.0 (2021-01-21)
- Added new resources
ipa::user
andipa_user
to manage IPA users and their home directories. Contributed by Nick Maludy (@nmaludy) - Fixed bug in
ipa_kinit
where exired kerberos tickets weren't getting filtered out resulting inipa_kinit
thinking a valid ticket existed for a user since it was in the list. Contributed by Nick Maludy (@nmaludy)
v0.1.1 (2021-01-15)
-
Fixed bug in client install where /etc/nsswitch.conf was declared twice for file_line Contributed by Nick Maludy (@nmaludy)
-
Fixed/added ciphers for RHEL/CentOS 8. Also allowed ciphers to be passed in empty for debugging. Contributed by Nick Maludy (@nmaludy)
v0.1.0 (2021-01-14)
- Initial release
Dependencies
- puppetlabs/stdlib (>= 4.13.0 < 7.0.0)
- puppet/firewalld (>= 3.0.0 < 5.0.0)
- ghoneycutt/facter (>= 3.0.0 < 4.0.0)
- puppet/epel (>= 3.0.0 < 4.0.0)
- puppetlabs/yumrepo_core (>= 1.0.0 < 2.0.0)
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS