Skip to content

Conversation

@DirectXMan12
Copy link
Member

This introduces both low-level and high-level support for RFC 6680.
In order for the for the attribute methods to run, the greet_client example
authdata plugin must be installed. Otherwise, the attribute tests will be automatically
skipped.

Further explanation for how the low- and high-level APIs work may be found in
the commit messages.

@frozencemetery
Copy link
Member

By itself, this looks good to me. More work needs to be done getting the greet_client integrated into our test process (I expect this is my problem), and the 1.10 stuff needs to be resolved as well before we can merge, I think.

@DirectXMan12 DirectXMan12 force-pushed the feature/rfc6680 branch 2 times, most recently from d00deea to 71e6566 Compare March 10, 2015 18:31
@frozencemetery
Copy link
Member

Okay, I like the way the 1.10 fix looks. This seems good to me.

This commit introduces optional support for RFC 6680 to
the low-level API.  The `get_name_attribute` and
`set_name_attribute` methods adhere to the pseudo-API
(which uses a single call to get/set multiple values
on a single attribute) instead of the C bindings
(which require the use of a state variable to get
multiple values, and require multiple calls to
add multiple values to a single attribute).

Note that gss_display_name_ext is not tested, since
it is not implemented by MIT krb5.  Additionally,
in order to test the get/set/delete attribute methods,
you will have to install the demo greet plugin that
comes with krb5.  Otherwise, the tests will be skipped.

Part of #4

Also-Authored-By: Simo Sorce <simo@redhat.com>
This commit introduces optional support for RFC 6680 to
the high-level API.

For attribute access, a new property named `attributes` was
introduced to the Name class.  This presents a `MutableMapping`
interface to the Name's attributes.  When iterables are assigned
to attributes (not including strings and bytes), they are considered
to be multiple values to be assigned to the attribute.  Additionally,
attribute names (but not values) are automatically encoded if they
are in text (and not bytes) form

For inquiry, appropriate properties were added to the `Name` class
(`is_mech_name` and `mech`).  `display_as` may be used to call
`display_name_ext`, and a `composite` argument was introduced to
both the `export` method and the constructor.

Closes #4
@DirectXMan12 DirectXMan12 merged commit 16f0102 into master Mar 17, 2015
@DirectXMan12 DirectXMan12 deleted the feature/rfc6680 branch March 17, 2015 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants