hdb: Move virtual principals into HDB layer

This is a large commit that adds several features:

 - Revamps and moves virtual host-based service principal functionality
   from kdc/ to lib/hdb/ so that it may be automatically visible to
   lib/kadm5/, as well as kadmin(1)/kadmind(8) and ktutil(1).

   The changes are backwards-incompatible.

 - Completes support for documenting a service principal's supported
   enctypes in its HDB entry independently of its long-term keys.  This
   will reduce HDB bloat by not requiring that service principals have
   more long-term keys than they need just to document the service's
   supported enctypes.

 - Adds support for storing krb5.conf content in principals' HDB
   entries.  This may eventually be used for causing Heimdal KDC
   services to reconfigure primary/secondary roles automatically by
   discovering the configured primary in an HDB entry for the realm.

   For now this will be used to help reduce the amount of configuration
   needed by clients of an upcoming HTTP binding of the kadmin service.
This commit is contained in:
Nicolas Williams
2020-08-24 16:16:59 -05:00
parent ef06b94132
commit 5447b81fb1
50 changed files with 4017 additions and 530 deletions

View File

@@ -73,6 +73,9 @@
#define KRB5_KDB_TRUSTED_FOR_DELEGATION 0x00020000
#define KRB5_KDB_ALLOW_KERBEROS4 0x00040000
#define KRB5_KDB_ALLOW_DIGEST 0x00080000
#define KRB5_KDB_MATERIALIZE 0x00100000
#define KRB5_KDB_VIRTUAL_KEYS 0x00200000
#define KRB5_KDB_VIRTUAL 0x00400000
#define KADM5_PRINCIPAL 0x000001U
#define KADM5_PRINC_EXPIRE_TIME 0x000002U
@@ -141,6 +144,9 @@ typedef struct _krb5_tl_data {
#define KRB5_TL_ALIASES 0x000a
#define KRB5_TL_HIST_KVNO_DIFF_CLNT 0x000b
#define KRB5_TL_HIST_KVNO_DIFF_SVC 0x000c
#define KRB5_TL_ETYPES 0x000d
#define KRB5_TL_KEY_ROTATION 0x000e
#define KRB5_TL_KRB5_CONFIG 0x000f
typedef struct _kadm5_principal_ent_t {
krb5_principal principal;