This Puppet module is designed to facilitate the installation and configuration of MIT Kerberos. The primary scope includes installing the user utilities (kinit, etc) on the system and populating krb5.conf with the appropriate sections.
Other tasks such as setting up KDC services are not covered.
class { 'mit_krb5':
default_realm => 'INSECURE.LOCAL',
permitted_enctypes => ['des-cbc-crc', 'des-cbc-md5'],
allow_weak_crypto => true
}
class { 'mit_krb5::logging':
default => ['FILE:/var/log/krb5libs.log', 'SYSLOG']
}
mit_krb5::realm { 'INSECURE.LOCAL':
kdc => ['kdc1.insecure.local', 'kdc2.insecure.local'],
admin_server => 'kpasswd.insecure.local',
}
mit_krb5::domain_realm { 'INSECURE.LOCAL':
domains => ['insecure.local', '.insecure.local']
}Yields the following krb5.conf:
[logging]
default = FILE:/var/log/krb5libs.log
default = SYSLOG
[libdefaults]
default_realm = INSECURE.LOCAL
permitted_enctypes = des-cbc-crc des-cbc-md5
allow_weak_crypto = true
[realms]
INSECURE.LOCAL = {
kdc = kdc1.insecure.local
kdc = kdc2.insecure.local
admin_server = kpasswd.insecure.local
}
[domain_realm]
insecure.local = INSECURE.LOCAL
.insecure.local = INSECURE.LOCAL
The previous example can also be written as follows:
include mit_krb5
include mit_krb5::loggingwith the following Hiera data:
---
mit_krb5::default_realm: 'INSECURE.LOCAL'
mit_krb5::allow_weak_crypto: true
mit_krb5::permitted_enctypes:
- 'des-cbc-crc'
- 'des-cbc-md5'
mit_krb5::logging::default:
- 'FILE:/var/log/krb5libs.log'
- 'SYSLOG'
mit_krb5::realms:
'INSECURE.LOCAL':
kdc:
- 'kdc1.insecure.local'
- 'kdc2.insecure.local'
admin_server: 'kpasswd.insecure.local'
mit_krb5::domain_realms:
'INSECURE.LOCAL':
domains:
- 'insecure.local'
- '.insecure.local'class { 'mit_krb5::install': }
class { 'mit_krb5':
default_realm => 'EXAMPLE.COM',
dns_lookup_realm => false,
dns_lookup_kdc => false,
ticket_lifetime => '24h',
renew_lifetime => '7d',
forwardable => true,
}
class { 'mit_krb5::logging':
default => 'FILE:/var/log/krb5libs.log',
kdc => 'FILE:/var/log/krb5kdc.log',
admin_server => 'FILE:/var/log/kadmind.log'
}
mit_krb5::realm { 'EXAMPLE.COM':
kdc => 'kerberos.example.com',
admin_server => 'kerberos.example.com'
}
mit_krb5::domain_realm { 'EXAMPLE.COM':
domains => ['.example.com', 'example.com']
}The module was structured into resources/classes that resemble the sections of krb5.conf.
Top-level class that installs MIT Kerberos and controls krb5.conf file. Class parameters are used to define top-level directives and contents of [libdefaults] section.
- include - (arrays allowed)
- includedir - (arrays allowed)
- module - (arrays allowed)
default_realm- Must be set to non-emptydefault_keytab_namedefault_tgs_enctypesdefault_tkt_enctypesdefault_ccache_namepermitted_enctypesallow_weak_cryptoclockskewignore_acceptor_hostnamek5login_authoritativek5login_directorykdc_timesynckdc_req_checksum_typeap_req_checksum_typesafe_checksum_typepreferred_preauth_typesccache_typecanonicalize(mit_krb5 1.11+ - RHEL6/wheezy only have 1.10)dns_canonicalize_hostnamedns_lookup_kdcdns_lookup_realmdns_fallbackrealm_try_domainsextra_addressesudp_preference_limitverify_ap_req_nofailticket_lifetimerenew_lifetimenoaddressesforwardableproxiablerdnsplugin_base_dir
krb5_conf_path- Path to krb5.conf (default: /etc/krb5.conf)krb5_conf_owner- Owner of krb5.conf (default: root)krb5_conf_group- Group of krb5.conf (default: root)krb5_conf_mode- Mode of krb5.conf (default: 0444)
alter_etc_services- Should kerberos udp and tcp entries be managed in/etc/services(default:false)
Class to install Kerberos client package(s). This class is included from mit_krb5. If you wish to set the packages parameter, do so before declaring/including mit_krb5 or use hiera.
packages- Override facter-derived defaults for Kerberos packages (default: undef)
Resource to add entries to the [realms] section.
Realm name is specified by resource title
kdc- (arrays allowed)kpasswd_servermaster_kdcadmin_server- (arrays allowed)database_moduledefault_domainv4_instance_convertv4_name convertsv4_realmauth_to_local_namesauth_to_localpkinit_anchorspkinit_poolrotate_servers- Whether to apply a random rotation to the list of KDCs and admin servers so that the server usage is more evenly distributed. (Default:false)
Class to configure [logging] section
default- (arrays allowed)defaults- Replacesdefaultparameter (for use in Puppet 2.7)admin_server- (arrays allowed)kdc- (arrays allowed)
Resource to add entries to [domain_realm] section.
domains- Domains to be mapped into realm - (arrays allowed)realm- Realm to map into - (default: resource title)
Resource to add entries to [appdefaults] section.
Currently, this module only supports this format of appdefaults:
application = {
option1 = value
option2 = value
}
or
realm = {
option = value
}
debugticket_lifetimerenew_lifetimeforwardablekrb4_convertignore_afs
The following appdefaults section
[appdefaults]
EXAMPLE.ORG = {
forwardable = false
}
could be obtained with
::mit_krb5::appdefaults { 'EXAMPLE.ORG':
forwardable => false
}Class to configure [dbmodules] section
- db_module_dir
Per realm:
- database_name
- db_library
- disable_last_success
- disable_lockout
- ldap_cert_path
- ldap_conns_per_server
- ldap_kadmind_dn
- ldap_kdc_dn
- ldap_kerberos_container_dn
- ldap_servers (arrays allowed)
- ldap_service_password_file
Resource to add entries to [plugins] section.
Allowed subsections:
- ccselect
- pwqual
- kadm5_hook
- clpreauth
- kdcpreauth
- hostrealm
- localauth
Allowed parameters per subsection:
- disable
- enable_only
- module
The following plugins section (used to disable k5identity)
[plugins]
ccselect = {
disable = k5identity
}
could be obtained with
::mit_krb5::plugins { 'ccselect':
disable => 'k5identity',
}Configuration sections other than those listed above are not yet supported. This includes:
capathsdbdefaultslogin
Stub classes for those sections exist but will throw an error.
Apache License, Version 2.0
This module was initially created by Patrick Mooney (@pfmooney) and forked by CC-IN2P3 in Oct. 2014.
Please report issues or submit a pull request.