logo_kerberos.gif

Difference between revisions of "Projects/Enctype config enhancements"

From K5Wiki
Jump to: navigation, search
(Implementation and Testing Notes)
(Implementation and Testing Notes)
Line 55: Line 55:
   
 
For enctype families, it will probably be convenient to expand the etype definitions in etypes.c with a family string for each enctype (NULL for enctypes which do not belong to a family), and add an API to get the family of an enctype.
 
For enctype families, it will probably be convenient to expand the etype definitions in etypes.c with a family string for each enctype (NULL for enctypes which do not belong to a family), and add an API to get the family of an enctype.
 
To efficiently process enctype lists, it will probably be convenient to use a boolean vector with one entry per enctype. To do this we need a maximum enctype number, which will probably be a new constant in k5-int.h. If a new enctype is defined without updating this constant, it will be obvious since the new enctype won't be enabled by the processing functions.
 
   
 
==Review==
 
==Review==

Revision as of 14:31, 27 July 2009

An announcement has been sent to krbdev@mit.edu starting a review of this project. That review will conclude on July 30, 2009.

Comments can be sent to krbdev@mit.edu.


Goals

At present, the only way to specify a non-default enctype list is to explicitly list every enctype. This means that a configuration file with such an explicit list will inherently become out of date when future software releases update the default enctype lists.

The goal of this project is to improve the administrator experience in specifying enctypes. A primary goal is to make it possible to modify the default list of enctypes without replacing it. A secondary goal is to make enctype specifications easier and clearer.

As a side benefit of the design, there will be a simplification of salt handling in the KDC, which will eventually have positive ramifications for principal renaming and principal canonicalization.

Design

1. Modifying the default enctype list

The following syntaxes will be added for the three enctype variables default_tgs_enctypes, default_tgt_enctypes, and permitted_enctypes.

  • The word DEFAULT will expand to the default list of enctypes for that variable.
  • The specifier -enctype will remove enctype from the list of enctypes expanded so far.
  • The specifier +enctype will expand to enctype -- the + is a no-op for clarity purposes.

Examples of enctype specifications using these syntaxes are:

permitted_enctypes = DEFAULT +des-cbc-crc
default_tgs_enctypes = DEFAULT -arcfour-hmac

2. Enctype families

The following non-overlapping enctype families will be defined:

  • des: des-cbc-crc des-cbc-md4 des-cbc-md5
  • des3: des3-cbc-sha1
  • rc4: rc4-hmac-md5
  • aes: aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96

In general, families are named after ciphers (or in the case of AES, the pair of ciphers AES-128 and AES-256), and include all enctypes from the krb5 default permitted enctypes list which make use of that cipher. "Unreasonable" enctypes such as exportable RC4 and raw-mode DES are not included in families.

In an enctype list, a cipher family will be expanded to the corresponding list of enctypes, and -family will remove all enctypes from family from the list of enctypes expanded so far. Examples could include:

permitted_enctypes = DEFAULT -des
default_tgs_enctypes = DEFAULT -aes aes256-cts

3. supported_enctypes

There is a fourth enctype variable, supported_enctypes, which contains a list of enctype:salttype specifications. The salt types make it awkward to apply the above syntax extensions to this variable. So there were will be no change to the handling of this variable.

The back-burnered project Projects/Random_Salt_Generation would allow this variable to use the same syntax as the other enctype variables.

Implementation and Testing Notes

Currently the three etype variables are processed by a static function in init_ctx.c named get_profile_etype_list. This project will probably create a subsidiary non-static function in with a name like krb5int_expand_etype_list which does the string processing part of that function. A new unit test program t_enctypes.c can use this function to exercise the code for modifying the enctype list and expanding families.

For enctype families, it will probably be convenient to expand the etype definitions in etypes.c with a family string for each enctype (NULL for enctypes which do not belong to a family), and add an API to get the family of an enctype.

Review

This section documents the review of the project according to Project policy. It is divided into multiple sections. First, approvals should be listed. To list an approval type

#~~~~

on its own line. The next section is for summarizing discussion, which should take place on krbdev@mit.edu. Provide links to the archive at http://mailman.mit.edu/pipermail/krbdev/ if appropriate. Blocking objections can be noted with {{project-block}}.

Approvals

Discussion