[logging]
 default = FILE:/var/log/krb5libs.log
 kdc = FILE:/var/log/krb5kdc.log
 admin_server = FILE:/var/log/kadmind.log

[libdefaults]
 default_realm = {{ ipa_realm }}
 rdns = false
 dns_canonicalize_hostname = false
 dns_lookup_realm = false
 dns_lookup_kdc = false
 ticket_lifetime = 24h
 renew_lifetime = 7d
 forwardable = true

[realms]
 {{ ipa_realm }} = {
{% if ansible_distribution_major_version|default(0)|int == 6 and ansible_distribution == "RedHat" %}
  kdc = {{ ipa_server }}
{% else %}
  kdc = https://id{{ env_suffix }}.fedoraproject.org/KdcProxy
{% endif %}
{% if (ansible_hostname|default('')).startswith('koji') %}
  # This maps "A/B@FP.O" to "A/B@FP.O", and is used for gss localname in koji gssapi
  auth_to_local = RULE:[2:$1/$2@$0](.*)
  auth_to_local = DEFAULT
{% endif %}
 }

[domain_realm]
 .fedoraproject.org = FEDORAPROJECT.ORG
 fedoraproject.org = FEDORAPROJECT.ORG
{% if env == "staging" %}
 .stg.{{ datacenter }}.fedoraproject.org = STG.FEDORAPROJECT.ORG
{% endif %}
 .stg.fedoraproject.org = STG.FEDORAPROJECT.ORG
 stg.fedoraproject.org = STG.FEDORAPROJECT.ORG
