If default user authentication type is set to a list that does not include a password or a hardened credential, the resulting configuration might be incorrect for special service principals, including a krbtgt/.. one. Add detection of special principals to avoid these situations and always allow password or hardened for services. Special handling is needed for the following principals: - krbtgt/.. -- TGT service principals - K/M -- master key principal - kadmin/changepw -- service for changing passwords - kadmin/kadmin -- kadmin service principal - kadmin/history -- key used to encrypt history Additionally, implicitly allow password or hardened credential use for IPA services and IPA hosts since applications typically use keytabs for that purpose. Fixes: https://pagure.io/freeipa/issue/9485 Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: Francisco Trivino <ftrivino@redhat.com>
This is the ipa krb5kdc database backend. As the KDB interfaces heavily with krb5, we inherit its code style as well. However, note the following changes: - no modelines (and different file preamble) - return types don't require their own line - single-statement blocks may optionally be braced - /* and */ do not ever get their own line - C99 for-loops are permitted (and encouraged) - a restricted set of other C99 features are permitted In particular, variable-length arrays, flexible array members, compound literals, universal character names, and //-style comments are not permitted. Use of regular malloc/free is preferred over talloc for new code. By and large, existing code mostly conforms to these requirements. New code must conform to them.