<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://k5wiki.test.kerberos.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Simo</id>
		<title>K5Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://k5wiki.test.kerberos.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Simo"/>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki/Special:Contributions/Simo"/>
		<updated>2026-05-14T17:19:49Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.4</generator>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/ProxyGSSAPI&amp;diff=5834</id>
		<title>Projects/ProxyGSSAPI</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/ProxyGSSAPI&amp;diff=5834"/>
				<updated>2017-05-23T12:37:53Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': The actual project is now hosted and documented at: https://pagure.io/gssproxy&lt;br /&gt;
&lt;br /&gt;
This project is about creating a mechanism by which it is possible to proxy accepting and initializing a security context to a separate trusted system service without giving access to long term keys to an application.&lt;br /&gt;
The proxy would be created at the mechglue layer so that any mechanism can be proxied.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
We have identified two main scenarios that benefit from this approach.&lt;br /&gt;
&lt;br /&gt;
One is the ability to lock long term keys (especially the host/ key when the krb5 mechanism is used) into a trusted service on the system so that &amp;quot;less&amp;quot; trusted applications do not have direct access to the keys. This is a form of privilege separation that allows better control of the keys and reduces the attack surface of the system when it comes to gaining access to such keys.&lt;br /&gt;
&lt;br /&gt;
The other is about trusting data being carried through, for example, krb5 tickets. In systems that use signed authorization data, it is fundamental for a &amp;quot;trusted&amp;quot; service to directly handle accepting a context so that it is impossible for an application to &amp;quot;fake&amp;quot; Authorization data by having access to the host keys and therefore being able to sign authorization data blobs.&lt;br /&gt;
As an example think of a user accessing a FTP daemon and sending a user credentials (MS-PAC/PAD) in the ticket. A trusted service need to be able to verify that the KDC actually did sign this data in order to trust its authenticity and allow the system to create a user out of this data. A way to fully trust this data when it is signed by the long term key is to not allow the FTP service to have access to the long term keys, so that a subverted service is not allowed to create fake data and sign it in order to perform privilege elevation attacks.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
In order to be able to implement this proxy it is fundamental to be able to create an IPC mechanism to transfer data from the process handling the GSSAPI exchange to the trusted service holding the keys and negotiating the security context.&lt;br /&gt;
&lt;br /&gt;
This IPC mechanism should use a defined protocol so that independent implementations of the trusted service can be created.&lt;br /&gt;
&lt;br /&gt;
Interface stability either at an API level (if an endpoint library is created) or at the protocol level is highly desirable but not fundamental.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Considerations on the design =&lt;br /&gt;
&lt;br /&gt;
There are a few challenges that need to be considered for this project.&lt;br /&gt;
&lt;br /&gt;
== Access privileges ==&lt;br /&gt;
&lt;br /&gt;
Currently access to credentials is determined base on file permissions. If the user/application have access to the keytab/credentials then it is allowed to use them for any purpose. By adding an IPC mechanism we need to also add a mechanism to determine what privileges the calling in process have.&lt;br /&gt;
&lt;br /&gt;
One way to do this is by replicating the permission model on keytab files as permission on the directories containing the unix socket. One directory per credential/keytab with file system permissions et so only processes belonging to the user owner can access the IPC pipe.&lt;br /&gt;
On some systems it is also possible to inspect the credentials of the connecting process via special system calls on the socket. On those systems it is possible to decide to use a single socket and perform access control in the daemon.&lt;br /&gt;
&lt;br /&gt;
== What to proxy ? ==&lt;br /&gt;
&lt;br /&gt;
There are a few ways the proxy code can be designed.&lt;br /&gt;
&lt;br /&gt;
a) Proxy everything unconditionally in any case&lt;br /&gt;
b) Have a flag or method call that can tell which mechanisms to proxy&lt;br /&gt;
c) Proxy on a per application based on per application configuration&lt;br /&gt;
&lt;br /&gt;
Each of them may be desirable but there are a few drawbacks with each approach:&lt;br /&gt;
&lt;br /&gt;
With (a) it may turn out that the mechanism will need access to long term secrets even after the security context has been established. That could be handled by passing in the long term keys with the export/import credentials function that is needed to transfer session keys.&lt;br /&gt;
This would render privilege separation useless though. Another option would be to provide extensions so mechanism can delegate these operation to the proxy, but this looks tricky.&lt;br /&gt;
&lt;br /&gt;
With (b), mechanisms that cannot easily be proxied could be marked as such and not proxied. The issue here is that there are meta-mechs like SPNEGO that would have to deal with the saem flags and change behavior dynamically based on which mech is being probed. It is not unconceivable to make meta-mechs smart enough to do that but probably too much for a first release.&lt;br /&gt;
&lt;br /&gt;
The problem with (c) is that it may require application changes to add the desired option, and in general you want a global policy. However a simplistic method to check whether to proxy or not could be for the GSSAPI to check if direct access to credentials is available and skip proxying in case direct access is possible.&lt;br /&gt;
&lt;br /&gt;
== RPC mechanism ==&lt;br /&gt;
&lt;br /&gt;
In order to proxy data around the IPC pipes need to be able to (un)marshal data back and forth.&lt;br /&gt;
There are a few options I can see to handle messaging.&lt;br /&gt;
&lt;br /&gt;
After careful considreation it has been decided to use SUNRPC/XDR as the transport. The actual proxy server does not register to a RPC endpoint mapper but otherwise uses full RPC format on the wire and XDR encoding.&lt;br /&gt;
&lt;br /&gt;
The actual protocol has been assigned number 400112 and is being documented in the [https://pagure.io/gssproxy/blob/master/f/proxy/docs/ProtocolDocumentation.md gss-proxy project]&lt;br /&gt;
&lt;br /&gt;
The resons for choosing RPC/XDR were multiple.&lt;br /&gt;
* It is a wellknown encoding with a reasonable description language and a compiler for RPC stubs.&lt;br /&gt;
* Most krb5 projects already have bultin facilities to handle this protocol.&lt;br /&gt;
* Most kernels also already have support for handling SUNRPC/XDR from the NFS code.&lt;br /&gt;
&lt;br /&gt;
The last point is relevant due to the fact that the Gss-Proxy concept aligns quite well also to the Kernel case where supporting GSSAPI authentication for NFS or CIFS server/clients is valuable but embedding a whle gss library is excessive. In this case using the gss-proxy protocol directly allows to use basic gssapi services easily without having to implement a full gssapi library in kernel.&lt;br /&gt;
A proof of concept implementation for using part of the protocol in the Linux kernel has been implemented and posted to LKML.&lt;br /&gt;
&lt;br /&gt;
== Additional Considerations ==&lt;br /&gt;
&lt;br /&gt;
The GSSAPI design is currently completely synchronous. By adding an IPC communication venue we increase the risk of stalling the application by blocking on socket operations while waiting for the trusted service to be scheduled and perform the needed operations.&lt;br /&gt;
Although this is not always desirable as it add latency, other parts of GSSAPI can add latency during accept/init phases. Some mechanism for example may perform blocking netowrk operations like DNS lookups as well.&lt;br /&gt;
Considering that the accept/init phases usually represent a very tiny amount of time compared to the life of a secured connection and considering that most of the time the connection setup already suffers from network latencies we think this is acceptable at this stage. Application can mitigate issues with blocking operations by confining GSSAPI related handling into a separate thread.&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
(Draft)&lt;br /&gt;
&lt;br /&gt;
The two main hooks for this functionality will be implemented in gss_accept_sec_context() for accepting 3rd party initiate security negotiations and gss_init_sec_context() for initializing a security context on the application behalf.&lt;br /&gt;
&lt;br /&gt;
= Milestones =&lt;br /&gt;
&lt;br /&gt;
* Introduce new RPC library with stub generator/IDL compiler&lt;br /&gt;
* Define the RPC interfaces to be implemented&lt;br /&gt;
* Introduce a new meta-mechanism that implements the client side of the proxy&lt;br /&gt;
* Create a simple server program for testing purposes&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
&lt;br /&gt;
See https://pagure.io/gssproxy&lt;br /&gt;
&lt;br /&gt;
= Dependencies =&lt;br /&gt;
&lt;br /&gt;
Interposer mechglue plugin mechanism&lt;br /&gt;
&lt;br /&gt;
= Goal =&lt;br /&gt;
&lt;br /&gt;
Have a working prototype for the 1.11 release&lt;br /&gt;
&lt;br /&gt;
= Testing Plan =&lt;br /&gt;
&lt;br /&gt;
Built client and server code as part of the GSS-Proxy project.&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Improve_GSSAPI_mechanism_configuration&amp;diff=5237</id>
		<title>Projects/Improve GSSAPI mechanism configuration</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Improve_GSSAPI_mechanism_configuration&amp;diff=5237"/>
				<updated>2013-10-18T18:16:05Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
{{project-target|1.13}}&lt;br /&gt;
&lt;br /&gt;
==Requirements and scope==&lt;br /&gt;
&lt;br /&gt;
The GSSAPI mechglue allows the installation of additional mechanisms, these mechanisms are currently sourced from the file /etc/gss/mech at library load time.&lt;br /&gt;
&lt;br /&gt;
In order to improve management of additional mechanism as separate packages for distributions it would be easier if ech package could drop a configuration fragment in a separate file to activate a new installed plugin instead of changing a signle configuration file.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
&lt;br /&gt;
A new directory owned by the GSSAPI library is created in /etc/gss/mech.d&lt;br /&gt;
In this directory packages can drop configuration fragments that use the exact same configuration format of the current /etc/gss/mech file.&lt;br /&gt;
&lt;br /&gt;
After the main /etc/gss/mech file has been parsed, any file in this directory is opened and parsed to find additional mechanisms to load.&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Improve_GSSAPI_mechanism_configuration&amp;diff=5236</id>
		<title>Projects/Improve GSSAPI mechanism configuration</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Improve_GSSAPI_mechanism_configuration&amp;diff=5236"/>
				<updated>2013-10-18T18:15:36Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: New page:  ==Requirements and scope==  The GSSAPI mechglue allows the installation of additional mechanisms, these mechanisms are currently sourced from the file /etc/gss/mech at library load time. ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
==Requirements and scope==&lt;br /&gt;
&lt;br /&gt;
The GSSAPI mechglue allows the installation of additional mechanisms, these mechanisms are currently sourced from the file /etc/gss/mech at library load time.&lt;br /&gt;
&lt;br /&gt;
In order to improve management of additional mechanism as separate packages for distributions it would be easier if ech package could drop a configuration fragment in a separate file to activate a new installed plugin instead of changing a signle configuration file.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
&lt;br /&gt;
A new directory owned by the GSSAPI library is created in /etc/gss/mech.d&lt;br /&gt;
In this directory packages can drop configuration fragments that use the exact same configuration format of the current /etc/gss/mech file.&lt;br /&gt;
&lt;br /&gt;
After the main /etc/gss/mech file has been parsed, any file in this directory is opened and parsed to find additional mechanisms to load.&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Keyring_collection_cache&amp;diff=5210</id>
		<title>Projects/Keyring collection cache</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Keyring_collection_cache&amp;diff=5210"/>
				<updated>2013-08-28T20:50:44Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: /* New credential cache collection schema */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
= Scope =&lt;br /&gt;
&lt;br /&gt;
Augment the KEYRING ccache type to support collections, and to support a new type of key which persists across multiple user login sessions until the ticket expires.&lt;br /&gt;
&lt;br /&gt;
= Background and previous work =&lt;br /&gt;
&lt;br /&gt;
The MIT Kerberos code base already include a KEYRING ccache type that uses kernel keyrings to implement a credential cache modeled after the FILE cache type.&lt;br /&gt;
This cache type has 3 important limitations:&lt;br /&gt;
* It uses only session, process, or thread based keyrings.  This means the cache cannot survive a user logout and cannot be shared between different sessions of the same user.&lt;br /&gt;
* It uses the classic &amp;quot;user&amp;quot; key type.  The &amp;quot;user&amp;quot; key type is limited in size because it uses non-swappable memory, so it has issues storing large tickets (like those including MS-PAC authdata) due to strict default quotas on this type of key.&lt;br /&gt;
* It cannot represent cache collections.&lt;br /&gt;
&lt;br /&gt;
== Current keyring cache format ==&lt;br /&gt;
&lt;br /&gt;
The current implementation creates a new keyring named after the residual and links it to either the session, process, or thread special keyrings.&lt;br /&gt;
&lt;br /&gt;
This keyring contains one special key named &amp;quot;__krb5_princ__&amp;quot; which contains the ccache principal name.  Each credential is stored as a separate key in the same keyring.  The __krb5_princ__ key and the credential keys use the &amp;quot;user&amp;quot; key type and contain serialized representations of the principal name or credential as appropriate.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
KRB5CCNAME=KEYRING:testccache&lt;br /&gt;
 session&lt;br /&gt;
  \_testccache&lt;br /&gt;
     \_ __krb5_princ__&lt;br /&gt;
     \_ krbtgt/TEST.KERBEROS.ORG@TEST.KERBEROS.ORG&lt;br /&gt;
     \_ krb5_ccache_conf_data/fast_avail/krbtgt\/TEST.KERBEROS.ORG\@TEST.KERBEROS.ORG@X-CACHECONF&lt;br /&gt;
     \_ krb5_ccache_conf_data/pa_type/krbtgt\/TEST.KERBEROS.ORG\@TEST.KERBEROS.ORG@X-CACHECONF&lt;br /&gt;
     \_ HTTP/http.test.kerberos.org@TEST.KERBEROS.ORG&lt;br /&gt;
     \_ ...&lt;br /&gt;
&lt;br /&gt;
= Design components =&lt;br /&gt;
&lt;br /&gt;
== Linux Kernel improvements ==&lt;br /&gt;
&lt;br /&gt;
Addition of a new key type &amp;quot;big_key&amp;quot; that allows us to create keys up to 1MiB in size, backed by internal kernel tmpfs, allowing the&lt;br /&gt;
contents to be swapped out to disk (unlike most other keyrings, which remain in unswappable kernel memory).&lt;br /&gt;
&lt;br /&gt;
Creation of a new public interface, keyctl_get_persistent.  This API allows the user or a privileged process to access keys for a specified UID.  This keyring is not tied to a session, so it can outlive a login session if there is a need to perform actions while not logged in, via a cron scripts or similar.  This kernel keyring is created automatically on the first request if it does not yet exist.&lt;br /&gt;
&lt;br /&gt;
Proposed patches by David Howells with explanatory comments on the kernel krbcache keyring:&lt;br /&gt;
http://mailman.mit.edu/pipermail/krbdev/2013-August/011650.html&lt;br /&gt;
(note now renamed to 'persistent')&lt;br /&gt;
&lt;br /&gt;
== Augmenting the current KEYRING cache type ==&lt;br /&gt;
&lt;br /&gt;
The current keyring ccache type accepts the following residual forms:&lt;br /&gt;
&lt;br /&gt;
* KEYRING:&amp;lt;name&amp;gt;&lt;br /&gt;
* KEYRING:process:&amp;lt;name&amp;gt;&lt;br /&gt;
* KEYRING:thread:&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;name&amp;gt; is an arbitrary string.  The first form implies the use of a session keyring.&lt;br /&gt;
&lt;br /&gt;
libkrb5 will now accept new forms for the residual string:&lt;br /&gt;
&lt;br /&gt;
* KEYRING:session:&amp;lt;name&amp;gt;&lt;br /&gt;
* KEYRING:user:&amp;lt;name&amp;gt;&lt;br /&gt;
* KEYRING:persistent:&amp;lt;uidnumber&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All residual forms will support cache collections.&lt;br /&gt;
&lt;br /&gt;
The session and user keyrings use the session and user keyrings respectively.  The new &amp;quot;persistent&amp;quot; form uses a special keyring as provided by the new keyutils call keyctl_get_persistent().  It requires support from the kernel for this new type; otherwise, it will fall back to the user keyring and the &amp;quot;user&amp;quot; key type.&lt;br /&gt;
&lt;br /&gt;
Individual ccaches within the collection are identified and displayed by appending the specific ccache keyring name to the main residual.  For example:&lt;br /&gt;
&lt;br /&gt;
  KEYRING:persistent:123:krb_ccache_WE324ffdX&lt;br /&gt;
&lt;br /&gt;
== New credential cache collection schema ==&lt;br /&gt;
&lt;br /&gt;
All KEYRING types become collection enabled.  The only difference between the various types is where the cache keyrings are linked into.&lt;br /&gt;
Each credential cache in the collection has a name of the form &amp;quot;krb_ccache_XXXXXX&amp;quot;, where XXXXXX is a unique string.  The name of the currently active ccache is stored into a key named &amp;quot;krb_ccache:primary&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For the &amp;quot;thread&amp;quot;, &amp;quot;process&amp;quot;, &amp;quot;session&amp;quot;, and &amp;quot;user&amp;quot; residual forms, the ccache keyring is stored in a keyring named &amp;quot;_krb_&amp;lt;name&amp;gt;&amp;quot; where &amp;lt;name&amp;gt; is the main part of the residual and linked into the appropriate special keyring.  For the &amp;quot;persistent&amp;quot; form, the ccache keyring is named &amp;quot;_krb&amp;quot; and is linked to the persistent keyring.  For backwards compatibility, the classic session residual form (the one identified by KEYRING:&amp;lt;name&amp;gt;) uses the &amp;lt;name&amp;gt; part of the residual for the first cache too, and the first ccache is linked both in the session keyring directly as well as the &amp;quot;_krb_&amp;lt;name&amp;gt;&amp;quot; collection keyring.&lt;br /&gt;
&lt;br /&gt;
The format of a ccache keyring is unchanged from the classic scheme.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
* KRB5CCNAME=KEYRING:testccache&lt;br /&gt;
 session&lt;br /&gt;
  \_ testccache&lt;br /&gt;
      \_ __krb5_princ__&lt;br /&gt;
      \_ krbtgt/TEST.KERBEROS.ORG@TEST.KERBEROS.ORG&lt;br /&gt;
      \_ ...&lt;br /&gt;
  \_ _krb_testccache&lt;br /&gt;
      \_ testccache &amp;lt;link to the key above&amp;gt;&lt;br /&gt;
      \_ krb_ccache_WQRQWTQ3&lt;br /&gt;
      \_ ...&lt;br /&gt;
      \_ krb_ccache:primary (points to testccache at collection cration)&lt;br /&gt;
&lt;br /&gt;
* KRB5CCNAME=KEYRING:user:testusercc&lt;br /&gt;
 user&lt;br /&gt;
  \_ _krb_testusercc&lt;br /&gt;
      \_ krb_ccache_12WEF43f2&lt;br /&gt;
          \_ __krb5_princ__&lt;br /&gt;
          \_ krbtgt/TEST.KERBEROS.ORG@TEST.KERBEROS.ORG&lt;br /&gt;
          \_ ...&lt;br /&gt;
      \_ krb_ccache_fdgsER324&lt;br /&gt;
      \_ ...&lt;br /&gt;
      \_ krb_ccache:primary (krb_ccache_12WEF43f2)&lt;br /&gt;
&lt;br /&gt;
* KRB5CCNAME=KEYRING:persistent:123&lt;br /&gt;
 _persistent.123&lt;br /&gt;
  \_ _krb&lt;br /&gt;
      \_ krb_ccache_12WEF43f2&lt;br /&gt;
          \_ __krb5_princ__&lt;br /&gt;
          \_ krbtgt/TEST.KERBEROS.ORG@TEST.KERBEROS.ORG&lt;br /&gt;
          \_ ...&lt;br /&gt;
      \_ krb_ccache_fdgsER324&lt;br /&gt;
      \_ ...&lt;br /&gt;
      \_ krb_ccache:primary (krb_ccache_12WEF43f2)&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Keyring_collection_cache&amp;diff=5205</id>
		<title>Projects/Keyring collection cache</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Keyring_collection_cache&amp;diff=5205"/>
				<updated>2013-08-20T18:51:58Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: /* New Credential Cache Collection schema */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
= Scope =&lt;br /&gt;
&lt;br /&gt;
Implement a new Kernel based credential cache collection that uses the Keys API.&lt;br /&gt;
&lt;br /&gt;
The new cahe type is a collection and is store in a per-user keyring avaialble to any user session and that can persist in the system until expiration time even in the absence of an active user session.&lt;br /&gt;
&lt;br /&gt;
= Background and previous work =&lt;br /&gt;
&lt;br /&gt;
The MIT Kerberos code base already include a KEYRING ccache type that uses kernel keyrings to implement a credential cache modeled after the FILE cache type.&lt;br /&gt;
This cache type has 3 important limitations:&lt;br /&gt;
* Uses only session or process or thread based keyrings&lt;br /&gt;
This means the cache cannot survive a user logout and cannot be shared between different sessions of the same user.&lt;br /&gt;
* Uses the classic &amp;quot;user&amp;quot; key type&lt;br /&gt;
The &amp;quot;user&amp;quot; keytype is limited in size because use kernel locked memory so it has issues storing large tickets (like those including a MS-PAC AD) due to strict default quotas on this type of key&lt;br /&gt;
* It cannot represent cache collections.&lt;br /&gt;
&lt;br /&gt;
== Current Keyring cache format ==&lt;br /&gt;
&lt;br /&gt;
The current implementation creates a new keyring named after the residual and links it to the session/process/thread special keyrings.&lt;br /&gt;
&lt;br /&gt;
This keyring contains one spaecial key named __krb5_princ__ that contain the ccache principal name.&lt;br /&gt;
Then each credential is stored as a separate key in the same keyring.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
KRB5CCNAME=KEYRING:testccache&lt;br /&gt;
 session&lt;br /&gt;
  \_testccache&lt;br /&gt;
     \_ __krb5_princ__&lt;br /&gt;
     \_ krbtgt/TEST.KERBEROS.ORG@TEST.KERBEROS.ORG&lt;br /&gt;
     \_ krb5_ccache_conf_data/fast_avail/krbtgt\/TEST.KERBEROS.ORG\@TEST.KERBEROS.ORG@X-CACHECONF&lt;br /&gt;
     \_ krb5_ccache_conf_data/pa_type/krbtgt\/TEST.KERBEROS.ORG\@TEST.KERBEROS.ORG@X-CACHECONF&lt;br /&gt;
     \_ HTTP/http.test.kerberos.org@TEST.KERBEROS.ORG&lt;br /&gt;
     \_ ...&lt;br /&gt;
&lt;br /&gt;
= DesignComponents =&lt;br /&gt;
&lt;br /&gt;
== Linux Kernel improvements ==&lt;br /&gt;
&lt;br /&gt;
Addition of a new key type &amp;quot;big_key&amp;quot; that allows us to create keys&lt;br /&gt;
up to 1MiB in size, backed by internal kernel tmpfs, allowing the&lt;br /&gt;
contents to be swapped out to disk (unlike most other keyrings, which&lt;br /&gt;
remain in unswappable kernel memory).&lt;br /&gt;
&lt;br /&gt;
Creation of a new public interface, keyctl_get_persistent(uid_t,&lt;br /&gt;
key_serial_t id). This API allows the user (and certain privileged&lt;br /&gt;
root processes such as rpc.gssd and GSS-Proxy) to access the keys for&lt;br /&gt;
a particular UID. This keyring is not tied to a session (so it&lt;br /&gt;
can outlive a user on the system if there is the need to perform actions&lt;br /&gt;
while not logged in, such as cron scripts access to Secure NFS).&lt;br /&gt;
This kernel keyring is created automatically on the first request if it&lt;br /&gt;
does not yet exist.&lt;br /&gt;
&lt;br /&gt;
Proposed patches by David Howells with explanatory comments on the kernel krbcache keyring:&lt;br /&gt;
http://mailman.mit.edu/pipermail/krbdev/2013-August/011650.html&lt;br /&gt;
(note now renamed to 'persistent')&lt;br /&gt;
&lt;br /&gt;
== Augmenting the current KEYRING cache type ==&lt;br /&gt;
&lt;br /&gt;
The current keyring ccache type accepts the following residual forms:&lt;br /&gt;
* KEYRING:&amp;lt;name&amp;gt;&lt;br /&gt;
* KEYRING:process:&amp;lt;name&amp;gt;&lt;br /&gt;
* KEYRING:thread:&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where name is an arbitrary string.&lt;br /&gt;
The first type implies the use of a session keyring.&lt;br /&gt;
&lt;br /&gt;
libkrb5 will now accept a new values for the ccache name:&lt;br /&gt;
&lt;br /&gt;
* KEYRING:session:&amp;lt;name&amp;gt;&lt;br /&gt;
* KEYRING:user:&amp;lt;name&amp;gt;&lt;br /&gt;
* KEYRING:persistent:&amp;lt;uidnumber&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also all the keyrings will now allow to create cache collections.&lt;br /&gt;
&lt;br /&gt;
The session and user keyrings use the session and user's keyrings respecitively.&lt;br /&gt;
The new persistent type uses a special keyring as provided by the new keyutils call keyctl_get_persistent().&lt;br /&gt;
It requires support from the kernel for this new type otherwise it will fallback to use a user type keyring.&lt;br /&gt;
&lt;br /&gt;
Individual ccache are identified and displayed by appending the specific ccache keyring name to the main residual:&lt;br /&gt;
Example:&lt;br /&gt;
 KEYRING:persistent:123:krb_ccache_WE324ffdX&lt;br /&gt;
&lt;br /&gt;
== New Credential Cache Collection schema ==&lt;br /&gt;
&lt;br /&gt;
All KEYRING types become collection enabled, the only difference between the various types is where the ccache keyrings are linked into.&lt;br /&gt;
Each credential cache in the collection has a name of the form: krb_ccache_XXXXXX where XXXXXX is a random string and the name of the currently active ccache is stored into a key named krb_ccache:primary&lt;br /&gt;
&lt;br /&gt;
All ccache keyring are furthemore stored in a keyring named fater the &amp;lt;name&amp;gt; part of the residual for keyring ccache of thread,process,session,user types, while in the case of the persistent keyring a keyring named _krb is created under the persistent keyring. For backwards compatibility reason on runtime upgrade the classic session keyring type (the one identified by KWYRING:&amp;lt;name&amp;gt;) uses the &amp;lt;name&amp;gt; part of the residual for the first ccache, so all the other ccache reside directly in the session keyring alongside the first one.&lt;br /&gt;
&lt;br /&gt;
The format of a single ccache keyring is unchanged from the classic scheme.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
* KRB5CCNAME=KEYRING:testccache&lt;br /&gt;
 session&lt;br /&gt;
  \_ testccache&lt;br /&gt;
      \_ __krb5_princ__&lt;br /&gt;
      \_ krbtgt/TEST.KERBEROS.ORG@TEST.KERBEROS.ORG&lt;br /&gt;
      \_ ...&lt;br /&gt;
  \_ krb_ccache_WQRQWTQ3&lt;br /&gt;
  \_ ...&lt;br /&gt;
  \_ krb_ccache:primary (points to testccache at collection cration)&lt;br /&gt;
&lt;br /&gt;
* KRB5CCNAME=KEYRING:user:testusercc&lt;br /&gt;
 user&lt;br /&gt;
  \_ testusercc&lt;br /&gt;
      \_ krb_ccache_12WEF43f2&lt;br /&gt;
          \_ __krb5_princ__&lt;br /&gt;
          \_ krbtgt/TEST.KERBEROS.ORG@TEST.KERBEROS.ORG&lt;br /&gt;
          \_ ...&lt;br /&gt;
      \_ krb_ccache_fdgsER324&lt;br /&gt;
      \_ ...&lt;br /&gt;
      \_ krb_ccache:primary (krb_ccache_12WEF43f2)&lt;br /&gt;
&lt;br /&gt;
* KRB5CCNAME=KEYRING:persistent:123&lt;br /&gt;
 _persistent.123&lt;br /&gt;
  \_ _krb&lt;br /&gt;
      \_ krb_ccache_12WEF43f2&lt;br /&gt;
          \_ __krb5_princ__&lt;br /&gt;
          \_ krbtgt/TEST.KERBEROS.ORG@TEST.KERBEROS.ORG&lt;br /&gt;
          \_ ...&lt;br /&gt;
      \_ krb_ccache_fdgsER324&lt;br /&gt;
      \_ ...&lt;br /&gt;
      \_ krb_ccache:primary (krb_ccache_12WEF43f2)&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Keyring_collection_cache&amp;diff=5204</id>
		<title>Projects/Keyring collection cache</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Keyring_collection_cache&amp;diff=5204"/>
				<updated>2013-08-20T18:51:28Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: /* Augmenting the current KEYRING cache type */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
= Scope =&lt;br /&gt;
&lt;br /&gt;
Implement a new Kernel based credential cache collection that uses the Keys API.&lt;br /&gt;
&lt;br /&gt;
The new cahe type is a collection and is store in a per-user keyring avaialble to any user session and that can persist in the system until expiration time even in the absence of an active user session.&lt;br /&gt;
&lt;br /&gt;
= Background and previous work =&lt;br /&gt;
&lt;br /&gt;
The MIT Kerberos code base already include a KEYRING ccache type that uses kernel keyrings to implement a credential cache modeled after the FILE cache type.&lt;br /&gt;
This cache type has 3 important limitations:&lt;br /&gt;
* Uses only session or process or thread based keyrings&lt;br /&gt;
This means the cache cannot survive a user logout and cannot be shared between different sessions of the same user.&lt;br /&gt;
* Uses the classic &amp;quot;user&amp;quot; key type&lt;br /&gt;
The &amp;quot;user&amp;quot; keytype is limited in size because use kernel locked memory so it has issues storing large tickets (like those including a MS-PAC AD) due to strict default quotas on this type of key&lt;br /&gt;
* It cannot represent cache collections.&lt;br /&gt;
&lt;br /&gt;
== Current Keyring cache format ==&lt;br /&gt;
&lt;br /&gt;
The current implementation creates a new keyring named after the residual and links it to the session/process/thread special keyrings.&lt;br /&gt;
&lt;br /&gt;
This keyring contains one spaecial key named __krb5_princ__ that contain the ccache principal name.&lt;br /&gt;
Then each credential is stored as a separate key in the same keyring.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
KRB5CCNAME=KEYRING:testccache&lt;br /&gt;
 session&lt;br /&gt;
  \_testccache&lt;br /&gt;
     \_ __krb5_princ__&lt;br /&gt;
     \_ krbtgt/TEST.KERBEROS.ORG@TEST.KERBEROS.ORG&lt;br /&gt;
     \_ krb5_ccache_conf_data/fast_avail/krbtgt\/TEST.KERBEROS.ORG\@TEST.KERBEROS.ORG@X-CACHECONF&lt;br /&gt;
     \_ krb5_ccache_conf_data/pa_type/krbtgt\/TEST.KERBEROS.ORG\@TEST.KERBEROS.ORG@X-CACHECONF&lt;br /&gt;
     \_ HTTP/http.test.kerberos.org@TEST.KERBEROS.ORG&lt;br /&gt;
     \_ ...&lt;br /&gt;
&lt;br /&gt;
= DesignComponents =&lt;br /&gt;
&lt;br /&gt;
== Linux Kernel improvements ==&lt;br /&gt;
&lt;br /&gt;
Addition of a new key type &amp;quot;big_key&amp;quot; that allows us to create keys&lt;br /&gt;
up to 1MiB in size, backed by internal kernel tmpfs, allowing the&lt;br /&gt;
contents to be swapped out to disk (unlike most other keyrings, which&lt;br /&gt;
remain in unswappable kernel memory).&lt;br /&gt;
&lt;br /&gt;
Creation of a new public interface, keyctl_get_persistent(uid_t,&lt;br /&gt;
key_serial_t id). This API allows the user (and certain privileged&lt;br /&gt;
root processes such as rpc.gssd and GSS-Proxy) to access the keys for&lt;br /&gt;
a particular UID. This keyring is not tied to a session (so it&lt;br /&gt;
can outlive a user on the system if there is the need to perform actions&lt;br /&gt;
while not logged in, such as cron scripts access to Secure NFS).&lt;br /&gt;
This kernel keyring is created automatically on the first request if it&lt;br /&gt;
does not yet exist.&lt;br /&gt;
&lt;br /&gt;
Proposed patches by David Howells with explanatory comments on the kernel krbcache keyring:&lt;br /&gt;
http://mailman.mit.edu/pipermail/krbdev/2013-August/011650.html&lt;br /&gt;
(note now renamed to 'persistent')&lt;br /&gt;
&lt;br /&gt;
== Augmenting the current KEYRING cache type ==&lt;br /&gt;
&lt;br /&gt;
The current keyring ccache type accepts the following residual forms:&lt;br /&gt;
* KEYRING:&amp;lt;name&amp;gt;&lt;br /&gt;
* KEYRING:process:&amp;lt;name&amp;gt;&lt;br /&gt;
* KEYRING:thread:&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where name is an arbitrary string.&lt;br /&gt;
The first type implies the use of a session keyring.&lt;br /&gt;
&lt;br /&gt;
libkrb5 will now accept a new values for the ccache name:&lt;br /&gt;
&lt;br /&gt;
* KEYRING:session:&amp;lt;name&amp;gt;&lt;br /&gt;
* KEYRING:user:&amp;lt;name&amp;gt;&lt;br /&gt;
* KEYRING:persistent:&amp;lt;uidnumber&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also all the keyrings will now allow to create cache collections.&lt;br /&gt;
&lt;br /&gt;
The session and user keyrings use the session and user's keyrings respecitively.&lt;br /&gt;
The new persistent type uses a special keyring as provided by the new keyutils call keyctl_get_persistent().&lt;br /&gt;
It requires support from the kernel for this new type otherwise it will fallback to use a user type keyring.&lt;br /&gt;
&lt;br /&gt;
Individual ccache are identified and displayed by appending the specific ccache keyring name to the main residual:&lt;br /&gt;
Example:&lt;br /&gt;
 KEYRING:persistent:123:krb_ccache_WE324ffdX&lt;br /&gt;
&lt;br /&gt;
== New Credential Cache Collection schema ==&lt;br /&gt;
&lt;br /&gt;
All KEYRING types become collection enabled, the only difference between the various types is where the ccache keyrings are linked into.&lt;br /&gt;
Each credential cache in the collection has a name of the form: krb_ccache_XXXXXX where XXXXXX is a random string and the name of the currently active ccache is stored into a key named krb_ccache:primary&lt;br /&gt;
&lt;br /&gt;
All ccache keyring are furthemore stored in a keyring named fater the &amp;lt;name&amp;gt; part of the residual for keyring ccache of thread,process,session,user types, while in the case of the persistent keyring a keyring named _krb is created under the persistent keyring. For backwards compatibility reason on runtime upgrade the classic session keyring type (the one identified by KWYRING:&amp;lt;name&amp;gt;) uses the &amp;lt;name&amp;gt; part of the residual for the first ccache, so all the other ccache reside directly in the session keyring alongside the first one.&lt;br /&gt;
&lt;br /&gt;
The format of a single ccache keyring is unchanged from the classic scheme.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
KRB5CCNAME=KEYRING:testccache&lt;br /&gt;
 session&lt;br /&gt;
  \_ testccache&lt;br /&gt;
      \_ __krb5_princ__&lt;br /&gt;
      \_ krbtgt/TEST.KERBEROS.ORG@TEST.KERBEROS.ORG&lt;br /&gt;
      \_ ...&lt;br /&gt;
  \_ krb_ccache_WQRQWTQ3&lt;br /&gt;
  \_ ...&lt;br /&gt;
  \_ krb_ccache:primary (points to testccache at collection cration)&lt;br /&gt;
&lt;br /&gt;
KRB5CCNAME=KEYRING:user:testusercc&lt;br /&gt;
 user&lt;br /&gt;
  \_ testusercc&lt;br /&gt;
      \_ krb_ccache_12WEF43f2&lt;br /&gt;
          \_ __krb5_princ__&lt;br /&gt;
          \_ krbtgt/TEST.KERBEROS.ORG@TEST.KERBEROS.ORG&lt;br /&gt;
          \_ ...&lt;br /&gt;
      \_ krb_ccache_fdgsER324&lt;br /&gt;
      \_ ...&lt;br /&gt;
      \_ krb_ccache:primary (krb_ccache_12WEF43f2)&lt;br /&gt;
&lt;br /&gt;
KRB5CCNAME=KEYRING:persistent:123&lt;br /&gt;
 _persistent.123&lt;br /&gt;
  \_ _krb&lt;br /&gt;
      \_ krb_ccache_12WEF43f2&lt;br /&gt;
          \_ __krb5_princ__&lt;br /&gt;
          \_ krbtgt/TEST.KERBEROS.ORG@TEST.KERBEROS.ORG&lt;br /&gt;
          \_ ...&lt;br /&gt;
      \_ krb_ccache_fdgsER324&lt;br /&gt;
      \_ ...&lt;br /&gt;
      \_ krb_ccache:primary (krb_ccache_12WEF43f2)&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Keyring_collection_cache&amp;diff=5203</id>
		<title>Projects/Keyring collection cache</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Keyring_collection_cache&amp;diff=5203"/>
				<updated>2013-08-20T18:49:08Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
= Scope =&lt;br /&gt;
&lt;br /&gt;
Implement a new Kernel based credential cache collection that uses the Keys API.&lt;br /&gt;
&lt;br /&gt;
The new cahe type is a collection and is store in a per-user keyring avaialble to any user session and that can persist in the system until expiration time even in the absence of an active user session.&lt;br /&gt;
&lt;br /&gt;
= Background and previous work =&lt;br /&gt;
&lt;br /&gt;
The MIT Kerberos code base already include a KEYRING ccache type that uses kernel keyrings to implement a credential cache modeled after the FILE cache type.&lt;br /&gt;
This cache type has 3 important limitations:&lt;br /&gt;
* Uses only session or process or thread based keyrings&lt;br /&gt;
This means the cache cannot survive a user logout and cannot be shared between different sessions of the same user.&lt;br /&gt;
* Uses the classic &amp;quot;user&amp;quot; key type&lt;br /&gt;
The &amp;quot;user&amp;quot; keytype is limited in size because use kernel locked memory so it has issues storing large tickets (like those including a MS-PAC AD) due to strict default quotas on this type of key&lt;br /&gt;
* It cannot represent cache collections.&lt;br /&gt;
&lt;br /&gt;
== Current Keyring cache format ==&lt;br /&gt;
&lt;br /&gt;
The current implementation creates a new keyring named after the residual and links it to the session/process/thread special keyrings.&lt;br /&gt;
&lt;br /&gt;
This keyring contains one spaecial key named __krb5_princ__ that contain the ccache principal name.&lt;br /&gt;
Then each credential is stored as a separate key in the same keyring.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
KRB5CCNAME=KEYRING:testccache&lt;br /&gt;
 session&lt;br /&gt;
  \_testccache&lt;br /&gt;
     \_ __krb5_princ__&lt;br /&gt;
     \_ krbtgt/TEST.KERBEROS.ORG@TEST.KERBEROS.ORG&lt;br /&gt;
     \_ krb5_ccache_conf_data/fast_avail/krbtgt\/TEST.KERBEROS.ORG\@TEST.KERBEROS.ORG@X-CACHECONF&lt;br /&gt;
     \_ krb5_ccache_conf_data/pa_type/krbtgt\/TEST.KERBEROS.ORG\@TEST.KERBEROS.ORG@X-CACHECONF&lt;br /&gt;
     \_ HTTP/http.test.kerberos.org@TEST.KERBEROS.ORG&lt;br /&gt;
     \_ ...&lt;br /&gt;
&lt;br /&gt;
= DesignComponents =&lt;br /&gt;
&lt;br /&gt;
== Linux Kernel improvements ==&lt;br /&gt;
&lt;br /&gt;
Addition of a new key type &amp;quot;big_key&amp;quot; that allows us to create keys&lt;br /&gt;
up to 1MiB in size, backed by internal kernel tmpfs, allowing the&lt;br /&gt;
contents to be swapped out to disk (unlike most other keyrings, which&lt;br /&gt;
remain in unswappable kernel memory).&lt;br /&gt;
&lt;br /&gt;
Creation of a new public interface, keyctl_get_persistent(uid_t,&lt;br /&gt;
key_serial_t id). This API allows the user (and certain privileged&lt;br /&gt;
root processes such as rpc.gssd and GSS-Proxy) to access the keys for&lt;br /&gt;
a particular UID. This keyring is not tied to a session (so it&lt;br /&gt;
can outlive a user on the system if there is the need to perform actions&lt;br /&gt;
while not logged in, such as cron scripts access to Secure NFS).&lt;br /&gt;
This kernel keyring is created automatically on the first request if it&lt;br /&gt;
does not yet exist.&lt;br /&gt;
&lt;br /&gt;
Proposed patches by David Howells with explanatory comments on the kernel krbcache keyring:&lt;br /&gt;
http://mailman.mit.edu/pipermail/krbdev/2013-August/011650.html&lt;br /&gt;
(note now renamed to 'persistent')&lt;br /&gt;
&lt;br /&gt;
== Augmenting the current KEYRING cache type ==&lt;br /&gt;
&lt;br /&gt;
The current keyring ccache type accepts the following residual forms:&lt;br /&gt;
KEYRING:&amp;lt;name&amp;gt;&lt;br /&gt;
KEYRING:process:&amp;lt;name&amp;gt;&lt;br /&gt;
KEYRING:thread:&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where name is an arbitrary string.&lt;br /&gt;
The first type implies the use of a session keyring.&lt;br /&gt;
&lt;br /&gt;
libkrb5 will now accept a new values for the ccache name:&lt;br /&gt;
&lt;br /&gt;
KEYRING:session:&amp;lt;name&amp;gt;&lt;br /&gt;
KEYRING:user:&amp;lt;name&amp;gt;&lt;br /&gt;
KEYRING:persistent:&amp;lt;uidnumber&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also all the keyrings will now allow to create cache collections.&lt;br /&gt;
&lt;br /&gt;
The session and user keyrings use the session and user's keyrings.&lt;br /&gt;
The new persistent type uses a special keyring as provided by the new keyutils call keyctl_get_persistent().&lt;br /&gt;
It requires support from the kernel for this new type otherwise it will fallback to use a user type keyring.&lt;br /&gt;
&lt;br /&gt;
== New Credential Cache Collection schema ==&lt;br /&gt;
&lt;br /&gt;
All KEYRING types become collection enabled, the only difference between the various types is where the ccache keyrings are linked into.&lt;br /&gt;
Each credential cache in the collection has a name of the form: krb_ccache_XXXXXX where XXXXXX is a random string and the name of the currently active ccache is stored into a key named krb_ccache:primary&lt;br /&gt;
&lt;br /&gt;
All ccache keyring are furthemore stored in a keyring named fater the &amp;lt;name&amp;gt; part of the residual for keyring ccache of thread,process,session,user types, while in the case of the persistent keyring a keyring named _krb is created under the persistent keyring. For backwards compatibility reason on runtime upgrade the classic session keyring type (the one identified by KWYRING:&amp;lt;name&amp;gt;) uses the &amp;lt;name&amp;gt; part of the residual for the first ccache, so all the other ccache reside directly in the session keyring alongside the first one.&lt;br /&gt;
&lt;br /&gt;
The format of a single ccache keyring is unchanged from the classic scheme.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
KRB5CCNAME=KEYRING:testccache&lt;br /&gt;
 session&lt;br /&gt;
  \_ testccache&lt;br /&gt;
      \_ __krb5_princ__&lt;br /&gt;
      \_ krbtgt/TEST.KERBEROS.ORG@TEST.KERBEROS.ORG&lt;br /&gt;
      \_ ...&lt;br /&gt;
  \_ krb_ccache_WQRQWTQ3&lt;br /&gt;
  \_ ...&lt;br /&gt;
  \_ krb_ccache:primary (points to testccache at collection cration)&lt;br /&gt;
&lt;br /&gt;
KRB5CCNAME=KEYRING:user:testusercc&lt;br /&gt;
 user&lt;br /&gt;
  \_ testusercc&lt;br /&gt;
      \_ krb_ccache_12WEF43f2&lt;br /&gt;
          \_ __krb5_princ__&lt;br /&gt;
          \_ krbtgt/TEST.KERBEROS.ORG@TEST.KERBEROS.ORG&lt;br /&gt;
          \_ ...&lt;br /&gt;
      \_ krb_ccache_fdgsER324&lt;br /&gt;
      \_ ...&lt;br /&gt;
      \_ krb_ccache:primary (krb_ccache_12WEF43f2)&lt;br /&gt;
&lt;br /&gt;
KRB5CCNAME=KEYRING:persistent:123&lt;br /&gt;
 _persistent.123&lt;br /&gt;
  \_ _krb&lt;br /&gt;
      \_ krb_ccache_12WEF43f2&lt;br /&gt;
          \_ __krb5_princ__&lt;br /&gt;
          \_ krbtgt/TEST.KERBEROS.ORG@TEST.KERBEROS.ORG&lt;br /&gt;
          \_ ...&lt;br /&gt;
      \_ krb_ccache_fdgsER324&lt;br /&gt;
      \_ ...&lt;br /&gt;
      \_ krb_ccache:primary (krb_ccache_12WEF43f2)&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Keyring_collection_cache&amp;diff=5202</id>
		<title>Projects/Keyring collection cache</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Keyring_collection_cache&amp;diff=5202"/>
				<updated>2013-08-20T18:06:05Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: /* Background and previous work */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
= Scope =&lt;br /&gt;
&lt;br /&gt;
Implement a new Kernel based credential cache collection that uses the Keys API.&lt;br /&gt;
&lt;br /&gt;
The new cahe type is a collection and is store in a per-user keyring avaialble to any user session and that can persist in the system until expiration time even in the absence of an active user session.&lt;br /&gt;
&lt;br /&gt;
= Background and previous work =&lt;br /&gt;
&lt;br /&gt;
The MIT Kerberos code base already include a KEYRING ccache type that uses kernel keyrings to implement a credential cache modeled after the FILE cache type.&lt;br /&gt;
This cache type has 3 important limitations:&lt;br /&gt;
* Uses only session or process or thread based keyrings&lt;br /&gt;
This means the cache cannot survive a user logout and cannot be shared between different sessions of the same user.&lt;br /&gt;
* Uses the classic &amp;quot;user&amp;quot; key type&lt;br /&gt;
The &amp;quot;user&amp;quot; keytype is limited in size because use kernel locked memory so it has issues storing large tickets (like those including a MS-PAC AD) due to strict default quotas on this type of key&lt;br /&gt;
* It cannot represent cache collections.&lt;br /&gt;
&lt;br /&gt;
== Current Keyring cache format ==&lt;br /&gt;
&lt;br /&gt;
The current implementation creates a new keyring named after the residual and links it to the session/process/thread special keyrings.&lt;br /&gt;
&lt;br /&gt;
This keyring contains one spaecial key named __krb5_princ__ that contain the ccache principal name.&lt;br /&gt;
Then each credential is stored as a separate key in the same keyring.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
KRB5CCNAME=KEYRING:testccache&lt;br /&gt;
session&lt;br /&gt;
 \_ testccache&lt;br /&gt;
     \_ __krb5_princ__&lt;br /&gt;
     \_ krbtgt/TEST.KERBEROS.ORG@TEST.KERBEROS.ORG&lt;br /&gt;
     \_ krb5_ccache_conf_data/fast_avail/krbtgt\/TEST.KERBEROS.ORG\@TEST.KERBEROS.ORG@X-CACHECONF&lt;br /&gt;
     \_ krb5_ccache_conf_data/pa_type/krbtgt\/TEST.KERBEROS.ORG\@TEST.KERBEROS.ORG@X-CACHECONF&lt;br /&gt;
     \_ HTTP/http.test.kerberos.org@TEST.KERBEROS.ORG&lt;br /&gt;
     \_ ...&lt;br /&gt;
&lt;br /&gt;
= DesignComponents =&lt;br /&gt;
&lt;br /&gt;
== Linux Kernel improvements ==&lt;br /&gt;
&lt;br /&gt;
Addition of a new key type &amp;quot;big_key&amp;quot; that allows us to create keys&lt;br /&gt;
up to 1MiB in size, backed by internal kernel tmpfs, allowing the&lt;br /&gt;
contents to be swapped out to disk (unlike most other keyrings, which&lt;br /&gt;
remain in unswappable kernel memory).&lt;br /&gt;
&lt;br /&gt;
Creation of a new public interface, keyctl_get_persistent(uid_t,&lt;br /&gt;
key_serial_t id). This API allows the user (and certain privileged&lt;br /&gt;
root processes such as rpc.gssd and GSS-Proxy) to access the keys for&lt;br /&gt;
a particular UID. This keyring is not tied to a session (so it&lt;br /&gt;
can outlive a user on the system if there is the need to perform actions&lt;br /&gt;
while not logged in, such as cron scripts access to Secure NFS).&lt;br /&gt;
This kernel keyring is created automatically on the first request if it&lt;br /&gt;
does not yet exist.&lt;br /&gt;
&lt;br /&gt;
Proposed patches by David Howells with explanatory comments on the kernel krbcache keyring:&lt;br /&gt;
http://mailman.mit.edu/pipermail/krbdev/2013-August/011650.html&lt;br /&gt;
(note now renamed to 'persistent')&lt;br /&gt;
&lt;br /&gt;
== Augmenting the current KEYRING cache type ==&lt;br /&gt;
&lt;br /&gt;
The current keyring ccache type accepts the following residual forms:&lt;br /&gt;
KEYRING:&amp;lt;name&amp;gt;&lt;br /&gt;
KEYRING:process:&amp;lt;name&amp;gt;&lt;br /&gt;
KEYRING:thread:&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where name is an arbitrary string.&lt;br /&gt;
The first type implies the use of a session keyring.&lt;br /&gt;
&lt;br /&gt;
libkrb5 will now accept a new values for the ccache name:&lt;br /&gt;
&lt;br /&gt;
KEYRING:session:&amp;lt;name&amp;gt;&lt;br /&gt;
KEYRING:user:&amp;lt;name&amp;gt;&lt;br /&gt;
KEYRING:persistent:&amp;lt;uidnumber&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also all the keyrings will now allow to create cache collections.&lt;br /&gt;
&lt;br /&gt;
The session and user keyrings use the session and user's keyrings.&lt;br /&gt;
The new persistent type uses a special keyring as provided by the new keyutils call keyctl_get_persistent().&lt;br /&gt;
It requires support from the kernel for this new type otherwise it will fallback to use a user type keyring.&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Keyring_collection_cache&amp;diff=5201</id>
		<title>Projects/Keyring collection cache</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Keyring_collection_cache&amp;diff=5201"/>
				<updated>2013-08-20T17:24:10Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: /* Linux Kernel improvements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
= Scope =&lt;br /&gt;
&lt;br /&gt;
Implement a new Kernel based credential cache collection that uses the Keys API.&lt;br /&gt;
&lt;br /&gt;
The new cahe type is a collection and is store in a per-user keyring avaialble to any user session and that can persist in the system until expiration time even in the absence of an active user session.&lt;br /&gt;
&lt;br /&gt;
= Background and previous work =&lt;br /&gt;
&lt;br /&gt;
The MIT Kerberos code base already include a KEYRING ccache type that uses kernel keyrings to implement a credential cache modeled after the FILE cache type.&lt;br /&gt;
This cache type has 3 important limitations:&lt;br /&gt;
* Uses only session or process or thread based keyrings&lt;br /&gt;
This means the cache cannot survive a user logout and cannot be shared between different sessions of the same user.&lt;br /&gt;
* Uses the classic &amp;quot;user&amp;quot; key type&lt;br /&gt;
The &amp;quot;user&amp;quot; keytype is limited in size because use kernel locked memory so it has issues storing large tickets (like those including a MS-PAC AD) due to strict default quotas on this type of key&lt;br /&gt;
* It cannot represent cache collections.&lt;br /&gt;
&lt;br /&gt;
= DesignComponents =&lt;br /&gt;
&lt;br /&gt;
== Linux Kernel improvements ==&lt;br /&gt;
&lt;br /&gt;
Addition of a new key type &amp;quot;big_key&amp;quot; that allows us to create keys&lt;br /&gt;
up to 1MiB in size, backed by internal kernel tmpfs, allowing the&lt;br /&gt;
contents to be swapped out to disk (unlike most other keyrings, which&lt;br /&gt;
remain in unswappable kernel memory).&lt;br /&gt;
&lt;br /&gt;
Creation of a new public interface, keyctl_get_persistent(uid_t,&lt;br /&gt;
key_serial_t id). This API allows the user (and certain privileged&lt;br /&gt;
root processes such as rpc.gssd and GSS-Proxy) to access the keys for&lt;br /&gt;
a particular UID. This keyring is not tied to a session (so it&lt;br /&gt;
can outlive a user on the system if there is the need to perform actions&lt;br /&gt;
while not logged in, such as cron scripts access to Secure NFS).&lt;br /&gt;
This kernel keyring is created automatically on the first request if it&lt;br /&gt;
does not yet exist.&lt;br /&gt;
&lt;br /&gt;
Proposed patches by David Howells with explanatory comments on the kernel krbcache keyring:&lt;br /&gt;
http://mailman.mit.edu/pipermail/krbdev/2013-August/011650.html&lt;br /&gt;
(note now renamed to 'persistent')&lt;br /&gt;
&lt;br /&gt;
== Augmenting the current KEYRING cache type ==&lt;br /&gt;
&lt;br /&gt;
The current keyring ccache type accepts the following residual forms:&lt;br /&gt;
KEYRING:&amp;lt;name&amp;gt;&lt;br /&gt;
KEYRING:process:&amp;lt;name&amp;gt;&lt;br /&gt;
KEYRING:thread:&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where name is an arbitrary string.&lt;br /&gt;
The first type implies the use of a session keyring.&lt;br /&gt;
&lt;br /&gt;
libkrb5 will now accept a new values for the ccache name:&lt;br /&gt;
&lt;br /&gt;
KEYRING:session:&amp;lt;name&amp;gt;&lt;br /&gt;
KEYRING:user:&amp;lt;name&amp;gt;&lt;br /&gt;
KEYRING:persistent:&amp;lt;uidnumber&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also all the keyrings will now allow to create cache collections.&lt;br /&gt;
&lt;br /&gt;
The session and user keyrings use the session and user's keyrings.&lt;br /&gt;
The new persistent type uses a special keyring as provided by the new keyutils call keyctl_get_persistent().&lt;br /&gt;
It requires support from the kernel for this new type otherwise it will fallback to use a user type keyring.&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Keyring_collection_cache&amp;diff=5200</id>
		<title>Projects/Keyring collection cache</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Keyring_collection_cache&amp;diff=5200"/>
				<updated>2013-08-20T17:22:39Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: /* Possible integration in the current KEYRING cache type */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
= Scope =&lt;br /&gt;
&lt;br /&gt;
Implement a new Kernel based credential cache collection that uses the Keys API.&lt;br /&gt;
&lt;br /&gt;
The new cahe type is a collection and is store in a per-user keyring avaialble to any user session and that can persist in the system until expiration time even in the absence of an active user session.&lt;br /&gt;
&lt;br /&gt;
= Background and previous work =&lt;br /&gt;
&lt;br /&gt;
The MIT Kerberos code base already include a KEYRING ccache type that uses kernel keyrings to implement a credential cache modeled after the FILE cache type.&lt;br /&gt;
This cache type has 3 important limitations:&lt;br /&gt;
* Uses only session or process or thread based keyrings&lt;br /&gt;
This means the cache cannot survive a user logout and cannot be shared between different sessions of the same user.&lt;br /&gt;
* Uses the classic &amp;quot;user&amp;quot; key type&lt;br /&gt;
The &amp;quot;user&amp;quot; keytype is limited in size because use kernel locked memory so it has issues storing large tickets (like those including a MS-PAC AD) due to strict default quotas on this type of key&lt;br /&gt;
* It cannot represent cache collections.&lt;br /&gt;
&lt;br /&gt;
= DesignComponents =&lt;br /&gt;
&lt;br /&gt;
== Linux Kernel improvements ==&lt;br /&gt;
&lt;br /&gt;
Addition of a new key type &amp;quot;big_key&amp;quot; that allows us to create keys&lt;br /&gt;
up to 1MiB in size, backed by internal kernel tmpfs, allowing the&lt;br /&gt;
contents to be swapped out to disk (unlike most other keyrings, which&lt;br /&gt;
remain in unswappable kernel memory).&lt;br /&gt;
&lt;br /&gt;
Creation of a new public interface, keyctl_get_krbcache(uid_t,&lt;br /&gt;
key_serial_t id). This API allows the user (and certain privileged&lt;br /&gt;
root processes such as rpc.gssd and GSS-Proxy) to access the keys for&lt;br /&gt;
a particular UID. This keyring is not tied to a session (so it&lt;br /&gt;
can outlive a user on the system if they need to perform actions while&lt;br /&gt;
not logged in, such as cron scripts access to Secure NFS). The kernel&lt;br /&gt;
keyring is created automatically on the first request if it does not&lt;br /&gt;
yet exist.&lt;br /&gt;
&lt;br /&gt;
Proposed patches by David Howells with explanatory comments on the kernel krbcache keyring:&lt;br /&gt;
http://mailman.mit.edu/pipermail/krbdev/2013-August/011650.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Augmenting the current KEYRING cache type ==&lt;br /&gt;
&lt;br /&gt;
The current keyring ccache type accepts the following residual forms:&lt;br /&gt;
KEYRING:&amp;lt;name&amp;gt;&lt;br /&gt;
KEYRING:process:&amp;lt;name&amp;gt;&lt;br /&gt;
KEYRING:thread:&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where name is an arbitrary string.&lt;br /&gt;
The first type implies the use of a session keyring.&lt;br /&gt;
&lt;br /&gt;
libkrb5 will now accept a new values for the ccache name:&lt;br /&gt;
&lt;br /&gt;
KEYRING:session:&amp;lt;name&amp;gt;&lt;br /&gt;
KEYRING:user:&amp;lt;name&amp;gt;&lt;br /&gt;
KEYRING:persistent:&amp;lt;uidnumber&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also all the keyrings will now allow to create cache collections.&lt;br /&gt;
&lt;br /&gt;
The session and user keyrings use the session and user's keyrings.&lt;br /&gt;
The new persistent type uses a special keyring as provided by the new keyutils call keyctl_get_persistent().&lt;br /&gt;
It requires support from the kernel for this new type otherwise it will fallback to use a user type keyring.&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Keyring_collection_cache&amp;diff=5174</id>
		<title>Projects/Keyring collection cache</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Keyring_collection_cache&amp;diff=5174"/>
				<updated>2013-08-06T03:01:04Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: /* Possible integration in the current KEYRING cache type */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
= Scope =&lt;br /&gt;
&lt;br /&gt;
Implement a new Kernel based credential cache collection that uses the Keys API.&lt;br /&gt;
&lt;br /&gt;
The new cahe type is a collection and is store in a per-user keyring avaialble to any user session and that can persist in the system until expiration time even in the absence of an active user session.&lt;br /&gt;
&lt;br /&gt;
= Background and previous work =&lt;br /&gt;
&lt;br /&gt;
The MIT Kerberos code base already include a KEYRING ccache type that uses kernel keyrings to implement a credential cache modeled after the FILE cache type.&lt;br /&gt;
This cache type has 3 important limitations:&lt;br /&gt;
* Uses only session or process or thread based keyrings&lt;br /&gt;
This means the cache cannot survive a user logout and cannot be shared between different sessions of the same user.&lt;br /&gt;
* Uses the classic &amp;quot;user&amp;quot; key type&lt;br /&gt;
The &amp;quot;user&amp;quot; keytype is limited in size because use kernel locked memory so it has issues storing large tickets (like those including a MS-PAC AD) due to strict default quotas on this type of key&lt;br /&gt;
* It cannot represent cache collections.&lt;br /&gt;
&lt;br /&gt;
= DesignComponents =&lt;br /&gt;
&lt;br /&gt;
== Linux Kernel improvements ==&lt;br /&gt;
&lt;br /&gt;
Addition of a new key type &amp;quot;big_key&amp;quot; that allows us to create keys&lt;br /&gt;
up to 1MiB in size, backed by internal kernel tmpfs, allowing the&lt;br /&gt;
contents to be swapped out to disk (unlike most other keyrings, which&lt;br /&gt;
remain in unswappable kernel memory).&lt;br /&gt;
&lt;br /&gt;
Creation of a new public interface, keyctl_get_krbcache(uid_t,&lt;br /&gt;
key_serial_t id). This API allows the user (and certain privileged&lt;br /&gt;
root processes such as rpc.gssd and GSS-Proxy) to access the keys for&lt;br /&gt;
a particular UID. This keyring is not tied to a session (so it&lt;br /&gt;
can outlive a user on the system if they need to perform actions while&lt;br /&gt;
not logged in, such as cron scripts access to Secure NFS). The kernel&lt;br /&gt;
keyring is created automatically on the first request if it does not&lt;br /&gt;
yet exist.&lt;br /&gt;
&lt;br /&gt;
Proposed patches by David Howells with explanatory comments on the kernel krbcache keyring:&lt;br /&gt;
http://mailman.mit.edu/pipermail/krbdev/2013-August/011650.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Possible integration in the current KEYRING cache type ==&lt;br /&gt;
&lt;br /&gt;
libkrb5 will now accept a new value for the credential cache string&lt;br /&gt;
(for example: when used in KRB5CCNAME).&lt;br /&gt;
&lt;br /&gt;
It will take the form:&lt;br /&gt;
  KEYRING:krbcache:$UID&lt;br /&gt;
to represent a credential cache collection and&lt;br /&gt;
  KEYRING:krbcache:$UID:krb_ccache_XXXXXXX&lt;br /&gt;
to represent a specific key within a cache collection.&lt;br /&gt;
&lt;br /&gt;
The new krbcache type will create a special parent keyring as provided by the new keys call keyctl_get_krbcache()&lt;br /&gt;
&lt;br /&gt;
In this keyring a key called krbcache:index will contain a 4 byte version number and the name of the current primary cache, just like the 'primary' file contains the name of the primary cache for the DIR cache type.&lt;br /&gt;
&lt;br /&gt;
Each cache will be stored in a child keyring, the format used in this keyring is the same as used by the classic KEYRING cache types except that tickets will be store in keys of type &amp;quot;big_key&amp;quot; instead of using the &amp;quot;user&amp;quot; type.&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Keyring_collection_cache&amp;diff=5173</id>
		<title>Projects/Keyring collection cache</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Keyring_collection_cache&amp;diff=5173"/>
				<updated>2013-08-02T01:22:14Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
= Scope =&lt;br /&gt;
&lt;br /&gt;
Implement a new Kernel based credential cache collection that uses the Keys API.&lt;br /&gt;
&lt;br /&gt;
The new cahe type is a collection and is store in a per-user keyring avaialble to any user session and that can persist in the system until expiration time even in the absence of an active user session.&lt;br /&gt;
&lt;br /&gt;
= Background and previous work =&lt;br /&gt;
&lt;br /&gt;
The MIT Kerberos code base already include a KEYRING ccache type that uses kernel keyrings to implement a credential cache modeled after the FILE cache type.&lt;br /&gt;
This cache type has 3 important limitations:&lt;br /&gt;
* Uses only session or process or thread based keyrings&lt;br /&gt;
This means the cache cannot survive a user logout and cannot be shared between different sessions of the same user.&lt;br /&gt;
* Uses the classic &amp;quot;user&amp;quot; key type&lt;br /&gt;
The &amp;quot;user&amp;quot; keytype is limited in size because use kernel locked memory so it has issues storing large tickets (like those including a MS-PAC AD) due to strict default quotas on this type of key&lt;br /&gt;
* It cannot represent cache collections.&lt;br /&gt;
&lt;br /&gt;
= DesignComponents =&lt;br /&gt;
&lt;br /&gt;
== Linux Kernel improvements ==&lt;br /&gt;
&lt;br /&gt;
Addition of a new key type &amp;quot;big_key&amp;quot; that allows us to create keys&lt;br /&gt;
up to 1MiB in size, backed by internal kernel tmpfs, allowing the&lt;br /&gt;
contents to be swapped out to disk (unlike most other keyrings, which&lt;br /&gt;
remain in unswappable kernel memory).&lt;br /&gt;
&lt;br /&gt;
Creation of a new public interface, keyctl_get_krbcache(uid_t,&lt;br /&gt;
key_serial_t id). This API allows the user (and certain privileged&lt;br /&gt;
root processes such as rpc.gssd and GSS-Proxy) to access the keys for&lt;br /&gt;
a particular UID. This keyring is not tied to a session (so it&lt;br /&gt;
can outlive a user on the system if they need to perform actions while&lt;br /&gt;
not logged in, such as cron scripts access to Secure NFS). The kernel&lt;br /&gt;
keyring is created automatically on the first request if it does not&lt;br /&gt;
yet exist.&lt;br /&gt;
&lt;br /&gt;
Proposed patches by David Howells with explanatory comments on the kernel krbcache keyring:&lt;br /&gt;
http://mailman.mit.edu/pipermail/krbdev/2013-August/011650.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Possible integration in the current KEYRING cache type ==&lt;br /&gt;
&lt;br /&gt;
libkrb5 will now accept a new value for the credential cache string&lt;br /&gt;
(for example: when used in KRB5CCNAME).&lt;br /&gt;
&lt;br /&gt;
It will take the form:&lt;br /&gt;
  KEYRING:krbcache:$UID&lt;br /&gt;
to represent a credential cache collection and&lt;br /&gt;
  KEYRING:krbcache:$UID:tktXXXXX&lt;br /&gt;
to represent a specific key within a cache collection.&lt;br /&gt;
&lt;br /&gt;
The new krbcache type wil create a special parent keyring as provided by the new keys call keyctl_get_krbcache()&lt;br /&gt;
&lt;br /&gt;
In this keyring a key called krbcache:index will contain a 4 byte version number and the name of the current primary cache, pretty much like the 'primary' file contains the name of the primary cache for the DIR cache type.&lt;br /&gt;
&lt;br /&gt;
Each cache will be stored in a child keyring, the format used in this keyring is the same as used by the classic KEYRING cache types except that tickets will be store in keys of type &amp;quot;big_key&amp;quot; instead of using the &amp;quot;user&amp;quot; type.&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Keyring_collection_cache&amp;diff=5172</id>
		<title>Projects/Keyring collection cache</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Keyring_collection_cache&amp;diff=5172"/>
				<updated>2013-08-01T22:08:27Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: /* Possible integration in the current KEYRING cache type */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Scope =&lt;br /&gt;
&lt;br /&gt;
Implement a new Kernel based credential cache collection that uses the Keys API.&lt;br /&gt;
&lt;br /&gt;
The new cahe type is a collection and is store in a per-user keyring avaialble to any user session and that can persist in the system until expiration time even in the absence of an active user session.&lt;br /&gt;
&lt;br /&gt;
= Background and previous work =&lt;br /&gt;
&lt;br /&gt;
The MIT Kerberos code base already include a KEYRING ccache type that uses kernel keyrings to implement a credential cache modeled after the FILE cache type.&lt;br /&gt;
This cache type has 3 important limitations:&lt;br /&gt;
* Uses only session or process or thread based keyrings&lt;br /&gt;
This means the cache cannot survive a user logout and cannot be shared between different sessions of the same user.&lt;br /&gt;
* Uses the classic &amp;quot;user&amp;quot; key type&lt;br /&gt;
The &amp;quot;user&amp;quot; keytype is limited in size because use kernel locked memory so it has issues storing large tickets (like those including a MS-PAC AD) due to strict default quotas on this type of key&lt;br /&gt;
* It cannot represent cache collections.&lt;br /&gt;
&lt;br /&gt;
= DesignComponents =&lt;br /&gt;
&lt;br /&gt;
== Linux Kernel improvements ==&lt;br /&gt;
&lt;br /&gt;
Addition of a new key type &amp;quot;big_key&amp;quot; that allows us to create keys&lt;br /&gt;
up to 1MiB in size, backed by internal kernel tmpfs, allowing the&lt;br /&gt;
contents to be swapped out to disk (unlike most other keyrings, which&lt;br /&gt;
remain in unswappable kernel memory).&lt;br /&gt;
&lt;br /&gt;
Creation of a new public interface, keyctl_get_krbcache(uid_t,&lt;br /&gt;
key_serial_t id). This API allows the user (and certain privileged&lt;br /&gt;
root processes such as rpc.gssd and GSS-Proxy) to access the keys for&lt;br /&gt;
a particular UID. This keyring is not tied to a session (so it&lt;br /&gt;
can outlive a user on the system if they need to perform actions while&lt;br /&gt;
not logged in, such as cron scripts access to Secure NFS). The kernel&lt;br /&gt;
keyring is created automatically on the first request if it does not&lt;br /&gt;
yet exist.&lt;br /&gt;
&lt;br /&gt;
Proposed patches by David Howells with explanatory comments on the kernel krbcache keyring:&lt;br /&gt;
http://mailman.mit.edu/pipermail/krbdev/2013-August/011650.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Possible integration in the current KEYRING cache type ==&lt;br /&gt;
&lt;br /&gt;
libkrb5 will now accept a new value for the credential cache string&lt;br /&gt;
(for example: when used in KRB5CCNAME).&lt;br /&gt;
&lt;br /&gt;
It will take the form:&lt;br /&gt;
  KEYRING:krbcache:$UID&lt;br /&gt;
to represent a credential cache collection and&lt;br /&gt;
  KEYRING:krbcache:$UID:tktXXXXX&lt;br /&gt;
to represent a specific key within a cache collection.&lt;br /&gt;
&lt;br /&gt;
The new krbcache type wil create a special parent keyring as provided by the new keys call keyctl_get_krbcache()&lt;br /&gt;
&lt;br /&gt;
In this keyring a key called krbcache:index will contain a 4 byte version number and the name of the current primary cache, pretty much like the 'primary' file contains the name of the primary cache for the DIR cache type.&lt;br /&gt;
&lt;br /&gt;
Each cache will be stored in a child keyring, the format used in this keyring is the same as used by the classic KEYRING cache types except that tickets will be store in keys of type &amp;quot;big_key&amp;quot; instead of using the &amp;quot;user&amp;quot; type.&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Keyring_collection_cache&amp;diff=5171</id>
		<title>Projects/Keyring collection cache</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Keyring_collection_cache&amp;diff=5171"/>
				<updated>2013-08-01T21:57:46Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: New page: = Scope =  Implement a new Kernel based credential cache collection that uses the Keys API.  The new cahe type is a collection and is store in a per-user keyring avaialble to any user sess...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Scope =&lt;br /&gt;
&lt;br /&gt;
Implement a new Kernel based credential cache collection that uses the Keys API.&lt;br /&gt;
&lt;br /&gt;
The new cahe type is a collection and is store in a per-user keyring avaialble to any user session and that can persist in the system until expiration time even in the absence of an active user session.&lt;br /&gt;
&lt;br /&gt;
= Background and previous work =&lt;br /&gt;
&lt;br /&gt;
The MIT Kerberos code base already include a KEYRING ccache type that uses kernel keyrings to implement a credential cache modeled after the FILE cache type.&lt;br /&gt;
This cache type has 3 important limitations:&lt;br /&gt;
* Uses only session or process or thread based keyrings&lt;br /&gt;
This means the cache cannot survive a user logout and cannot be shared between different sessions of the same user.&lt;br /&gt;
* Uses the classic &amp;quot;user&amp;quot; key type&lt;br /&gt;
The &amp;quot;user&amp;quot; keytype is limited in size because use kernel locked memory so it has issues storing large tickets (like those including a MS-PAC AD) due to strict default quotas on this type of key&lt;br /&gt;
* It cannot represent cache collections.&lt;br /&gt;
&lt;br /&gt;
= DesignComponents =&lt;br /&gt;
&lt;br /&gt;
== Linux Kernel improvements ==&lt;br /&gt;
&lt;br /&gt;
Addition of a new key type &amp;quot;big_key&amp;quot; that allows us to create keys&lt;br /&gt;
up to 1MiB in size, backed by internal kernel tmpfs, allowing the&lt;br /&gt;
contents to be swapped out to disk (unlike most other keyrings, which&lt;br /&gt;
remain in unswappable kernel memory).&lt;br /&gt;
&lt;br /&gt;
Creation of a new public interface, keyctl_get_krbcache(uid_t,&lt;br /&gt;
key_serial_t id). This API allows the user (and certain privileged&lt;br /&gt;
root processes such as rpc.gssd and GSS-Proxy) to access the keys for&lt;br /&gt;
a particular UID. This keyring is not tied to a session (so it&lt;br /&gt;
can outlive a user on the system if they need to perform actions while&lt;br /&gt;
not logged in, such as cron scripts access to Secure NFS). The kernel&lt;br /&gt;
keyring is created automatically on the first request if it does not&lt;br /&gt;
yet exist.&lt;br /&gt;
&lt;br /&gt;
Proposed patches by David Howells with explanatory comments on the kernel krbcache keyring:&lt;br /&gt;
http://mailman.mit.edu/pipermail/krbdev/2013-August/011650.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Possible integration in the current KEYRING cache type ==&lt;br /&gt;
&lt;br /&gt;
libkrb5 will now accept a new value for the credential cache string&lt;br /&gt;
(for example: when used in KRB5CCNAME).&lt;br /&gt;
&lt;br /&gt;
It will take the form:&lt;br /&gt;
  KEYRING:krbcache:$UID&lt;br /&gt;
to represent a credential cache collection and&lt;br /&gt;
  KEYRING:krbcache:$UID:tktXXXXX&lt;br /&gt;
to represent a specific key within a cache collection.&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Interposer_Mechanism&amp;diff=4866</id>
		<title>Projects/Interposer Mechanism</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Interposer_Mechanism&amp;diff=4866"/>
				<updated>2012-10-02T21:30:10Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: /* Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
This project is about creating a mechanism by which it is possible to intercept accepting and initializing a security context at the mechglue layer so that any mechanism can be ideally proxied to a separate application potentially running in a different security context.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
During the development of the [https://fedorahosted.org/gss-proxy GSS-Proxy project] in connection with the [[Projects/ProxyGSSAPI]] a new GSSAPI Mechanism interface has emerged. We call this kind of mechanism an '''Interposer Mechanism''' as it intercept all function calls for a specific mechanism.&lt;br /&gt;
&lt;br /&gt;
The Interposer Mechanism instructs the mechglue layer on what mechanisms it wants to interpose. Once a mechnism is interposed the mechglue will always call the interposer for any function related to interposed mechanism.&lt;br /&gt;
&lt;br /&gt;
The interposer plugin is responsible for handling the requested functionality, it can proxy it to another process (for example to the GSS-Proxy daemon) or can short-circuit it back to the mechglue in order to call the original mechanism handler.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
* Interposer plugins must be able to intercept any mechanism function.&lt;br /&gt;
* Interposer plugins must also be able to call back into the mechglue in order to execute code using the original mechanism.&lt;br /&gt;
* Interposer mechanisms should be completely transparent to applications. A pure gssapi application should not need any modification in order to work with the interposer mechanism nor need to issue any special call to use the interposer functionality.&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
&lt;br /&gt;
In order to allow interposer plugins to re-enter the mechglue we had to change their function signature so that the SPI does not match the GSSAPI function signatures, as interposer plugins are allowed to call back into GSSAPI.&lt;br /&gt;
The interposer plugin SPI uses the gssi_ prefix (GSS Interposer) for all the mechglue functions it implements.&lt;br /&gt;
&lt;br /&gt;
The interposer plugins are specified in the gss.conf file with a new option&lt;br /&gt;
that identifies them as such. An interposer plugin specific&lt;br /&gt;
initialization function is used by the mechglue to initialize the plugin and retrieve the list of mechanism the interposer plugin wants to interpose.&lt;br /&gt;
&lt;br /&gt;
Interposer plugins create special mech oids by concatenating the interposer mechanism and the original interposed mechanism oid.&lt;br /&gt;
This is needed in order to allow the interposer plugin to re-enter the mechglue avoiding loops.&lt;br /&gt;
These special oids are passed as input to gssapi functions that accept mechanism oids in input instad of the original mechanism oid.&lt;br /&gt;
&lt;br /&gt;
The mechglue makes sure these oids are never leaked to applications, by providing a mapping back to normal public oids before they are returned to applications.&lt;br /&gt;
&lt;br /&gt;
= Limitations =&lt;br /&gt;
&lt;br /&gt;
Currently the mechglue code can handle only one interposer plugin&lt;br /&gt;
per-mechanism.&lt;br /&gt;
&lt;br /&gt;
= New APIs =&lt;br /&gt;
&lt;br /&gt;
Internal mechglue functions:&lt;br /&gt;
* gssint_select_mech_type()&lt;br /&gt;
* gssint_get_public_oid()&lt;br /&gt;
* gssint_make_public_oid_set()&lt;br /&gt;
&lt;br /&gt;
Interposer initialization:&lt;br /&gt;
* gss_mech_interposer()&lt;br /&gt;
&lt;br /&gt;
New mechanism functions:&lt;br /&gt;
* gssspi_import_sec_context_by_mech()&lt;br /&gt;
* gssspi_import_name_by_mech()&lt;br /&gt;
* gssspi_import_creD_by_mech()&lt;br /&gt;
&lt;br /&gt;
Modified structures:&lt;br /&gt;
* gss_mech_info&lt;br /&gt;
&lt;br /&gt;
== Internal mechglue functions ==&lt;br /&gt;
&lt;br /&gt;
These new functions are used to aid the mechglue in finding the correct&lt;br /&gt;
mechanism to use when an interposer plugin is configured to intercept real&lt;br /&gt;
mechanisms.&lt;br /&gt;
&lt;br /&gt;
=== gssint_select_mech_type() ===&lt;br /&gt;
&lt;br /&gt;
This funciton is now called in the mechglue each time a mech oid is used as&lt;br /&gt;
input into a GSSAPI function. It correctly handles looking up by special OID&lt;br /&gt;
(if a interposer plugin is configured and returns the actual mechanism oid&lt;br /&gt;
to be used in case a mechanism has been interposed (typically the interposer&lt;br /&gt;
plugin mechanism).&lt;br /&gt;
&lt;br /&gt;
=== gssint_get_public_oid() ===&lt;br /&gt;
&lt;br /&gt;
This function always return the appropriate public oid associated with the&lt;br /&gt;
input oid which can be an actual public oid or a special interposer oid.&lt;br /&gt;
&lt;br /&gt;
=== gssint_make_public_oid_set() ===&lt;br /&gt;
&lt;br /&gt;
As the above but for oid sets.&lt;br /&gt;
&lt;br /&gt;
== Interposer initialization ==&lt;br /&gt;
&lt;br /&gt;
=== gss_mech_interposer() ===&lt;br /&gt;
&lt;br /&gt;
This function is looked up right after an interposer plugin is dlopen()ed and&lt;br /&gt;
is called to initialize the plugin. It returns a list of mechanism to&lt;br /&gt;
interpose. The mechglue uses this information to properly set up information in&lt;br /&gt;
the gss_mech_info structure of the plugin and on the structures of the&lt;br /&gt;
interposed mechanisms.&lt;br /&gt;
&lt;br /&gt;
== New mechanism functions ==&lt;br /&gt;
&lt;br /&gt;
These functions are required to properly pass information to interposer&lt;br /&gt;
plugins. In particular the original functions did not pass to the interposer&lt;br /&gt;
plugin the oid of the mechanism these functions are supposed to act on. This is&lt;br /&gt;
a problem for an interposer plugin that can intercept multiple mechanisms as it&lt;br /&gt;
has no way to understand which mechanism it is supposed to interpose on a specific request.&lt;br /&gt;
By passing in the public mechanism oid the mechglue&lt;br /&gt;
intended to use interposer plugins can properly handle the request.&lt;br /&gt;
&lt;br /&gt;
=== gssspi_import_sec_context_by_mech() ===&lt;br /&gt;
&lt;br /&gt;
Same as gss_import_sec_context() but specifies the mechanism to use.&lt;br /&gt;
&lt;br /&gt;
=== gssspi_import_name_by_mech() ===&lt;br /&gt;
&lt;br /&gt;
Same as gss_import_name() but specifies the mechanism to use.&lt;br /&gt;
&lt;br /&gt;
=== gssspi_import_cred_by_mech() ===&lt;br /&gt;
&lt;br /&gt;
Same as gss_import_cred() but specifies the mechanism to use.&lt;br /&gt;
&lt;br /&gt;
== Modified structures ==&lt;br /&gt;
&lt;br /&gt;
Only one structure needed modifications:&lt;br /&gt;
&lt;br /&gt;
=== gss_mech_info ===&lt;br /&gt;
&lt;br /&gt;
This is the structure that describes internally a mechanism. In order to allow&lt;br /&gt;
GSSAPI to handle interposition this structure has now 3 new members:&lt;br /&gt;
* is_interposer&lt;br /&gt;
a boolean flag that is used to mark a mechanism as an interposer mechanism and not a real mechanism&lt;br /&gt;
* ine_mech_type&lt;br /&gt;
the oid of the interposer mechanism, it is set on real mechanisms&lt;br /&gt;
* int_mech&lt;br /&gt;
pointer to the interposer mechanism vtable&lt;br /&gt;
&lt;br /&gt;
== New Functions Signatures ==&lt;br /&gt;
&lt;br /&gt;
 OM_uint32&lt;br /&gt;
 gssint_select_mech_type(&lt;br /&gt;
    OM_uint32 *minor,&lt;br /&gt;
    gss_const_OID oid,&lt;br /&gt;
    gss_OID *selected_oid&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 gss_OID&lt;br /&gt;
 gssint_get_public_oid(&lt;br /&gt;
    gss_const_OID oid&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32&lt;br /&gt;
 gssint_make_public_oid_set(&lt;br /&gt;
    OM_uint32 *minor_status,                        &lt;br /&gt;
    gss_OID oids,&lt;br /&gt;
    int count,&lt;br /&gt;
    gss_OID_set *public_set&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gssspi_import_sec_context_by_mech(&lt;br /&gt;
    OM_uint32 *minor_status,&lt;br /&gt;
    gss_OID desired_mech,&lt;br /&gt;
    gss_buffer_t interprocess_token,&lt;br /&gt;
    gss_ctx_id_t *context_handle&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gssspi_import_name_by_mech(&lt;br /&gt;
    OM_uint32 *minor_status,&lt;br /&gt;
    gss_OID mech_type,&lt;br /&gt;
    gss_buffer_t input_name_buffer,&lt;br /&gt;
    gss_OID input_name_type,&lt;br /&gt;
    gss_name_t *output_name&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gssspi_import_cred_by_mech(&lt;br /&gt;
    OM_uint32 *minor_status,&lt;br /&gt;
    gss_OID mech_type,&lt;br /&gt;
    gss_buffer_t token,&lt;br /&gt;
    gss_cred_id_t *cred_handle&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 gss_OID_set gss_mech_interposer(&lt;br /&gt;
    gss_OID mech_type&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
= Testing =&lt;br /&gt;
&lt;br /&gt;
An interposer plugin with a test program is being worked on as part of the [https://fedorahosted.org/gss-proxy GSS-Proxy project]. that work will be used as a template for internal tests once it is complete. The internal test will simply loopback into gssapi. Thi will guarantee no regressions are introduced in the interposer interface.&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Interposer_Mechanism&amp;diff=4865</id>
		<title>Projects/Interposer Mechanism</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Interposer_Mechanism&amp;diff=4865"/>
				<updated>2012-10-02T21:28:59Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: /* Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
This project is about creating a mechanism by which it is possible to intercept accepting and initializing a security context at the mechglue layer so that any mechanism can be ideally proxied to a separate application potentially running in a different security context.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
During the development of the [https://fedorahosted.org/gss-proxy GSS-Proxy project] in connection with the [[Projects/ProxyGSSAPI]] a new GSSAPI Mechanism interface has emerged. We call this kind of mechanism an '''Interposer Mechanism''' as it intercept all function calls for a specific mechanism.&lt;br /&gt;
&lt;br /&gt;
The Interposer Mechanism instructs the mechglue layer on what mechanisms it wants to interpose. Once a mechnism is interposed the mechglue will always call the interposer for any function related to interposed mechanism.&lt;br /&gt;
&lt;br /&gt;
The interposer plugin is responsible for handling the requested functionality, it can proxy it to another process (for example to the GSS-Proxy daemon) or can short-circuit it back to the mechglue in order to call the original mechanism handler.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
The Interposer mechanism must be able to intercept any mechanism function.&lt;br /&gt;
The Interposer mechanism must also be able to call back into the mechglue in order to execute code using the original mechanism.&lt;br /&gt;
The interposer mechanism should be completely transparent to applications, in that pure gssapi application should not need any modification in order to work with the interposer mechanism nor need to issue any special call to use the interposer functionality.&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
&lt;br /&gt;
In order to allow interposer plugins to re-enter the mechglue we had to change their function signature so that the SPI does not match the GSSAPI function signatures, as interposer plugins are allowed to call back into GSSAPI.&lt;br /&gt;
The interposer plugin SPI uses the gssi_ prefix (GSS Interposer) for all the mechglue functions it implements.&lt;br /&gt;
&lt;br /&gt;
The interposer plugins are specified in the gss.conf file with a new option&lt;br /&gt;
that identifies them as such. An interposer plugin specific&lt;br /&gt;
initialization function is used by the mechglue to initialize the plugin and retrieve the list of mechanism the interposer plugin wants to interpose.&lt;br /&gt;
&lt;br /&gt;
Interposer plugins create special mech oids by concatenating the interposer mechanism and the original interposed mechanism oid.&lt;br /&gt;
This is needed in order to allow the interposer plugin to re-enter the mechglue avoiding loops.&lt;br /&gt;
These special oids are passed as input to gssapi functions that accept mechanism oids in input instad of the original mechanism oid.&lt;br /&gt;
&lt;br /&gt;
The mechglue makes sure these oids are never leaked to applications, by providing a mapping back to normal public oids before they are returned to applications.&lt;br /&gt;
&lt;br /&gt;
= Limitations =&lt;br /&gt;
&lt;br /&gt;
Currently the mechglue code can handle only one interposer plugin&lt;br /&gt;
per-mechanism.&lt;br /&gt;
&lt;br /&gt;
= New APIs =&lt;br /&gt;
&lt;br /&gt;
Internal mechglue functions:&lt;br /&gt;
* gssint_select_mech_type()&lt;br /&gt;
* gssint_get_public_oid()&lt;br /&gt;
* gssint_make_public_oid_set()&lt;br /&gt;
&lt;br /&gt;
Interposer initialization:&lt;br /&gt;
* gss_mech_interposer()&lt;br /&gt;
&lt;br /&gt;
New mechanism functions:&lt;br /&gt;
* gssspi_import_sec_context_by_mech()&lt;br /&gt;
* gssspi_import_name_by_mech()&lt;br /&gt;
* gssspi_import_creD_by_mech()&lt;br /&gt;
&lt;br /&gt;
Modified structures:&lt;br /&gt;
* gss_mech_info&lt;br /&gt;
&lt;br /&gt;
== Internal mechglue functions ==&lt;br /&gt;
&lt;br /&gt;
These new functions are used to aid the mechglue in finding the correct&lt;br /&gt;
mechanism to use when an interposer plugin is configured to intercept real&lt;br /&gt;
mechanisms.&lt;br /&gt;
&lt;br /&gt;
=== gssint_select_mech_type() ===&lt;br /&gt;
&lt;br /&gt;
This funciton is now called in the mechglue each time a mech oid is used as&lt;br /&gt;
input into a GSSAPI function. It correctly handles looking up by special OID&lt;br /&gt;
(if a interposer plugin is configured and returns the actual mechanism oid&lt;br /&gt;
to be used in case a mechanism has been interposed (typically the interposer&lt;br /&gt;
plugin mechanism).&lt;br /&gt;
&lt;br /&gt;
=== gssint_get_public_oid() ===&lt;br /&gt;
&lt;br /&gt;
This function always return the appropriate public oid associated with the&lt;br /&gt;
input oid which can be an actual public oid or a special interposer oid.&lt;br /&gt;
&lt;br /&gt;
=== gssint_make_public_oid_set() ===&lt;br /&gt;
&lt;br /&gt;
As the above but for oid sets.&lt;br /&gt;
&lt;br /&gt;
== Interposer initialization ==&lt;br /&gt;
&lt;br /&gt;
=== gss_mech_interposer() ===&lt;br /&gt;
&lt;br /&gt;
This function is looked up right after an interposer plugin is dlopen()ed and&lt;br /&gt;
is called to initialize the plugin. It returns a list of mechanism to&lt;br /&gt;
interpose. The mechglue uses this information to properly set up information in&lt;br /&gt;
the gss_mech_info structure of the plugin and on the structures of the&lt;br /&gt;
interposed mechanisms.&lt;br /&gt;
&lt;br /&gt;
== New mechanism functions ==&lt;br /&gt;
&lt;br /&gt;
These functions are required to properly pass information to interposer&lt;br /&gt;
plugins. In particular the original functions did not pass to the interposer&lt;br /&gt;
plugin the oid of the mechanism these functions are supposed to act on. This is&lt;br /&gt;
a problem for an interposer plugin that can intercept multiple mechanisms as it&lt;br /&gt;
has no way to understand which mechanism it is supposed to interpose on a specific request.&lt;br /&gt;
By passing in the public mechanism oid the mechglue&lt;br /&gt;
intended to use interposer plugins can properly handle the request.&lt;br /&gt;
&lt;br /&gt;
=== gssspi_import_sec_context_by_mech() ===&lt;br /&gt;
&lt;br /&gt;
Same as gss_import_sec_context() but specifies the mechanism to use.&lt;br /&gt;
&lt;br /&gt;
=== gssspi_import_name_by_mech() ===&lt;br /&gt;
&lt;br /&gt;
Same as gss_import_name() but specifies the mechanism to use.&lt;br /&gt;
&lt;br /&gt;
=== gssspi_import_cred_by_mech() ===&lt;br /&gt;
&lt;br /&gt;
Same as gss_import_cred() but specifies the mechanism to use.&lt;br /&gt;
&lt;br /&gt;
== Modified structures ==&lt;br /&gt;
&lt;br /&gt;
Only one structure needed modifications:&lt;br /&gt;
&lt;br /&gt;
=== gss_mech_info ===&lt;br /&gt;
&lt;br /&gt;
This is the structure that describes internally a mechanism. In order to allow&lt;br /&gt;
GSSAPI to handle interposition this structure has now 3 new members:&lt;br /&gt;
* is_interposer&lt;br /&gt;
a boolean flag that is used to mark a mechanism as an interposer mechanism and not a real mechanism&lt;br /&gt;
* ine_mech_type&lt;br /&gt;
the oid of the interposer mechanism, it is set on real mechanisms&lt;br /&gt;
* int_mech&lt;br /&gt;
pointer to the interposer mechanism vtable&lt;br /&gt;
&lt;br /&gt;
== New Functions Signatures ==&lt;br /&gt;
&lt;br /&gt;
 OM_uint32&lt;br /&gt;
 gssint_select_mech_type(&lt;br /&gt;
    OM_uint32 *minor,&lt;br /&gt;
    gss_const_OID oid,&lt;br /&gt;
    gss_OID *selected_oid&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 gss_OID&lt;br /&gt;
 gssint_get_public_oid(&lt;br /&gt;
    gss_const_OID oid&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32&lt;br /&gt;
 gssint_make_public_oid_set(&lt;br /&gt;
    OM_uint32 *minor_status,                        &lt;br /&gt;
    gss_OID oids,&lt;br /&gt;
    int count,&lt;br /&gt;
    gss_OID_set *public_set&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gssspi_import_sec_context_by_mech(&lt;br /&gt;
    OM_uint32 *minor_status,&lt;br /&gt;
    gss_OID desired_mech,&lt;br /&gt;
    gss_buffer_t interprocess_token,&lt;br /&gt;
    gss_ctx_id_t *context_handle&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gssspi_import_name_by_mech(&lt;br /&gt;
    OM_uint32 *minor_status,&lt;br /&gt;
    gss_OID mech_type,&lt;br /&gt;
    gss_buffer_t input_name_buffer,&lt;br /&gt;
    gss_OID input_name_type,&lt;br /&gt;
    gss_name_t *output_name&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gssspi_import_cred_by_mech(&lt;br /&gt;
    OM_uint32 *minor_status,&lt;br /&gt;
    gss_OID mech_type,&lt;br /&gt;
    gss_buffer_t token,&lt;br /&gt;
    gss_cred_id_t *cred_handle&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 gss_OID_set gss_mech_interposer(&lt;br /&gt;
    gss_OID mech_type&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
= Testing =&lt;br /&gt;
&lt;br /&gt;
An interposer plugin with a test program is being worked on as part of the [https://fedorahosted.org/gss-proxy GSS-Proxy project]. that work will be used as a template for internal tests once it is complete. The internal test will simply loopback into gssapi. Thi will guarantee no regressions are introduced in the interposer interface.&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Interposer_Mechanism&amp;diff=4864</id>
		<title>Projects/Interposer Mechanism</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Interposer_Mechanism&amp;diff=4864"/>
				<updated>2012-10-02T21:28:13Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: /* Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
This project is about creating a mechanism by which it is possible to intercept accepting and initializing a security context at the mechglue layer so that any mechanism can be ideally proxied to a separate application potentially running in a different security context.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
During the development of the [https://fedorahosted.org/gss-proxy GSS-Proxy project] in connection with the [[Projects/ProxyGSSAPI]] a new GSSAPI Mechanism interface has emerged. We call this kind of mechanism an '''Interposer Mechanism''' as it intercept all function calls for a specific mechanism.&lt;br /&gt;
&lt;br /&gt;
The Interposer Mechanism instructs the mechglue layer on what mechanisms it wants to interpose. Once a mechnism is interposed the mechglue will always call the interposer for any function related to interposed mechanism.&lt;br /&gt;
&lt;br /&gt;
The interposer plugin is responsible for handling the requested functionality, it can proxy it to another process (for example to the GSS-Proxy daemon) or can short-circuit it back to the mechglue in order to call the original mechanism handler.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
The Interposer mechanism must be able to intercept any mechanism function.&lt;br /&gt;
The Interposer mechanism must also be able to call back into the mechglue in order to execute code using the original mechanism.&lt;br /&gt;
The interposer mechanism should be completely transparent to applications, in that pure gssapi application should not need any modification in order to work with the interposer mechanism nor need to issue any special call to use the interposer functionality.&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
&lt;br /&gt;
In order to allow interposer plugins to re-enter the mechglue we had to change their function signature so that the SPI does not match the GSs API function signatures, as interposer plugins are allowed to call back into GSSAPI.&lt;br /&gt;
The interposer plugins SPI uses the gssi_ prefix (GSS Interposer) for all the mechglue functions it implements.&lt;br /&gt;
&lt;br /&gt;
The interposer plugins are specified in the gss.conf file with a new option&lt;br /&gt;
that identifies them as such. An interposer plugin specific&lt;br /&gt;
initialization function is used by the mechglue to initialize the plugin and retrieve the list of mechanism the interposer plugin wants to interpose.&lt;br /&gt;
&lt;br /&gt;
Interposer plugins create special mech oids by concatenating the interposer mechanism and the original interposed mechanism oid.&lt;br /&gt;
This is needed in order to allow the interposer plugin to re-enter the mechglue avoiding loops.&lt;br /&gt;
These special oids are passed as input to gssapi functions that accept mechanism oids in input instad of the original mechanism oid.&lt;br /&gt;
&lt;br /&gt;
The mechglue makes sure these oids are never leaked to applications, by providing a mapping back to normal public oids before they are returned to applications.&lt;br /&gt;
&lt;br /&gt;
= Limitations =&lt;br /&gt;
&lt;br /&gt;
Currently the mechglue code can handle only one interposer plugin&lt;br /&gt;
per-mechanism.&lt;br /&gt;
&lt;br /&gt;
= New APIs =&lt;br /&gt;
&lt;br /&gt;
Internal mechglue functions:&lt;br /&gt;
* gssint_select_mech_type()&lt;br /&gt;
* gssint_get_public_oid()&lt;br /&gt;
* gssint_make_public_oid_set()&lt;br /&gt;
&lt;br /&gt;
Interposer initialization:&lt;br /&gt;
* gss_mech_interposer()&lt;br /&gt;
&lt;br /&gt;
New mechanism functions:&lt;br /&gt;
* gssspi_import_sec_context_by_mech()&lt;br /&gt;
* gssspi_import_name_by_mech()&lt;br /&gt;
* gssspi_import_creD_by_mech()&lt;br /&gt;
&lt;br /&gt;
Modified structures:&lt;br /&gt;
* gss_mech_info&lt;br /&gt;
&lt;br /&gt;
== Internal mechglue functions ==&lt;br /&gt;
&lt;br /&gt;
These new functions are used to aid the mechglue in finding the correct&lt;br /&gt;
mechanism to use when an interposer plugin is configured to intercept real&lt;br /&gt;
mechanisms.&lt;br /&gt;
&lt;br /&gt;
=== gssint_select_mech_type() ===&lt;br /&gt;
&lt;br /&gt;
This funciton is now called in the mechglue each time a mech oid is used as&lt;br /&gt;
input into a GSSAPI function. It correctly handles looking up by special OID&lt;br /&gt;
(if a interposer plugin is configured and returns the actual mechanism oid&lt;br /&gt;
to be used in case a mechanism has been interposed (typically the interposer&lt;br /&gt;
plugin mechanism).&lt;br /&gt;
&lt;br /&gt;
=== gssint_get_public_oid() ===&lt;br /&gt;
&lt;br /&gt;
This function always return the appropriate public oid associated with the&lt;br /&gt;
input oid which can be an actual public oid or a special interposer oid.&lt;br /&gt;
&lt;br /&gt;
=== gssint_make_public_oid_set() ===&lt;br /&gt;
&lt;br /&gt;
As the above but for oid sets.&lt;br /&gt;
&lt;br /&gt;
== Interposer initialization ==&lt;br /&gt;
&lt;br /&gt;
=== gss_mech_interposer() ===&lt;br /&gt;
&lt;br /&gt;
This function is looked up right after an interposer plugin is dlopen()ed and&lt;br /&gt;
is called to initialize the plugin. It returns a list of mechanism to&lt;br /&gt;
interpose. The mechglue uses this information to properly set up information in&lt;br /&gt;
the gss_mech_info structure of the plugin and on the structures of the&lt;br /&gt;
interposed mechanisms.&lt;br /&gt;
&lt;br /&gt;
== New mechanism functions ==&lt;br /&gt;
&lt;br /&gt;
These functions are required to properly pass information to interposer&lt;br /&gt;
plugins. In particular the original functions did not pass to the interposer&lt;br /&gt;
plugin the oid of the mechanism these functions are supposed to act on. This is&lt;br /&gt;
a problem for an interposer plugin that can intercept multiple mechanisms as it&lt;br /&gt;
has no way to understand which mechanism it is supposed to interpose on a specific request.&lt;br /&gt;
By passing in the public mechanism oid the mechglue&lt;br /&gt;
intended to use interposer plugins can properly handle the request.&lt;br /&gt;
&lt;br /&gt;
=== gssspi_import_sec_context_by_mech() ===&lt;br /&gt;
&lt;br /&gt;
Same as gss_import_sec_context() but specifies the mechanism to use.&lt;br /&gt;
&lt;br /&gt;
=== gssspi_import_name_by_mech() ===&lt;br /&gt;
&lt;br /&gt;
Same as gss_import_name() but specifies the mechanism to use.&lt;br /&gt;
&lt;br /&gt;
=== gssspi_import_cred_by_mech() ===&lt;br /&gt;
&lt;br /&gt;
Same as gss_import_cred() but specifies the mechanism to use.&lt;br /&gt;
&lt;br /&gt;
== Modified structures ==&lt;br /&gt;
&lt;br /&gt;
Only one structure needed modifications:&lt;br /&gt;
&lt;br /&gt;
=== gss_mech_info ===&lt;br /&gt;
&lt;br /&gt;
This is the structure that describes internally a mechanism. In order to allow&lt;br /&gt;
GSSAPI to handle interposition this structure has now 3 new members:&lt;br /&gt;
* is_interposer&lt;br /&gt;
a boolean flag that is used to mark a mechanism as an interposer mechanism and not a real mechanism&lt;br /&gt;
* ine_mech_type&lt;br /&gt;
the oid of the interposer mechanism, it is set on real mechanisms&lt;br /&gt;
* int_mech&lt;br /&gt;
pointer to the interposer mechanism vtable&lt;br /&gt;
&lt;br /&gt;
== New Functions Signatures ==&lt;br /&gt;
&lt;br /&gt;
 OM_uint32&lt;br /&gt;
 gssint_select_mech_type(&lt;br /&gt;
    OM_uint32 *minor,&lt;br /&gt;
    gss_const_OID oid,&lt;br /&gt;
    gss_OID *selected_oid&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 gss_OID&lt;br /&gt;
 gssint_get_public_oid(&lt;br /&gt;
    gss_const_OID oid&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32&lt;br /&gt;
 gssint_make_public_oid_set(&lt;br /&gt;
    OM_uint32 *minor_status,                        &lt;br /&gt;
    gss_OID oids,&lt;br /&gt;
    int count,&lt;br /&gt;
    gss_OID_set *public_set&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gssspi_import_sec_context_by_mech(&lt;br /&gt;
    OM_uint32 *minor_status,&lt;br /&gt;
    gss_OID desired_mech,&lt;br /&gt;
    gss_buffer_t interprocess_token,&lt;br /&gt;
    gss_ctx_id_t *context_handle&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gssspi_import_name_by_mech(&lt;br /&gt;
    OM_uint32 *minor_status,&lt;br /&gt;
    gss_OID mech_type,&lt;br /&gt;
    gss_buffer_t input_name_buffer,&lt;br /&gt;
    gss_OID input_name_type,&lt;br /&gt;
    gss_name_t *output_name&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gssspi_import_cred_by_mech(&lt;br /&gt;
    OM_uint32 *minor_status,&lt;br /&gt;
    gss_OID mech_type,&lt;br /&gt;
    gss_buffer_t token,&lt;br /&gt;
    gss_cred_id_t *cred_handle&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 gss_OID_set gss_mech_interposer(&lt;br /&gt;
    gss_OID mech_type&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
= Testing =&lt;br /&gt;
&lt;br /&gt;
An interposer plugin with a test program is being worked on as part of the [https://fedorahosted.org/gss-proxy GSS-Proxy project]. that work will be used as a template for internal tests once it is complete. The internal test will simply loopback into gssapi. Thi will guarantee no regressions are introduced in the interposer interface.&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Interposer_Mechanism&amp;diff=4863</id>
		<title>Projects/Interposer Mechanism</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Interposer_Mechanism&amp;diff=4863"/>
				<updated>2012-10-02T21:24:47Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: /* Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
This project is about creating a mechanism by which it is possible to intercept accepting and initializing a security context at the mechglue layer so that any mechanism can be ideally proxied to a separate application potentially running in a different security context.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
During the development of the [https://fedorahosted.org/gss-proxy GSS-Proxy project] in connection with the [[Projects/ProxyGSSAPI]] a new GSSAPI Mechanism interface has emerged. We call this kind of mechanism an '''Interposer Mechanism''' as it intercept all function calls for a specific mechanism.&lt;br /&gt;
&lt;br /&gt;
The Interposer Mechanism instructs the mechglue layer on what mechanisms it wants to interpose. Once a mechnism is interposed the mechglue will always call the interposer for any function related to interposed mechanism.&lt;br /&gt;
&lt;br /&gt;
The interposer plugin is responsible for handling the requested functionality, it can proxy it to another process (for example to the GSS-Proxy daemon) or can short-circuit it back to the mechglue in order to call the original mechanism handler.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
The Interposer mechanism must be able to intercept any mechanism function.&lt;br /&gt;
The Interposer mechanism must also be able to call back into the mechglue in order to execute code using the original mechanism.&lt;br /&gt;
The interposer mechanism should be completely transparent to applications, in that pure gssapi application should not need any modification in order to work with the interposer mechanism nor need to issue any special call to use the interposer functionality.&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
&lt;br /&gt;
In order to allow interposer plugins to re-enter the mechglue we had to change their function signature so that the SPI does not match the GSs API function signatures, as interposer plugins are allowed to call back into GSSAPI.&lt;br /&gt;
The interposer plugins SPI uses the gssi_ prefix (GSS Interposer) for all the mechglue functions it implements.&lt;br /&gt;
&lt;br /&gt;
The interposer plugins are specified in the gss.conf file with a new option&lt;br /&gt;
that identifies them as such. They also exposes an interposer plugin specific&lt;br /&gt;
initialization function that is used by the mechglue to initialized the plugin&lt;br /&gt;
and also to retieve the list of mechanism the plugin wnats to interpose.&lt;br /&gt;
&lt;br /&gt;
In order to allow the interposer plugin to re-enter the mechglue avoiding loops,&lt;br /&gt;
interposer plugins create special mech oids by concatenating the interposer mechanism and the original interposed mechanism oid and pass it as input to gssapi&lt;br /&gt;
functions that accept mechanism oids as input. The mechglue makes sure these oids&lt;br /&gt;
are never leaked to applications, by providing a mapping back to normal public&lt;br /&gt;
oids whenever they are passed to mechanisms or returned to applications.&lt;br /&gt;
&lt;br /&gt;
= Limitations =&lt;br /&gt;
&lt;br /&gt;
Currently the mechglue code can handle only one interposer plugin&lt;br /&gt;
per-mechanism.&lt;br /&gt;
&lt;br /&gt;
= New APIs =&lt;br /&gt;
&lt;br /&gt;
Internal mechglue functions:&lt;br /&gt;
* gssint_select_mech_type()&lt;br /&gt;
* gssint_get_public_oid()&lt;br /&gt;
* gssint_make_public_oid_set()&lt;br /&gt;
&lt;br /&gt;
Interposer initialization:&lt;br /&gt;
* gss_mech_interposer()&lt;br /&gt;
&lt;br /&gt;
New mechanism functions:&lt;br /&gt;
* gssspi_import_sec_context_by_mech()&lt;br /&gt;
* gssspi_import_name_by_mech()&lt;br /&gt;
* gssspi_import_creD_by_mech()&lt;br /&gt;
&lt;br /&gt;
Modified structures:&lt;br /&gt;
* gss_mech_info&lt;br /&gt;
&lt;br /&gt;
== Internal mechglue functions ==&lt;br /&gt;
&lt;br /&gt;
These new functions are used to aid the mechglue in finding the correct&lt;br /&gt;
mechanism to use when an interposer plugin is configured to intercept real&lt;br /&gt;
mechanisms.&lt;br /&gt;
&lt;br /&gt;
=== gssint_select_mech_type() ===&lt;br /&gt;
&lt;br /&gt;
This funciton is now called in the mechglue each time a mech oid is used as&lt;br /&gt;
input into a GSSAPI function. It correctly handles looking up by special OID&lt;br /&gt;
(if a interposer plugin is configured and returns the actual mechanism oid&lt;br /&gt;
to be used in case a mechanism has been interposed (typically the interposer&lt;br /&gt;
plugin mechanism).&lt;br /&gt;
&lt;br /&gt;
=== gssint_get_public_oid() ===&lt;br /&gt;
&lt;br /&gt;
This function always return the appropriate public oid associated with the&lt;br /&gt;
input oid which can be an actual public oid or a special interposer oid.&lt;br /&gt;
&lt;br /&gt;
=== gssint_make_public_oid_set() ===&lt;br /&gt;
&lt;br /&gt;
As the above but for oid sets.&lt;br /&gt;
&lt;br /&gt;
== Interposer initialization ==&lt;br /&gt;
&lt;br /&gt;
=== gss_mech_interposer() ===&lt;br /&gt;
&lt;br /&gt;
This function is looked up right after an interposer plugin is dlopen()ed and&lt;br /&gt;
is called to initialize the plugin. It returns a list of mechanism to&lt;br /&gt;
interpose. The mechglue uses this information to properly set up information in&lt;br /&gt;
the gss_mech_info structure of the plugin and on the structures of the&lt;br /&gt;
interposed mechanisms.&lt;br /&gt;
&lt;br /&gt;
== New mechanism functions ==&lt;br /&gt;
&lt;br /&gt;
These functions are required to properly pass information to interposer&lt;br /&gt;
plugins. In particular the original functions did not pass to the interposer&lt;br /&gt;
plugin the oid of the mechanism these functions are supposed to act on. This is&lt;br /&gt;
a problem for an interposer plugin that can intercept multiple mechanisms as it&lt;br /&gt;
has no way to understand which mechanism it is supposed to interpose on a specific request.&lt;br /&gt;
By passing in the public mechanism oid the mechglue&lt;br /&gt;
intended to use interposer plugins can properly handle the request.&lt;br /&gt;
&lt;br /&gt;
=== gssspi_import_sec_context_by_mech() ===&lt;br /&gt;
&lt;br /&gt;
Same as gss_import_sec_context() but specifies the mechanism to use.&lt;br /&gt;
&lt;br /&gt;
=== gssspi_import_name_by_mech() ===&lt;br /&gt;
&lt;br /&gt;
Same as gss_import_name() but specifies the mechanism to use.&lt;br /&gt;
&lt;br /&gt;
=== gssspi_import_cred_by_mech() ===&lt;br /&gt;
&lt;br /&gt;
Same as gss_import_cred() but specifies the mechanism to use.&lt;br /&gt;
&lt;br /&gt;
== Modified structures ==&lt;br /&gt;
&lt;br /&gt;
Only one structure needed modifications:&lt;br /&gt;
&lt;br /&gt;
=== gss_mech_info ===&lt;br /&gt;
&lt;br /&gt;
This is the structure that describes internally a mechanism. In order to allow&lt;br /&gt;
GSSAPI to handle interposition this structure has now 3 new members:&lt;br /&gt;
* is_interposer&lt;br /&gt;
a boolean flag that is used to mark a mechanism as an interposer mechanism and not a real mechanism&lt;br /&gt;
* ine_mech_type&lt;br /&gt;
the oid of the interposer mechanism, it is set on real mechanisms&lt;br /&gt;
* int_mech&lt;br /&gt;
pointer to the interposer mechanism vtable&lt;br /&gt;
&lt;br /&gt;
== New Functions Signatures ==&lt;br /&gt;
&lt;br /&gt;
 OM_uint32&lt;br /&gt;
 gssint_select_mech_type(&lt;br /&gt;
    OM_uint32 *minor,&lt;br /&gt;
    gss_const_OID oid,&lt;br /&gt;
    gss_OID *selected_oid&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 gss_OID&lt;br /&gt;
 gssint_get_public_oid(&lt;br /&gt;
    gss_const_OID oid&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32&lt;br /&gt;
 gssint_make_public_oid_set(&lt;br /&gt;
    OM_uint32 *minor_status,                        &lt;br /&gt;
    gss_OID oids,&lt;br /&gt;
    int count,&lt;br /&gt;
    gss_OID_set *public_set&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gssspi_import_sec_context_by_mech(&lt;br /&gt;
    OM_uint32 *minor_status,&lt;br /&gt;
    gss_OID desired_mech,&lt;br /&gt;
    gss_buffer_t interprocess_token,&lt;br /&gt;
    gss_ctx_id_t *context_handle&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gssspi_import_name_by_mech(&lt;br /&gt;
    OM_uint32 *minor_status,&lt;br /&gt;
    gss_OID mech_type,&lt;br /&gt;
    gss_buffer_t input_name_buffer,&lt;br /&gt;
    gss_OID input_name_type,&lt;br /&gt;
    gss_name_t *output_name&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gssspi_import_cred_by_mech(&lt;br /&gt;
    OM_uint32 *minor_status,&lt;br /&gt;
    gss_OID mech_type,&lt;br /&gt;
    gss_buffer_t token,&lt;br /&gt;
    gss_cred_id_t *cred_handle&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 gss_OID_set gss_mech_interposer(&lt;br /&gt;
    gss_OID mech_type&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
= Testing =&lt;br /&gt;
&lt;br /&gt;
An interposer plugin with a test program is being worked on as part of the [https://fedorahosted.org/gss-proxy GSS-Proxy project]. that work will be used as a template for internal tests once it is complete. The internal test will simply loopback into gssapi. Thi will guarantee no regressions are introduced in the interposer interface.&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Interposer_Mechanism&amp;diff=4861</id>
		<title>Projects/Interposer Mechanism</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Interposer_Mechanism&amp;diff=4861"/>
				<updated>2012-10-02T21:12:41Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: Projects/Interposer Mehcanism moved to Projects/Interposer Mechanism&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
This project is about creating a mechanism by which it is possible to intercept accepting and initializing a security context at the mechglue layer so that any mechanism can be ideally proxied to a separate application potentially running in a different security context.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
During the development of the [https://fedorahosted.org/gss-proxy GSS-Proxy project] in connection with the [[Projects/ProxyGSSAPI]] a new GSSAPI Mechanism interface has emerged. We call this kind of mechanism an '''Interposer Mechanism''' as it intercept all function calls for a specific mechanism.&lt;br /&gt;
&lt;br /&gt;
The Interposer Mechanism instructs the mechglue layer on what mechanisms it wants to interpose. Once a mechnism is interposed the mechglue will always call the interposer for any function related to interposed mechanism.&lt;br /&gt;
&lt;br /&gt;
The interposer plugin is responsible for handling the requested functionality, it can proxy it to another process (for example to the GSS-Proxy daemon) or can short-circuit it back to the mechglue in order to call the original mechanism handler.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
The Interposer mechanism must be able to intercept any mechanism function.&lt;br /&gt;
The Interposer mechanism must also be able to call back into the mechglue in order to execute code using the original mechanism.&lt;br /&gt;
The interposer mechanism should be completely transparent to applications, in that pure gssapi application should not need any modification in order to work with the interposer mechanism nor need to issue any special call to use the interposer functionality.&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
&lt;br /&gt;
In order to allow interposer plugins to re-enter the mechglue we had to change their function signature so that the SPI does not match the GSs API function signatures, as interposer plugins are allowed to call back into GSSAPI.&lt;br /&gt;
The interposer plugins SPI uses the gssi_ prefix (GSS Interposer) for all the mechglue functions it implements.&lt;br /&gt;
&lt;br /&gt;
The interposer plugins are specified in the gss.conf file with a new option&lt;br /&gt;
that identifies them as such. They also exposes an interposer plugin specific&lt;br /&gt;
initialization function that is used by the mechglue to initialized the plugin&lt;br /&gt;
and also to retieve the list of mechanism the plugin wnats to interpose.&lt;br /&gt;
&lt;br /&gt;
In order to allow the interposer plugin to re-enter the mechglue avoiding loops&lt;br /&gt;
interposer plugins create special invalid mech oids to pass as inputs to gssapi&lt;br /&gt;
functions that accept mech oids in input. The mechglue makes sure these oids&lt;br /&gt;
are never leaked to applications, by providing a mapping back to normal public&lt;br /&gt;
oids whenever they are passed to mechanisms or returned to applications.&lt;br /&gt;
&lt;br /&gt;
= Limitations =&lt;br /&gt;
&lt;br /&gt;
Currently the mechglue code can handle only one interposer plugin&lt;br /&gt;
per-mechanism.&lt;br /&gt;
&lt;br /&gt;
= New APIs =&lt;br /&gt;
&lt;br /&gt;
Internal mechglue functions:&lt;br /&gt;
* gssint_select_mech_type()&lt;br /&gt;
* gssint_get_public_oid()&lt;br /&gt;
* gssint_make_public_oid_set()&lt;br /&gt;
&lt;br /&gt;
Interposer initialization:&lt;br /&gt;
* gss_mech_interposer()&lt;br /&gt;
&lt;br /&gt;
New mechanism functions:&lt;br /&gt;
* gssspi_import_sec_context_by_mech()&lt;br /&gt;
* gssspi_import_name_by_mech()&lt;br /&gt;
* gssspi_import_creD_by_mech()&lt;br /&gt;
&lt;br /&gt;
Modified structures:&lt;br /&gt;
* gss_mech_info&lt;br /&gt;
&lt;br /&gt;
== Internal mechglue functions ==&lt;br /&gt;
&lt;br /&gt;
These new functions are used to aid the mechglue in finding the correct&lt;br /&gt;
mechanism to use when an interposer plugin is configured to intercept real&lt;br /&gt;
mechanisms.&lt;br /&gt;
&lt;br /&gt;
=== gssint_select_mech_type() ===&lt;br /&gt;
&lt;br /&gt;
This funciton is now called in the mechglue each time a mech oid is used as&lt;br /&gt;
input into a GSSAPI function. It correctly handles looking up by special OID&lt;br /&gt;
(if a interposer plugin is configured and returns the actual mechanism oid&lt;br /&gt;
to be used in case a mechanism has been interposed (typically the interposer&lt;br /&gt;
plugin mechanism).&lt;br /&gt;
&lt;br /&gt;
=== gssint_get_public_oid() ===&lt;br /&gt;
&lt;br /&gt;
This function always return the appropriate public oid associated with the&lt;br /&gt;
input oid which can be an actual public oid or a special interposer oid.&lt;br /&gt;
&lt;br /&gt;
=== gssint_make_public_oid_set() ===&lt;br /&gt;
&lt;br /&gt;
As the above but for oid sets.&lt;br /&gt;
&lt;br /&gt;
== Interposer initialization ==&lt;br /&gt;
&lt;br /&gt;
=== gss_mech_interposer() ===&lt;br /&gt;
&lt;br /&gt;
This function is looked up right after an interposer plugin is dlopen()ed and&lt;br /&gt;
is called to initialize the plugin. It returns a list of mechanism to&lt;br /&gt;
interpose. The mechglue uses this information to properly set up information in&lt;br /&gt;
the gss_mech_info structure of the plugin and on the structures of the&lt;br /&gt;
interposed mechanisms.&lt;br /&gt;
&lt;br /&gt;
== New mechanism functions ==&lt;br /&gt;
&lt;br /&gt;
These functions are required to properly pass information to interposer&lt;br /&gt;
plugins. In particular the original functions did not pass to the interposer&lt;br /&gt;
plugin the oid of the mechanism these functions are supposed to act on. This is&lt;br /&gt;
a problem for an interposer plugin that can intercept multiple mechanisms as it&lt;br /&gt;
has no way to understand which mechanism it is supposed to interpose on a specific request.&lt;br /&gt;
By passing in the public mechanism oid the mechglue&lt;br /&gt;
intended to use interposer plugins can properly handle the request.&lt;br /&gt;
&lt;br /&gt;
=== gssspi_import_sec_context_by_mech() ===&lt;br /&gt;
&lt;br /&gt;
Same as gss_import_sec_context() but specifies the mechanism to use.&lt;br /&gt;
&lt;br /&gt;
=== gssspi_import_name_by_mech() ===&lt;br /&gt;
&lt;br /&gt;
Same as gss_import_name() but specifies the mechanism to use.&lt;br /&gt;
&lt;br /&gt;
=== gssspi_import_cred_by_mech() ===&lt;br /&gt;
&lt;br /&gt;
Same as gss_import_cred() but specifies the mechanism to use.&lt;br /&gt;
&lt;br /&gt;
== Modified structures ==&lt;br /&gt;
&lt;br /&gt;
Only one structure needed modifications:&lt;br /&gt;
&lt;br /&gt;
=== gss_mech_info ===&lt;br /&gt;
&lt;br /&gt;
This is the structure that describes internally a mechanism. In order to allow&lt;br /&gt;
GSSAPI to handle interposition this structure has now 3 new members:&lt;br /&gt;
* is_interposer&lt;br /&gt;
a boolean flag that is used to mark a mechanism as an interposer mechanism and not a real mechanism&lt;br /&gt;
* ine_mech_type&lt;br /&gt;
the oid of the interposer mechanism, it is set on real mechanisms&lt;br /&gt;
* int_mech&lt;br /&gt;
pointer to the interposer mechanism vtable&lt;br /&gt;
&lt;br /&gt;
== New Functions Signatures ==&lt;br /&gt;
&lt;br /&gt;
 OM_uint32&lt;br /&gt;
 gssint_select_mech_type(&lt;br /&gt;
    OM_uint32 *minor,&lt;br /&gt;
    gss_const_OID oid,&lt;br /&gt;
    gss_OID *selected_oid&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 gss_OID&lt;br /&gt;
 gssint_get_public_oid(&lt;br /&gt;
    gss_const_OID oid&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32&lt;br /&gt;
 gssint_make_public_oid_set(&lt;br /&gt;
    OM_uint32 *minor_status,                        &lt;br /&gt;
    gss_OID oids,&lt;br /&gt;
    int count,&lt;br /&gt;
    gss_OID_set *public_set&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gssspi_import_sec_context_by_mech(&lt;br /&gt;
    OM_uint32 *minor_status,&lt;br /&gt;
    gss_OID desired_mech,&lt;br /&gt;
    gss_buffer_t interprocess_token,&lt;br /&gt;
    gss_ctx_id_t *context_handle&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gssspi_import_name_by_mech(&lt;br /&gt;
    OM_uint32 *minor_status,&lt;br /&gt;
    gss_OID mech_type,&lt;br /&gt;
    gss_buffer_t input_name_buffer,&lt;br /&gt;
    gss_OID input_name_type,&lt;br /&gt;
    gss_name_t *output_name&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gssspi_import_cred_by_mech(&lt;br /&gt;
    OM_uint32 *minor_status,&lt;br /&gt;
    gss_OID mech_type,&lt;br /&gt;
    gss_buffer_t token,&lt;br /&gt;
    gss_cred_id_t *cred_handle&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 gss_OID_set gss_mech_interposer(&lt;br /&gt;
    gss_OID mech_type&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
= Testing =&lt;br /&gt;
&lt;br /&gt;
An interposer plugin with a test program is being worked on as part of the [https://fedorahosted.org/gss-proxy GSS-Proxy project]. that work will be used as a template for internal tests once it is complete. The internal test will simply loopback into gssapi. Thi will guarantee no regressions are introduced in the interposer interface.&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Interposer_Mehcanism&amp;diff=4862</id>
		<title>Projects/Interposer Mehcanism</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Interposer_Mehcanism&amp;diff=4862"/>
				<updated>2012-10-02T21:12:41Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: Projects/Interposer Mehcanism moved to Projects/Interposer Mechanism&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Projects/Interposer Mechanism]]&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Interposer_Mechanism&amp;diff=4860</id>
		<title>Projects/Interposer Mechanism</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Interposer_Mechanism&amp;diff=4860"/>
				<updated>2012-10-02T21:12:16Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
This project is about creating a mechanism by which it is possible to intercept accepting and initializing a security context at the mechglue layer so that any mechanism can be ideally proxied to a separate application potentially running in a different security context.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
During the development of the [https://fedorahosted.org/gss-proxy GSS-Proxy project] in connection with the [[Projects/ProxyGSSAPI]] a new GSSAPI Mechanism interface has emerged. We call this kind of mechanism an '''Interposer Mechanism''' as it intercept all function calls for a specific mechanism.&lt;br /&gt;
&lt;br /&gt;
The Interposer Mechanism instructs the mechglue layer on what mechanisms it wants to interpose. Once a mechnism is interposed the mechglue will always call the interposer for any function related to interposed mechanism.&lt;br /&gt;
&lt;br /&gt;
The interposer plugin is responsible for handling the requested functionality, it can proxy it to another process (for example to the GSS-Proxy daemon) or can short-circuit it back to the mechglue in order to call the original mechanism handler.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
The Interposer mechanism must be able to intercept any mechanism function.&lt;br /&gt;
The Interposer mechanism must also be able to call back into the mechglue in order to execute code using the original mechanism.&lt;br /&gt;
The interposer mechanism should be completely transparent to applications, in that pure gssapi application should not need any modification in order to work with the interposer mechanism nor need to issue any special call to use the interposer functionality.&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
&lt;br /&gt;
In order to allow interposer plugins to re-enter the mechglue we had to change their function signature so that the SPI does not match the GSs API function signatures, as interposer plugins are allowed to call back into GSSAPI.&lt;br /&gt;
The interposer plugins SPI uses the gssi_ prefix (GSS Interposer) for all the mechglue functions it implements.&lt;br /&gt;
&lt;br /&gt;
The interposer plugins are specified in the gss.conf file with a new option&lt;br /&gt;
that identifies them as such. They also exposes an interposer plugin specific&lt;br /&gt;
initialization function that is used by the mechglue to initialized the plugin&lt;br /&gt;
and also to retieve the list of mechanism the plugin wnats to interpose.&lt;br /&gt;
&lt;br /&gt;
In order to allow the interposer plugin to re-enter the mechglue avoiding loops&lt;br /&gt;
interposer plugins create special invalid mech oids to pass as inputs to gssapi&lt;br /&gt;
functions that accept mech oids in input. The mechglue makes sure these oids&lt;br /&gt;
are never leaked to applications, by providing a mapping back to normal public&lt;br /&gt;
oids whenever they are passed to mechanisms or returned to applications.&lt;br /&gt;
&lt;br /&gt;
= Limitations =&lt;br /&gt;
&lt;br /&gt;
Currently the mechglue code can handle only one interposer plugin&lt;br /&gt;
per-mechanism.&lt;br /&gt;
&lt;br /&gt;
= New APIs =&lt;br /&gt;
&lt;br /&gt;
Internal mechglue functions:&lt;br /&gt;
* gssint_select_mech_type()&lt;br /&gt;
* gssint_get_public_oid()&lt;br /&gt;
* gssint_make_public_oid_set()&lt;br /&gt;
&lt;br /&gt;
Interposer initialization:&lt;br /&gt;
* gss_mech_interposer()&lt;br /&gt;
&lt;br /&gt;
New mechanism functions:&lt;br /&gt;
* gssspi_import_sec_context_by_mech()&lt;br /&gt;
* gssspi_import_name_by_mech()&lt;br /&gt;
* gssspi_import_creD_by_mech()&lt;br /&gt;
&lt;br /&gt;
Modified structures:&lt;br /&gt;
* gss_mech_info&lt;br /&gt;
&lt;br /&gt;
== Internal mechglue functions ==&lt;br /&gt;
&lt;br /&gt;
These new functions are used to aid the mechglue in finding the correct&lt;br /&gt;
mechanism to use when an interposer plugin is configured to intercept real&lt;br /&gt;
mechanisms.&lt;br /&gt;
&lt;br /&gt;
=== gssint_select_mech_type() ===&lt;br /&gt;
&lt;br /&gt;
This funciton is now called in the mechglue each time a mech oid is used as&lt;br /&gt;
input into a GSSAPI function. It correctly handles looking up by special OID&lt;br /&gt;
(if a interposer plugin is configured and returns the actual mechanism oid&lt;br /&gt;
to be used in case a mechanism has been interposed (typically the interposer&lt;br /&gt;
plugin mechanism).&lt;br /&gt;
&lt;br /&gt;
=== gssint_get_public_oid() ===&lt;br /&gt;
&lt;br /&gt;
This function always return the appropriate public oid associated with the&lt;br /&gt;
input oid which can be an actual public oid or a special interposer oid.&lt;br /&gt;
&lt;br /&gt;
=== gssint_make_public_oid_set() ===&lt;br /&gt;
&lt;br /&gt;
As the above but for oid sets.&lt;br /&gt;
&lt;br /&gt;
== Interposer initialization ==&lt;br /&gt;
&lt;br /&gt;
=== gss_mech_interposer() ===&lt;br /&gt;
&lt;br /&gt;
This function is looked up right after an interposer plugin is dlopen()ed and&lt;br /&gt;
is called to initialize the plugin. It returns a list of mechanism to&lt;br /&gt;
interpose. The mechglue uses this information to properly set up information in&lt;br /&gt;
the gss_mech_info structure of the plugin and on the structures of the&lt;br /&gt;
interposed mechanisms.&lt;br /&gt;
&lt;br /&gt;
== New mechanism functions ==&lt;br /&gt;
&lt;br /&gt;
These functions are required to properly pass information to interposer&lt;br /&gt;
plugins. In particular the original functions did not pass to the interposer&lt;br /&gt;
plugin the oid of the mechanism these functions are supposed to act on. This is&lt;br /&gt;
a problem for an interposer plugin that can intercept multiple mechanisms as it&lt;br /&gt;
has no way to understand which mechanism it is supposed to interpose on a specific request.&lt;br /&gt;
By passing in the public mechanism oid the mechglue&lt;br /&gt;
intended to use interposer plugins can properly handle the request.&lt;br /&gt;
&lt;br /&gt;
=== gssspi_import_sec_context_by_mech() ===&lt;br /&gt;
&lt;br /&gt;
Same as gss_import_sec_context() but specifies the mechanism to use.&lt;br /&gt;
&lt;br /&gt;
=== gssspi_import_name_by_mech() ===&lt;br /&gt;
&lt;br /&gt;
Same as gss_import_name() but specifies the mechanism to use.&lt;br /&gt;
&lt;br /&gt;
=== gssspi_import_cred_by_mech() ===&lt;br /&gt;
&lt;br /&gt;
Same as gss_import_cred() but specifies the mechanism to use.&lt;br /&gt;
&lt;br /&gt;
== Modified structures ==&lt;br /&gt;
&lt;br /&gt;
Only one structure needed modifications:&lt;br /&gt;
&lt;br /&gt;
=== gss_mech_info ===&lt;br /&gt;
&lt;br /&gt;
This is the structure that describes internally a mechanism. In order to allow&lt;br /&gt;
GSSAPI to handle interposition this structure has now 3 new members:&lt;br /&gt;
* is_interposer&lt;br /&gt;
a boolean flag that is used to mark a mechanism as an interposer mechanism and not a real mechanism&lt;br /&gt;
* ine_mech_type&lt;br /&gt;
the oid of the interposer mechanism, it is set on real mechanisms&lt;br /&gt;
* int_mech&lt;br /&gt;
pointer to the interposer mechanism vtable&lt;br /&gt;
&lt;br /&gt;
== New Functions Signatures ==&lt;br /&gt;
&lt;br /&gt;
 OM_uint32&lt;br /&gt;
 gssint_select_mech_type(&lt;br /&gt;
    OM_uint32 *minor,&lt;br /&gt;
    gss_const_OID oid,&lt;br /&gt;
    gss_OID *selected_oid&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 gss_OID&lt;br /&gt;
 gssint_get_public_oid(&lt;br /&gt;
    gss_const_OID oid&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32&lt;br /&gt;
 gssint_make_public_oid_set(&lt;br /&gt;
    OM_uint32 *minor_status,                        &lt;br /&gt;
    gss_OID oids,&lt;br /&gt;
    int count,&lt;br /&gt;
    gss_OID_set *public_set&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gssspi_import_sec_context_by_mech(&lt;br /&gt;
    OM_uint32 *minor_status,&lt;br /&gt;
    gss_OID desired_mech,&lt;br /&gt;
    gss_buffer_t interprocess_token,&lt;br /&gt;
    gss_ctx_id_t *context_handle&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gssspi_import_name_by_mech(&lt;br /&gt;
    OM_uint32 *minor_status,&lt;br /&gt;
    gss_OID mech_type,&lt;br /&gt;
    gss_buffer_t input_name_buffer,&lt;br /&gt;
    gss_OID input_name_type,&lt;br /&gt;
    gss_name_t *output_name&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gssspi_import_cred_by_mech(&lt;br /&gt;
    OM_uint32 *minor_status,&lt;br /&gt;
    gss_OID mech_type,&lt;br /&gt;
    gss_buffer_t token,&lt;br /&gt;
    gss_cred_id_t *cred_handle&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 gss_OID_set gss_mech_interposer(&lt;br /&gt;
    gss_OID mech_type&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
= Testing =&lt;br /&gt;
&lt;br /&gt;
An interposer plugin with a test program is being worked on as part of the [https://fedorahosted.org/gss-proxy GSS-Proxy project]. that work will be used as a template for internal tests once it is complete. The internal test will simply loopback into gssapi. Thi will guarantee no regressions are introduced in the interposer interface.&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Interposer_Mechanism&amp;diff=4859</id>
		<title>Projects/Interposer Mechanism</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Interposer_Mechanism&amp;diff=4859"/>
				<updated>2012-10-02T21:09:41Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
This project is about creating a mechanism by which it is possible to intercept accepting and initializing a security context at the mechglue layer so that any mechanism can be ideally proxied to a separate application potentially running in a different security context.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
During the development of the [https://fedorahosted.org/gss-proxy GSS-Proxy project] in connection with the [[Projects/ProxyGSSAPI]] a new GSSAPI Mechanism interface has emerged. We call this kind of mechanism an '''Interposer Mechanism''' as it intercept all function calls for a specific mechanism.&lt;br /&gt;
&lt;br /&gt;
The Interposer Mechanism instructs the mechglue layer on what mechanisms it wants to interpose. Once a mechnism is interposed the mechglue will always call the interposer for any function related to interposed mechanism.&lt;br /&gt;
&lt;br /&gt;
The interposer plugin is responsible for handling the requested functionality, it can proxy it to another process (for example to the GSS-Proxy daemon) or can short-circuit it back to the mechglue in order to call the original mechanism handler.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
The Interposer mechanism must be able to intercept any mechanism function.&lt;br /&gt;
The Interposer mechanism must also be able to call back into the mechglue in order to execute code using the original mechanism.&lt;br /&gt;
The interposer mechanism should be completely transparent to applications, in that pure gssapi application should not need any modification in order to work with the interposer mechanism nor need to issue any special call to use the interposer functionality.&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
&lt;br /&gt;
In order to allow interposer plugins to re-enter the mechglue we had to change their function signature so that the SPI does not match the GSs API function signatures, as interposer plugins are allowed to call back into GSSAPI.&lt;br /&gt;
The interposer plugins SPI uses the gssi_ prefix (GSS Interposer) for all the mechglue functions it implements.&lt;br /&gt;
&lt;br /&gt;
The interposer plugins are specified in the gss.conf file with a new option&lt;br /&gt;
that identifies them as such. They also exposes an interposer plugin specific&lt;br /&gt;
initialization function that is used by the mechglue to initialized the plguin&lt;br /&gt;
and also to retieve the list of mechanism the plugin wnats to interpose.&lt;br /&gt;
&lt;br /&gt;
In order to allow the interposer plugin to re-enter the mechglue avoiding loops&lt;br /&gt;
interposer plugins create special invalid mech oids to pass as inputs to gssapi&lt;br /&gt;
functions that accept mech oids in input. The mechglue makes sure these oids&lt;br /&gt;
are never leaked to applications, by providing a mapping back to normal public&lt;br /&gt;
oids whenever they are passed to mechanisms or returned to applications.&lt;br /&gt;
&lt;br /&gt;
= Limitations =&lt;br /&gt;
&lt;br /&gt;
Currently the mechglue code can handle only one interposer plugin&lt;br /&gt;
per-mechanism.&lt;br /&gt;
&lt;br /&gt;
= New APIs =&lt;br /&gt;
&lt;br /&gt;
Internal mechglue functions:&lt;br /&gt;
* gssint_select_mech_type()&lt;br /&gt;
* gssint_get_public_oid()&lt;br /&gt;
* gssint_make_public_oid_set()&lt;br /&gt;
&lt;br /&gt;
Interposer initialization:&lt;br /&gt;
* gss_mech_interposer()&lt;br /&gt;
&lt;br /&gt;
New mechanism functions:&lt;br /&gt;
* gssspi_import_sec_context_by_mech()&lt;br /&gt;
* gssspi_import_name_by_mech()&lt;br /&gt;
* gssspi_import_creD_by_mech()&lt;br /&gt;
&lt;br /&gt;
Modified structures:&lt;br /&gt;
* gss_mech_info&lt;br /&gt;
&lt;br /&gt;
== Internal mechglue functions ==&lt;br /&gt;
&lt;br /&gt;
These new functions are used to aid the mechglue in finding the correct&lt;br /&gt;
mechanism to use when an interposer plugin is configured to intercept real&lt;br /&gt;
mechanisms.&lt;br /&gt;
&lt;br /&gt;
=== gssint_select_mech_type() ===&lt;br /&gt;
&lt;br /&gt;
This funciton is now called in the mechglue each time a mech oid is used as&lt;br /&gt;
input into a GSSAPI function. It correctly handles looking up by special OID&lt;br /&gt;
(if a interposer plugin is configured and returns the actual mechanism oid&lt;br /&gt;
to be used in case a mechanism has been interposed (typically the interposer&lt;br /&gt;
plugin mechanism).&lt;br /&gt;
&lt;br /&gt;
=== gssint_get_public_oid() ===&lt;br /&gt;
&lt;br /&gt;
This function always return the appropriate public oid associated with the&lt;br /&gt;
input oid which can be an actual public oid or a special interposer oid.&lt;br /&gt;
&lt;br /&gt;
=== gssint_make_public_oid_set() ===&lt;br /&gt;
&lt;br /&gt;
As the above but for oid sets.&lt;br /&gt;
&lt;br /&gt;
== Interposer initialization ==&lt;br /&gt;
&lt;br /&gt;
=== gss_mech_interposer() ===&lt;br /&gt;
&lt;br /&gt;
This function is looked up right after an interposer plugin is dlopen()ed and&lt;br /&gt;
is called to initialize the plugin. It returns a list of mechanism to&lt;br /&gt;
interpose. The mechglue uses this information to properly set up information in&lt;br /&gt;
the gss_mech_info structure of the plugin and on the structures of the&lt;br /&gt;
interposed mechanisms.&lt;br /&gt;
&lt;br /&gt;
== New mechanism functions ==&lt;br /&gt;
&lt;br /&gt;
These functions are required to properly pass information to interposer&lt;br /&gt;
plugins. In particular the original functions did not pass to the interposer&lt;br /&gt;
plugin the oid of the mechanism these functions are supposed to act on. This is&lt;br /&gt;
a problem for interposer plugins that can intercept mutiple mechanisms as they&lt;br /&gt;
have no way to understand on which mechanism they are suppoed to act on behalf&lt;br /&gt;
of of the multiple ons that are being interposed.&lt;br /&gt;
By passing in the public mech oid of the interposed mechanism the mechglue&lt;br /&gt;
intended to use, interposer plugins can properly handle the request.&lt;br /&gt;
&lt;br /&gt;
=== gssspi_import_sec_context_by_mech() ===&lt;br /&gt;
&lt;br /&gt;
Same as gss_import_sec_context() but specifies the mechanism to use.&lt;br /&gt;
&lt;br /&gt;
=== gssspi_import_name_by_mech() ===&lt;br /&gt;
&lt;br /&gt;
Same as gss_import_name() but specifies the mechanism to use.&lt;br /&gt;
&lt;br /&gt;
=== gssspi_import_cred_by_mech() ===&lt;br /&gt;
&lt;br /&gt;
Same as gss_import_cred() but specifies the mechanism to use.&lt;br /&gt;
&lt;br /&gt;
== Modified structures ==&lt;br /&gt;
&lt;br /&gt;
Only one structure needed modifications:&lt;br /&gt;
&lt;br /&gt;
=== gss_mech_info ===&lt;br /&gt;
&lt;br /&gt;
This is the structure that describes internally a mechanism. In order to allow&lt;br /&gt;
GSSAPI to handle interposition this structure has now 3 new members:&lt;br /&gt;
* is_interposer&lt;br /&gt;
a boolean flag that is used to mark a mechanism as an interposer mechanism and not a real mchanism&lt;br /&gt;
* ine_mech_type&lt;br /&gt;
the oid of the interposer mechanism, it is set on real mechanisms&lt;br /&gt;
* int_mech&lt;br /&gt;
pointer to the interposer mechanism vtable&lt;br /&gt;
&lt;br /&gt;
== New Functions Signatures ==&lt;br /&gt;
&lt;br /&gt;
 OM_uint32&lt;br /&gt;
 gssint_select_mech_type(&lt;br /&gt;
    OM_uint32 *minor,&lt;br /&gt;
    gss_const_OID oid,&lt;br /&gt;
    gss_OID *selected_oid&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 gss_OID&lt;br /&gt;
 gssint_get_public_oid(&lt;br /&gt;
    gss_const_OID oid&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32&lt;br /&gt;
 gssint_make_public_oid_set(&lt;br /&gt;
    OM_uint32 *minor_status,                        &lt;br /&gt;
    gss_OID oids,&lt;br /&gt;
    int count,&lt;br /&gt;
    gss_OID_set *public_set&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gssspi_import_sec_context_by_mech(&lt;br /&gt;
    OM_uint32 *minor_status,&lt;br /&gt;
    gss_OID desired_mech,&lt;br /&gt;
    gss_buffer_t interprocess_token,&lt;br /&gt;
    gss_ctx_id_t *context_handle&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gssspi_import_name_by_mech(&lt;br /&gt;
    OM_uint32 *minor_status,&lt;br /&gt;
    gss_OID mech_type,&lt;br /&gt;
    gss_buffer_t input_name_buffer,&lt;br /&gt;
    gss_OID input_name_type,&lt;br /&gt;
    gss_name_t *output_name&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gssspi_import_cred_by_mech(&lt;br /&gt;
    OM_uint32 *minor_status,&lt;br /&gt;
    gss_OID mech_type,&lt;br /&gt;
    gss_buffer_t token,&lt;br /&gt;
    gss_cred_id_t *cred_handle&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 gss_OID_set gss_mech_interposer(&lt;br /&gt;
    gss_OID mech_type&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
= Testing =&lt;br /&gt;
&lt;br /&gt;
An interposer plugin with a test program is being worked on as part of the [https://fedorahosted.org/gss-proxy GSS-Proxy project]. that work will be used as a template for internal tests once it is complete. The internal test will simply loopback into gssapi. Thi will guarantee no regressions are introduced in the interposer interface.&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Interposer_Mechanism&amp;diff=4858</id>
		<title>Projects/Interposer Mechanism</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Interposer_Mechanism&amp;diff=4858"/>
				<updated>2012-10-02T21:05:13Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
This project is about creating a mechanism by which it is possible to intercept accepting and initializing a security context at the mechglue layer so that any mechanism can be ideally proxied to a separate application potentially running in a different security context.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
During the development of the [https://fedorahosted.org/gss-proxy GSS-Proxy project] in connection with the [[Projects/ProxyGSSAPI]] a new GSSAPI Mechanism interface has emerged. We call this kind of mechanism an '''Interposer Mechanism''' as it intercept all function calls for a specific mechanism.&lt;br /&gt;
&lt;br /&gt;
The Interposer Mechanism instructs the mechglue layer on what mechanisms it wants to interpose. Once a mechnism is interposed the mechglue will always call the interposer for any function related to interposed mechanism.&lt;br /&gt;
&lt;br /&gt;
The interposer plugin is responsible for handling the requested functionality, it can proxy it to another process (for example to the GSS-Proxy daemon) or can short-circuit it back to the mechglue in order to call the original mechanism handler.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
The Interposer mechanism must be able to intercept any mechanism function.&lt;br /&gt;
The Interposer mechanism must also be able to call back into the mechglue in order to execute code using the original mechanism.&lt;br /&gt;
The interposer mechanism should be completely transparent to applications, in that pure gssapi application should not need any modification in order to work with the interposer mechanism nor need to issue any special call to use the interposer functionality.&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
In order to allow interposer plugins to re-enter the mechglue we had to change their function signature so that the SPI does not match the GSs API function signatures, as interposer plugins are allowed to call back into GSSAPI.&lt;br /&gt;
The interposer plugins SPI uses the gssi_ prefix (GSS Interposer) for all the mechglue functions it implements.&lt;br /&gt;
&lt;br /&gt;
The interposer plugins are specified in the gss.conf file with a new option&lt;br /&gt;
that identifies them as such. They also exposes an interposer plugin specific&lt;br /&gt;
initialization function that is used by the mechglue to initialized the plguin&lt;br /&gt;
and also to retieve the list of mechanism the plugin wnats to interpose.&lt;br /&gt;
&lt;br /&gt;
In order to allow the interposer plugin to re-enter the mechglue avoiding loops&lt;br /&gt;
interposer plugins create special invalid mech oids to pass as inputs to gssapi&lt;br /&gt;
functions that accept mech oids in input. The mechglue makes sure these oids&lt;br /&gt;
are never leaked to applications, by providing a mapping back to normal public&lt;br /&gt;
oids whenever they are passed to mechanisms or returned to applications.&lt;br /&gt;
&lt;br /&gt;
= Limitations =&lt;br /&gt;
&lt;br /&gt;
Currently the mechglue code can handle only one interposer plugin&lt;br /&gt;
per-mechanism.&lt;br /&gt;
&lt;br /&gt;
= New APIs =&lt;br /&gt;
&lt;br /&gt;
Internal mechglue functions:&lt;br /&gt;
* gssint_select_mech_type()&lt;br /&gt;
* gssint_get_public_oid()&lt;br /&gt;
* gssint_make_public_oid_set()&lt;br /&gt;
&lt;br /&gt;
Interposer initialization:&lt;br /&gt;
* gss_mech_interposer()&lt;br /&gt;
&lt;br /&gt;
New mechanism functions:&lt;br /&gt;
* gssspi_import_sec_context_by_mech()&lt;br /&gt;
* gssspi_import_name_by_mech()&lt;br /&gt;
* gssspi_import_creD_by_mech()&lt;br /&gt;
&lt;br /&gt;
Modified structures:&lt;br /&gt;
* gss_mech_info&lt;br /&gt;
&lt;br /&gt;
== Internal mechglue functions ==&lt;br /&gt;
&lt;br /&gt;
These new functions are used to aid the mechglue in finding the correct&lt;br /&gt;
mechanism to use when an interposer plugin is configured to intercept real&lt;br /&gt;
mechanisms.&lt;br /&gt;
&lt;br /&gt;
=== gssint_select_mech_type() ===&lt;br /&gt;
&lt;br /&gt;
This funciton is now called in the mechglue each time a mech oid is used as&lt;br /&gt;
input into a GSSAPI function. It correctly handles looking up by special OID&lt;br /&gt;
(if a interposer plugin is configured and returns the actual mechanism oid&lt;br /&gt;
to be used in case a mechanism has been interposed (typically the interposer&lt;br /&gt;
plugin mechanism).&lt;br /&gt;
&lt;br /&gt;
=== gssint_get_public_oid() ===&lt;br /&gt;
&lt;br /&gt;
This function always return the appropriate public oid associated with the&lt;br /&gt;
input oid which can be an actual public oid or a special interposer oid.&lt;br /&gt;
&lt;br /&gt;
=== gssint_make_public_oid_set() ===&lt;br /&gt;
&lt;br /&gt;
As the above but for oid sets.&lt;br /&gt;
&lt;br /&gt;
== Interposer initialization ==&lt;br /&gt;
&lt;br /&gt;
=== gss_mech_interposer() ===&lt;br /&gt;
&lt;br /&gt;
This function is looked up right after an interposer plugin is dlopen()ed and&lt;br /&gt;
is called to initialize the plugin. It returns a list of mechanism to&lt;br /&gt;
interpose. The mechglue uses this information to properly set up information in&lt;br /&gt;
the gss_mech_info structure of the plugin and on the structures of the&lt;br /&gt;
interposed mechanisms.&lt;br /&gt;
&lt;br /&gt;
== New mechanism functions ==&lt;br /&gt;
&lt;br /&gt;
These functions are required to properly pass information to interposer&lt;br /&gt;
plugins. In particular the original functions did not pass to the interposer&lt;br /&gt;
plugin the oid of the mechanism these functions are supposed to act on. This is&lt;br /&gt;
a problem for interposer plugins that can intercept mutiple mechanisms as they&lt;br /&gt;
have no way to understand on which mechanism they are suppoed to act on behalf&lt;br /&gt;
of of the multiple ons that are being interposed.&lt;br /&gt;
By passing in the public mech oid of the interposed mechanism the mechglue&lt;br /&gt;
intended to use, interposer plugins can properly handle the request.&lt;br /&gt;
&lt;br /&gt;
=== gssspi_import_sec_context_by_mech() ===&lt;br /&gt;
&lt;br /&gt;
Same as gss_import_sec_context() but specifies the mechanism to use.&lt;br /&gt;
&lt;br /&gt;
=== gssspi_import_name_by_mech() ===&lt;br /&gt;
&lt;br /&gt;
Same as gss_import_name() but specifies the mechanism to use.&lt;br /&gt;
&lt;br /&gt;
=== gssspi_import_cred_by_mech() ===&lt;br /&gt;
&lt;br /&gt;
Same as gss_import_cred() but specifies the mechanism to use.&lt;br /&gt;
&lt;br /&gt;
== Modified structures ==&lt;br /&gt;
&lt;br /&gt;
Only one structure needed modifications:&lt;br /&gt;
&lt;br /&gt;
=== gss_mech_info ===&lt;br /&gt;
&lt;br /&gt;
This is the structure that describes internally a mechanism. In order to allow&lt;br /&gt;
GSSAPI to handle interposition this structure has now 3 new members:&lt;br /&gt;
* is_interposer&lt;br /&gt;
a boolean flag that is used to mark a mechanism as an interposer mechanism and not a real mchanism&lt;br /&gt;
* ine_mech_type&lt;br /&gt;
the oid of the interposer mechanism, it is set on real mechanisms&lt;br /&gt;
* int_mech&lt;br /&gt;
pointer to the interposer mechanism vtable&lt;br /&gt;
&lt;br /&gt;
== New Functions Signatures ==&lt;br /&gt;
&lt;br /&gt;
 OM_uint32&lt;br /&gt;
 gssint_select_mech_type(&lt;br /&gt;
    OM_uint32 *minor,&lt;br /&gt;
    gss_const_OID oid,&lt;br /&gt;
    gss_OID *selected_oid&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 gss_OID&lt;br /&gt;
 gssint_get_public_oid(&lt;br /&gt;
    gss_const_OID oid&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32&lt;br /&gt;
 gssint_make_public_oid_set(&lt;br /&gt;
    OM_uint32 *minor_status,                        &lt;br /&gt;
    gss_OID oids,&lt;br /&gt;
    int count,&lt;br /&gt;
    gss_OID_set *public_set&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gssspi_import_sec_context_by_mech(&lt;br /&gt;
    OM_uint32 *minor_status,&lt;br /&gt;
    gss_OID desired_mech,&lt;br /&gt;
    gss_buffer_t interprocess_token,&lt;br /&gt;
    gss_ctx_id_t *context_handle&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gssspi_import_name_by_mech(&lt;br /&gt;
    OM_uint32 *minor_status,&lt;br /&gt;
    gss_OID mech_type,&lt;br /&gt;
    gss_buffer_t input_name_buffer,&lt;br /&gt;
    gss_OID input_name_type,&lt;br /&gt;
    gss_name_t *output_name&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gssspi_import_cred_by_mech(&lt;br /&gt;
    OM_uint32 *minor_status,&lt;br /&gt;
    gss_OID mech_type,&lt;br /&gt;
    gss_buffer_t token,&lt;br /&gt;
    gss_cred_id_t *cred_handle&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 gss_OID_set gss_mech_interposer(&lt;br /&gt;
    gss_OID mech_type&lt;br /&gt;
 );&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Interposer_Mechanism&amp;diff=4853</id>
		<title>Projects/Interposer Mechanism</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Interposer_Mechanism&amp;diff=4853"/>
				<updated>2012-10-02T20:17:45Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
This project is about creating a mechanism by which it is possible to intercept accepting and initializing a security context at the mechglue layer so that any mechanism can be ideally proxied to a separate application potentially running in a different security context.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
During the development of the [https://fedorahosted.org/gss-proxy GSS-Proxy project] in connection with the [[Projects/ProxyGSSAPI]] a new GSSAPI Mechanism interface has emerged. We call this kind of mechanism an '''Interposer Mechanism''' as it intercept all function calls for a specific mechanism.&lt;br /&gt;
&lt;br /&gt;
The Interposer Mechanism instructs the mechglue layer on what mechanisms it wants to interpose. Once a mechnism is interposed the mechglue will always call the interposer for any function related to interposed mechanism.&lt;br /&gt;
&lt;br /&gt;
The interposer plugin is responsible for handling the requested functionality, it can proxy it to another process (for example to the GSS-Proxy daemon) or can short-circuit it back to the mechglue in order to call the original mechanism handler.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
The Interposer mechanism must be able to intercept any mechanism function.&lt;br /&gt;
The Interposer mechanism must also be able to call back into the mechglue in order to execute code using the original mechanism.&lt;br /&gt;
The interposer mechanism should be completely transparent to applications, in that pure gssapi application should not need any modification in order to work with the interposer mechanism nor need to issue any special call to use the interposer functionality.&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
In order to allow interposer plugins to re-enter the mechglue we had to change their function signature so that the SPI does not match the GSs API function signatures, as interposer plugins are allowed to call back into GSSAPI.&lt;br /&gt;
The interposer plugins SPI uses the gssi_ prefix (GSS Interposer) for all the mechglue functions it implements.&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Interposer_Mechanism&amp;diff=4852</id>
		<title>Projects/Interposer Mechanism</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Interposer_Mechanism&amp;diff=4852"/>
				<updated>2012-10-02T19:44:12Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
This project is about creating a mechanism by which it is possible to intercept accepting and initializing a security context at the mechglue layer so that any mechanism can be ideally proxied to a separate application potentially running in a different security context.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
During the development of the [https://fedorahosted.org/gss-proxy GSS-Proxy project] in connection with the [[Projects/ProxyGSSAPI]] a new GSSAPI Mechanism interface has emerged. We call this kind of mechanism an '''Interposer Mechanism''' as it intercept all function calls for a specific mechanism.&lt;br /&gt;
&lt;br /&gt;
The Interposer Mechanism instructs the mechglue layer on what mechanisms it wants to interpose. Once a mechnism is interposed the mechglue will always call the interposer for any function related to interposed mechanism.&lt;br /&gt;
&lt;br /&gt;
The interposer plugin is responsible for handling the requested functionality, it can proxy it to another process (for example to the GSS-Proxy daemon) or can short-circuit it back to the mechglue in order to call the original mechanism handler.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
The Interposer mechanism must be able to intercept any mechanism function.&lt;br /&gt;
The Interposer mechanism must also be able to call back into the mechglue in order to execute code using the original mechanism.&lt;br /&gt;
The interposer mechanism should be completely transparent to applications, in that pure gssapi application should not need any modification in order to work with the interposer mechanism nor need to issue any special call to use the interposer functionality.&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Interposer_Mechanism&amp;diff=4851</id>
		<title>Projects/Interposer Mechanism</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Interposer_Mechanism&amp;diff=4851"/>
				<updated>2012-10-02T19:42:36Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
During the development of the [https://fedorahosted.org/gss-proxy GSS-Proxy project] in connection with the [[Projects/ProxyGSSAPI]] a new GSSAPI Mechanism interface has emerged. We call this kind of mechanism an '''Interposer Mechanism''' as it intercept all function calls for a specific mechanism.&lt;br /&gt;
&lt;br /&gt;
The Interposer Mechanism instructs the mechglue layer on what mechanisms it wants to interpose. Once a mechnism is interposed the mechglue will always call the interposer for any function related to interposed mechanism.&lt;br /&gt;
&lt;br /&gt;
The interposer plugin is responsible for handling the requested functionality, it can proxy it to another process (for example to the GSS-Proxy daemon) or can short-circuit it back to the mechglue in order to call the original mechanism handler.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
The Interposer mechanism must be able to intercept any mechanism function.&lt;br /&gt;
The Interposer mechanism must also be able to call back into the mechglue in order to execute code using the original mechanism.&lt;br /&gt;
The interposer mechanism should be completely transparent to applications, in that pure gssapi application should not need any modification in order to work with the interposer mechanism nor need to issue any special call to use the interposer functionality.&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Interposer_Mechanism&amp;diff=4850</id>
		<title>Projects/Interposer Mechanism</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Interposer_Mechanism&amp;diff=4850"/>
				<updated>2012-10-02T19:34:02Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: New page: {{project-early}}  = Background = During the development of the [https://fedorahosted.org/gss-proxy GSS-Proxy project] in connection with the Projects/ProxyGSSAPI a new GSSAPI Mechanis...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
During the development of the [https://fedorahosted.org/gss-proxy GSS-Proxy project] in connection with the [[Projects/ProxyGSSAPI]] a new GSSAPI Mechanism interface has emerged. We call this kind of mechanism an '''Interposer Mechanism''' as it intercept all function calls for a specific mechanism.&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/ProxyGSSAPI&amp;diff=4849</id>
		<title>Projects/ProxyGSSAPI</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/ProxyGSSAPI&amp;diff=4849"/>
				<updated>2012-10-02T19:28:59Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': The actual project is now hosted and documented at: https://fedorahosted.org/gss-proxy&lt;br /&gt;
&lt;br /&gt;
This project is about creating a mechanism by which it is possible to proxy accepting and initializing a security context to a separate trusted system service without giving access to long term keys to an application.&lt;br /&gt;
The proxy would be created at the mechglue layer so that any mechanism can be proxied.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
We have identified two main scenarios that benefit from this approach.&lt;br /&gt;
&lt;br /&gt;
One is the ability to lock long term keys (especially the host/ key when the krb5 mechanism is used) into a trusted service on the system so that &amp;quot;less&amp;quot; trusted applications do not have direct access to the keys. This is a form of privilege separation that allows better control of the keys and reduces the attack surface of the system when it comes to gaining access to such keys.&lt;br /&gt;
&lt;br /&gt;
The other is about trusting data being carried through, for example, krb5 tickets. In systems that use signed authorization data, it is fundamental for a &amp;quot;trusted&amp;quot; service to directly handle accepting a context so that it is impossible for an application to &amp;quot;fake&amp;quot; Authorization data by having access to the host keys and therefore being able to sign authorization data blobs.&lt;br /&gt;
As an example think of a user accessing a FTP daemon and sending a user credentials (MS-PAC/PAD) in the ticket. A trusted service need to be able to verify that the KDC actually did sign this data in order to trust its authenticity and allow the system to create a user out of this data. A way to fully trust this data when it is signed by the long term key is to not allow the FTP service to have access to the long term keys, so that a subverted service is not allowed to create fake data and sign it in order to perform privilege elevation attacks.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
In order to be able to implement this proxy it is fundamental to be able to create an IPC mechanism to transfer data from the process handling the GSSAPI exchange to the trusted service holding the keys and negotiating the security context.&lt;br /&gt;
&lt;br /&gt;
This IPC mechanism should use a defined protocol so that independent implementations of the trusted service can be created.&lt;br /&gt;
&lt;br /&gt;
Interface stability either at an API level (if an endpoint library is created) or at the protocol level is highly desirable but not fundamental.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Considerations on the design =&lt;br /&gt;
&lt;br /&gt;
There are a few challenges that need to be considered for this project.&lt;br /&gt;
&lt;br /&gt;
== Access privileges ==&lt;br /&gt;
&lt;br /&gt;
Currently access to credentials is determined base on file permissions. If the user/application have access to the keytab/credentials then it is allowed to use them for any purpose. By adding an IPC mechanism we need to also add a mechanism to determine what privileges the calling in process have.&lt;br /&gt;
&lt;br /&gt;
One way to do this is by replicating the permission model on keytab files as permission on the directories containing the unix socket. One directory per credential/keytab with file system permissions et so only processes belonging to the user owner can access the IPC pipe.&lt;br /&gt;
On some systems it is also possible to inspect the credentials of the connecting process via special system calls on the socket. On those systems it is possible to decide to use a single socket and perform access control in the daemon.&lt;br /&gt;
&lt;br /&gt;
== What to proxy ? ==&lt;br /&gt;
&lt;br /&gt;
There are a few ways the proxy code can be designed.&lt;br /&gt;
&lt;br /&gt;
a) Proxy everything unconditionally in any case&lt;br /&gt;
b) Have a flag or method call that can tell which mechanisms to proxy&lt;br /&gt;
c) Proxy on a per application based on per application configuration&lt;br /&gt;
&lt;br /&gt;
Each of them may be desirable but there are a few drawbacks with each approach:&lt;br /&gt;
&lt;br /&gt;
With (a) it may turn out that the mechanism will need access to long term secrets even after the security context has been established. That could be handled by passing in the long term keys with the export/import credentials function that is needed to transfer session keys.&lt;br /&gt;
This would render privilege separation useless though. Another option would be to provide extensions so mechanism can delegate these operation to the proxy, but this looks tricky.&lt;br /&gt;
&lt;br /&gt;
With (b), mechanisms that cannot easily be proxied could be marked as such and not proxied. The issue here is that there are meta-mechs like SPNEGO that would have to deal with the saem flags and change behavior dynamically based on which mech is being probed. It is not unconceivable to make meta-mechs smart enough to do that but probably too much for a first release.&lt;br /&gt;
&lt;br /&gt;
The problem with (c) is that it may require application changes to add the desired option, and in general you want a global policy. However a simplistic method to check whether to proxy or not could be for the GSSAPI to check if direct access to credentials is available and skip proxying in case direct access is possible.&lt;br /&gt;
&lt;br /&gt;
== RPC mechanism ==&lt;br /&gt;
&lt;br /&gt;
In order to proxy data around the IPC pipes need to be able to (un)marshal data back and forth.&lt;br /&gt;
There are a few options I can see to handle messaging.&lt;br /&gt;
&lt;br /&gt;
After careful considreation it has been decided to use SUNRPC/XDR as the transport. The actual proxy server does not register to a RPC endpoint mapper but otherwise uses full RPC format on the wire and XDR encoding.&lt;br /&gt;
&lt;br /&gt;
The actual protocol has been assigned number 400112 and is being documented in the [https://fedorahosted.org/gss-proxy/wiki/ProtocolDocumentation gss-proxy project]&lt;br /&gt;
&lt;br /&gt;
The resons for choosing RPC/XDR were multiple.&lt;br /&gt;
* It is a wellknown encoding with a reasonable description language and a compiler for RPC stubs.&lt;br /&gt;
* Most krb5 projects already have bultin facilities to handle this protocol.&lt;br /&gt;
* Most kernels also already have support for handling SUNRPC/XDR from the NFS code.&lt;br /&gt;
&lt;br /&gt;
The last point is relevant due to the fact that the Gss-Proxy concept aligns quite well also to the Kernel case where supporting GSSAPI authentication for NFS or CIFS server/clients is valuable but embedding a whle gss library is excessive. In this case using the gss-proxy protocol directly allows to use basic gssapi services easily without having to implement a full gssapi library in kernel.&lt;br /&gt;
A proof of concept implementation for using part of the protocol in the Linux kernel has been implemented and posted to LKML.&lt;br /&gt;
&lt;br /&gt;
== Additional Considerations ==&lt;br /&gt;
&lt;br /&gt;
The GSSAPI design is currently completely synchronous. By adding an IPC communication venue we increase the risk of stalling the application by blocking on socket operations while waiting for the trusted service to be scheduled and perform the needed operations.&lt;br /&gt;
Although this is not always desirable as it add latency, other parts of GSSAPI can add latency during accept/init phases. Some mechanism for example may perform blocking netowrk operations like DNS lookups as well.&lt;br /&gt;
Considering that the accept/init phases usually represent a very tiny amount of time compared to the life of a secured connection and considering that most of the time the connection setup already suffers from network latencies we think this is acceptable at this stage. Application can mitigate issues with blocking operations by confining GSSAPI related handling into a separate thread.&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
(Draft)&lt;br /&gt;
&lt;br /&gt;
The two main hooks for this functionality will be implemented in gss_accept_sec_context() for accepting 3rd party initiate security negotiations and gss_init_sec_context() for initializing a security context on the application behalf.&lt;br /&gt;
&lt;br /&gt;
= Milestones =&lt;br /&gt;
&lt;br /&gt;
* Introduce new RPC library with stub generator/IDL compiler&lt;br /&gt;
* Define the RPC interfaces to be implemented&lt;br /&gt;
* Introduce a new meta-mechanism that implements the client side of the proxy&lt;br /&gt;
* Create a simple server program for testing purposes&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
&lt;br /&gt;
See https://fedorahosted.org/gss-proxy&lt;br /&gt;
&lt;br /&gt;
= Dependencies =&lt;br /&gt;
&lt;br /&gt;
Interposer mechglue plugin mechanism&lt;br /&gt;
&lt;br /&gt;
= Goal =&lt;br /&gt;
&lt;br /&gt;
Have a working prototype for the 1.11 release&lt;br /&gt;
&lt;br /&gt;
= Testing Plan =&lt;br /&gt;
&lt;br /&gt;
Built client and server code as part of the GSS-Proxy project.&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/ProxyGSSAPI&amp;diff=4848</id>
		<title>Projects/ProxyGSSAPI</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/ProxyGSSAPI&amp;diff=4848"/>
				<updated>2012-10-02T19:28:25Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
NOTE: The actual project is now hosted and documented at: https://fedorahosted.org/gss-proxy&lt;br /&gt;
&lt;br /&gt;
This project is about creating a mechanism by which it is possible to proxy accepting and initializing a security context to a separate trusted system service without giving access to long term keys to an application.&lt;br /&gt;
The proxy would be created at the mechglue layer so that any mechanism can be proxied.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
We have identified two main scenarios that benefit from this approach.&lt;br /&gt;
&lt;br /&gt;
One is the ability to lock long term keys (especially the host/ key when the krb5 mechanism is used) into a trusted service on the system so that &amp;quot;less&amp;quot; trusted applications do not have direct access to the keys. This is a form of privilege separation that allows better control of the keys and reduces the attack surface of the system when it comes to gaining access to such keys.&lt;br /&gt;
&lt;br /&gt;
The other is about trusting data being carried through, for example, krb5 tickets. In systems that use signed authorization data, it is fundamental for a &amp;quot;trusted&amp;quot; service to directly handle accepting a context so that it is impossible for an application to &amp;quot;fake&amp;quot; Authorization data by having access to the host keys and therefore being able to sign authorization data blobs.&lt;br /&gt;
As an example think of a user accessing a FTP daemon and sending a user credentials (MS-PAC/PAD) in the ticket. A trusted service need to be able to verify that the KDC actually did sign this data in order to trust its authenticity and allow the system to create a user out of this data. A way to fully trust this data when it is signed by the long term key is to not allow the FTP service to have access to the long term keys, so that a subverted service is not allowed to create fake data and sign it in order to perform privilege elevation attacks.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
In order to be able to implement this proxy it is fundamental to be able to create an IPC mechanism to transfer data from the process handling the GSSAPI exchange to the trusted service holding the keys and negotiating the security context.&lt;br /&gt;
&lt;br /&gt;
This IPC mechanism should use a defined protocol so that independent implementations of the trusted service can be created.&lt;br /&gt;
&lt;br /&gt;
Interface stability either at an API level (if an endpoint library is created) or at the protocol level is highly desirable but not fundamental.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Considerations on the design =&lt;br /&gt;
&lt;br /&gt;
There are a few challenges that need to be considered for this project.&lt;br /&gt;
&lt;br /&gt;
== Access privileges ==&lt;br /&gt;
&lt;br /&gt;
Currently access to credentials is determined base on file permissions. If the user/application have access to the keytab/credentials then it is allowed to use them for any purpose. By adding an IPC mechanism we need to also add a mechanism to determine what privileges the calling in process have.&lt;br /&gt;
&lt;br /&gt;
One way to do this is by replicating the permission model on keytab files as permission on the directories containing the unix socket. One directory per credential/keytab with file system permissions et so only processes belonging to the user owner can access the IPC pipe.&lt;br /&gt;
On some systems it is also possible to inspect the credentials of the connecting process via special system calls on the socket. On those systems it is possible to decide to use a single socket and perform access control in the daemon.&lt;br /&gt;
&lt;br /&gt;
== What to proxy ? ==&lt;br /&gt;
&lt;br /&gt;
There are a few ways the proxy code can be designed.&lt;br /&gt;
&lt;br /&gt;
a) Proxy everything unconditionally in any case&lt;br /&gt;
b) Have a flag or method call that can tell which mechanisms to proxy&lt;br /&gt;
c) Proxy on a per application based on per application configuration&lt;br /&gt;
&lt;br /&gt;
Each of them may be desirable but there are a few drawbacks with each approach:&lt;br /&gt;
&lt;br /&gt;
With (a) it may turn out that the mechanism will need access to long term secrets even after the security context has been established. That could be handled by passing in the long term keys with the export/import credentials function that is needed to transfer session keys.&lt;br /&gt;
This would render privilege separation useless though. Another option would be to provide extensions so mechanism can delegate these operation to the proxy, but this looks tricky.&lt;br /&gt;
&lt;br /&gt;
With (b), mechanisms that cannot easily be proxied could be marked as such and not proxied. The issue here is that there are meta-mechs like SPNEGO that would have to deal with the saem flags and change behavior dynamically based on which mech is being probed. It is not unconceivable to make meta-mechs smart enough to do that but probably too much for a first release.&lt;br /&gt;
&lt;br /&gt;
The problem with (c) is that it may require application changes to add the desired option, and in general you want a global policy. However a simplistic method to check whether to proxy or not could be for the GSSAPI to check if direct access to credentials is available and skip proxying in case direct access is possible.&lt;br /&gt;
&lt;br /&gt;
== RPC mechanism ==&lt;br /&gt;
&lt;br /&gt;
In order to proxy data around the IPC pipes need to be able to (un)marshal data back and forth.&lt;br /&gt;
There are a few options I can see to handle messaging.&lt;br /&gt;
&lt;br /&gt;
After careful considreation it has been decided to use SUNRPC/XDR as the transport. The actual proxy server does not register to a RPC endpoint mapper but otherwise uses full RPC format on the wire and XDR encoding.&lt;br /&gt;
&lt;br /&gt;
The actual protocol has been assigned number 400112 and is being documented in the [https://fedorahosted.org/gss-proxy/wiki/ProtocolDocumentation gss-proxy project]&lt;br /&gt;
&lt;br /&gt;
The resons for choosing RPC/XDR were multiple.&lt;br /&gt;
* It is a wellknown encoding with a reasonable description language and a compiler for RPC stubs.&lt;br /&gt;
* Most krb5 projects already have bultin facilities to handle this protocol.&lt;br /&gt;
* Most kernels also already have support for handling SUNRPC/XDR from the NFS code.&lt;br /&gt;
&lt;br /&gt;
The last point is relevant due to the fact that the Gss-Proxy concept aligns quite well also to the Kernel case where supporting GSSAPI authentication for NFS or CIFS server/clients is valuable but embedding a whle gss library is excessive. In this case using the gss-proxy protocol directly allows to use basic gssapi services easily without having to implement a full gssapi library in kernel.&lt;br /&gt;
A proof of concept implementation for using part of the protocol in the Linux kernel has been implemented and posted to LKML.&lt;br /&gt;
&lt;br /&gt;
== Additional Considerations ==&lt;br /&gt;
&lt;br /&gt;
The GSSAPI design is currently completely synchronous. By adding an IPC communication venue we increase the risk of stalling the application by blocking on socket operations while waiting for the trusted service to be scheduled and perform the needed operations.&lt;br /&gt;
Although this is not always desirable as it add latency, other parts of GSSAPI can add latency during accept/init phases. Some mechanism for example may perform blocking netowrk operations like DNS lookups as well.&lt;br /&gt;
Considering that the accept/init phases usually represent a very tiny amount of time compared to the life of a secured connection and considering that most of the time the connection setup already suffers from network latencies we think this is acceptable at this stage. Application can mitigate issues with blocking operations by confining GSSAPI related handling into a separate thread.&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
(Draft)&lt;br /&gt;
&lt;br /&gt;
The two main hooks for this functionality will be implemented in gss_accept_sec_context() for accepting 3rd party initiate security negotiations and gss_init_sec_context() for initializing a security context on the application behalf.&lt;br /&gt;
&lt;br /&gt;
= Milestones =&lt;br /&gt;
&lt;br /&gt;
* Introduce new RPC library with stub generator/IDL compiler&lt;br /&gt;
* Define the RPC interfaces to be implemented&lt;br /&gt;
* Introduce a new meta-mechanism that implements the client side of the proxy&lt;br /&gt;
* Create a simple server program for testing purposes&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
&lt;br /&gt;
See https://fedorahosted.org/gss-proxy&lt;br /&gt;
&lt;br /&gt;
= Dependencies =&lt;br /&gt;
&lt;br /&gt;
Interposer mechglue plugin mechanism&lt;br /&gt;
&lt;br /&gt;
= Goal =&lt;br /&gt;
&lt;br /&gt;
Have a working prototype for the 1.11 release&lt;br /&gt;
&lt;br /&gt;
= Testing Plan =&lt;br /&gt;
&lt;br /&gt;
Built client and server code as part of the GSS-Proxy project.&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Credential_Store_extensions&amp;diff=4730</id>
		<title>Projects/Credential Store extensions</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Credential_Store_extensions&amp;diff=4730"/>
				<updated>2012-07-10T19:19:08Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: /* C bindings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
This project is about adding a set of extensions to GSSAPI to more easily handle credentials in a mechanism agnostic way.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
During the development of the [https://fedorahosted.org/gss-proxy GSS-Proxy project] in connection with the [[Projects/ProxyGSSAPI]] project it became evident that the application implementing the proxy needs to be able to be configured to use different credentials depending on what application is connecting to the proxy.  Using the normal defaults of GSSAPI is not possible because the proxy application does not run in the same process environment as the proxied application, and may run multiple concurrent tasks on behalf of different applications with different trust/credentials.&lt;br /&gt;
&lt;br /&gt;
A method to pass a set of default credentials to use on behalf of these application is necessary. This method should not be mechanism-specific, as the proxy tries to be mechanism-agnostic as much as possible.&lt;br /&gt;
&lt;br /&gt;
In this light a 'Credential Stores' Extension has been [http://www.ietf.org/mail-archive/web/kitten/current/msg03013.html proposed] on the Kitten IETF Mailing list.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Abstract interface to pass credential store configuration to GSSAPI mechanisms.&lt;br /&gt;
* The credentials need to be specified in configuration files, so security sensitive information (like passwords) must not be exposed there.&lt;br /&gt;
* Mechanisms can define their own key/value pairs.&lt;br /&gt;
* New Key/Value pairs can be easily added in future.&lt;br /&gt;
* The mechglue need not to know how to interpret key/value pairs; they are interpreted only by mechanisms.&lt;br /&gt;
&lt;br /&gt;
== Architecture ==&lt;br /&gt;
&lt;br /&gt;
The exposed public functions are paired with analogous functions in the mechglue SPI to give mechanisms access to the Credentials Store.&lt;br /&gt;
The implementation provides functions only for mechanisms for which it makes sense--initially krb5 but not SPNEGO.&lt;br /&gt;
&lt;br /&gt;
== New APIs ==&lt;br /&gt;
&lt;br /&gt;
Functions:&lt;br /&gt;
* GSS_Acquire_cred_from()&lt;br /&gt;
* GSS_Add_cred_from()&lt;br /&gt;
* GSS_Store_cred_into()&lt;br /&gt;
&lt;br /&gt;
Structures:&lt;br /&gt;
* gss_cred_store_element_struct&lt;br /&gt;
* gss_cred_store_struct&lt;br /&gt;
&lt;br /&gt;
If the cred store structure does not contain a mechanism-specific configuration for the mechanism at hand, the usual defaults are applied.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== gss_acquire_cred_from() ===&lt;br /&gt;
&lt;br /&gt;
Acquires new credentials using the provided store.  The store can specify both the actual credentials and/or the credential cache.&lt;br /&gt;
In the krb5 mechanism case it could specify a keytab and a ccache location.&lt;br /&gt;
&lt;br /&gt;
=== gss_add_cred_from() ===&lt;br /&gt;
&lt;br /&gt;
Same as above, but can target a specific mechanism.  The credential store need not be mechanism-specific and remains abstract.&lt;br /&gt;
&lt;br /&gt;
=== gss_store_cred_into() ===&lt;br /&gt;
&lt;br /&gt;
This is analogous to gss_cred_store() except that a specific credential store can be specified (in the krb5 case, generally a ccache file).&lt;br /&gt;
&lt;br /&gt;
=== gss_cred_store_element_struct ===&lt;br /&gt;
&lt;br /&gt;
A urn/value pair.&lt;br /&gt;
Example:&lt;br /&gt;
URN = 'ccache'&lt;br /&gt;
Value = 'FILE:/tmp/somecc'&lt;br /&gt;
&lt;br /&gt;
=== gss_cred_store_struct ===&lt;br /&gt;
&lt;br /&gt;
A counter and an array of elements.&lt;br /&gt;
&lt;br /&gt;
== C bindings ==&lt;br /&gt;
&lt;br /&gt;
 /* Extension for credential stores */&lt;br /&gt;
 typedef struct gss_cred_store_element_struct {&lt;br /&gt;
     const char *urn;&lt;br /&gt;
     const char *value;&lt;br /&gt;
 } gss_cred_store_element, *gss_cred_store_element_t;&lt;br /&gt;
 typedef struct gss_cred_store_element gss_cred_store_element_t;&lt;br /&gt;
 &lt;br /&gt;
 typedef struct gss_cred_store_struct {&lt;br /&gt;
     OM_uint32 count;&lt;br /&gt;
     gss_cred_store_element_t *elements;&lt;br /&gt;
 } gss_cred_store, *gss_cred_store_t;&lt;br /&gt;
 typedef const struct gss_cred_store_struct *gss_const_cred_store_t;&lt;br /&gt;
&lt;br /&gt;
 #define GSS_C_NO_CRED_STORE ((gss_const_cred_store_t) 0)&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gss_acquire_cred_from(&lt;br /&gt;
             OM_uint32 *minor_status,&lt;br /&gt;
             const gss_name_t desired_name,&lt;br /&gt;
             OM_uint32 time_req,&lt;br /&gt;
             gss_OID_set desired_mechs,&lt;br /&gt;
             gss_cred_usage_t cred_usage,&lt;br /&gt;
             gss_const_cred_store_t cred_store,&lt;br /&gt;
             gss_cred_id_t *output_cred_handle,&lt;br /&gt;
             gss_OID_set *actual_mechs,&lt;br /&gt;
             OM_uint32 *time_rec);&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gss_add_cred_from (&lt;br /&gt;
             OM_uint32 *minor_status,&lt;br /&gt;
             gss_cred_id_t input_cred_handle,&lt;br /&gt;
             gss_name_t desired_name,&lt;br /&gt;
             gss_OID desired_mech,&lt;br /&gt;
             gss_cred_usage_t cred_usage,&lt;br /&gt;
             OM_uint32 initiator_time_req,&lt;br /&gt;
             OM_uint32 acceptor_time_req,&lt;br /&gt;
             gss_const_cred_store_t cred_store,&lt;br /&gt;
             gss_cred_id_t *output_cred_handle,&lt;br /&gt;
             gss_OID_set *actual_mechs,&lt;br /&gt;
             OM_uint32 *initiator_time_rec,&lt;br /&gt;
             OM_uint32 *acceptor_time_rec);&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gss_store_cred_into(&lt;br /&gt;
               OM_uint32         *minor_status,&lt;br /&gt;
               gss_cred_id_t     input_cred_handle,&lt;br /&gt;
               gss_cred_usage_t  cred_usage,&lt;br /&gt;
               gss_OID           desired_mech,&lt;br /&gt;
               OM_uint32         overwrite_cred,&lt;br /&gt;
               OM_uint32         default_cred,&lt;br /&gt;
               gss_const_cred_store_t cred_store,&lt;br /&gt;
               gss_OID_set       *elements_stored,&lt;br /&gt;
               gss_cred_usage_t  *cred_usage_stored);&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Credential_Store_extensions&amp;diff=4625</id>
		<title>Projects/Credential Store extensions</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Credential_Store_extensions&amp;diff=4625"/>
				<updated>2012-05-05T15:24:07Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: /* C bindings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
This project is about adding a set of extensions to GSSAPI to more easily handle credentials in a mechanism agnostic way.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
During the development of the [https://fedorahosted.org/gss-proxy GSS-Proxy project] in connection with the [[Projects/ProxyGSSAPI]] project it became evident that the application implementing the proxy needs to be able to be configured to use different credentials depending on what application is connecting to the proxy.  Using the normal defaults of GSSAPI is not possible because the proxy application does not run in the same process environment as the proxied application, and may run multiple concurrent tasks on behalf of different applications with different trust/credentials.&lt;br /&gt;
&lt;br /&gt;
A method to pass a set of default credentials to use on behalf of these application is necessary. This method should not be mechanism-specific, as the proxy tries to be mechanism-agnostic as much as possible.&lt;br /&gt;
&lt;br /&gt;
In this light a 'Credential Stores' Extension has been [http://www.ietf.org/mail-archive/web/kitten/current/msg03013.html proposed] on the Kitten IETF Mailing list.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Abstract interface to pass credential store configuration to GSSAPI mechanisms.&lt;br /&gt;
* The credentials need to be specified in configuration files, so security sensitive information (like passwords) must not be exposed there.&lt;br /&gt;
* Mechanisms can define their own key/value pairs.&lt;br /&gt;
* New Key/Value pairs can be easily added in future.&lt;br /&gt;
* The mechglue need not to know how to interpret key/value pairs; they are interpreted only by mechanisms.&lt;br /&gt;
&lt;br /&gt;
== Architecture ==&lt;br /&gt;
&lt;br /&gt;
The exposed public functions are paired with analogous functions in the mechglue SPI to give mechanisms access to the Credentials Store.&lt;br /&gt;
The implementation provides functions only for mechanisms for which it makes sense--initially krb5 but not SPNEGO.&lt;br /&gt;
&lt;br /&gt;
== New APIs ==&lt;br /&gt;
&lt;br /&gt;
Functions:&lt;br /&gt;
* GSS_Acquire_cred_from()&lt;br /&gt;
* GSS_Add_cred_from()&lt;br /&gt;
* GSS_Store_cred_into()&lt;br /&gt;
&lt;br /&gt;
Structures:&lt;br /&gt;
* gss_cred_store_element_struct&lt;br /&gt;
* gss_cred_store_struct&lt;br /&gt;
&lt;br /&gt;
If the cred store structure does not contain a mechanism-specific configuration for the mechanism at hand, the usual defaults are applied.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== gss_acquire_cred_from() ===&lt;br /&gt;
&lt;br /&gt;
Acquires new credentials using the provided store.  The store can specify both the actual credentials and/or the credential cache.&lt;br /&gt;
In the krb5 mechanism case it could specify a keytab and a ccache location.&lt;br /&gt;
&lt;br /&gt;
=== gss_add_cred_from() ===&lt;br /&gt;
&lt;br /&gt;
Same as above, but can target a specific mechanism.  The credential store need not be mechanism-specific and remains abstract.&lt;br /&gt;
&lt;br /&gt;
=== gss_store_cred_into() ===&lt;br /&gt;
&lt;br /&gt;
This is analogous to gss_cred_store() except that a specific credential store can be specified (in the krb5 case, generally a ccache file).&lt;br /&gt;
&lt;br /&gt;
=== gss_cred_store_element_struct ===&lt;br /&gt;
&lt;br /&gt;
A urn/value pair.&lt;br /&gt;
Example:&lt;br /&gt;
URN = 'ccache'&lt;br /&gt;
Value = 'FILE:/tmp/somecc'&lt;br /&gt;
&lt;br /&gt;
=== gss_cred_store_struct ===&lt;br /&gt;
&lt;br /&gt;
A counter and an array of elements.&lt;br /&gt;
&lt;br /&gt;
== C bindings ==&lt;br /&gt;
&lt;br /&gt;
 /* Extension for credential stores */&lt;br /&gt;
 typedef struct gss_cred_store_element_struct {&lt;br /&gt;
     const char *urn;&lt;br /&gt;
     const char *value;&lt;br /&gt;
 } gss_cred_store_element, *gss_cred_store_element_t;&lt;br /&gt;
 typedef struct gss_cred_store_element gss_cred_store_element_t;&lt;br /&gt;
 &lt;br /&gt;
 typedef struct gss_cred_store_struct {&lt;br /&gt;
     OM_uint32 count;&lt;br /&gt;
     gss_cred_store_element_t *elements;&lt;br /&gt;
 } gss_cred_store, *gss_cred_store_t;&lt;br /&gt;
 typedef const struct gss_cred_store_struct *gss_const_cred_store_t;&lt;br /&gt;
&lt;br /&gt;
 #define GSS_C_NO_CRED_STORE ((gss_const_cred_store_t) 0)&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gss_acquire_cred_from(&lt;br /&gt;
             OM_uint32 *minor_status,&lt;br /&gt;
             const gss_name_t desired_name,&lt;br /&gt;
             OM_uint32 time_req,&lt;br /&gt;
             const gss_OID_set desired_mechs,&lt;br /&gt;
             gss_cred_usage_t cred_usage,&lt;br /&gt;
             gss_const_cred_store_t cred_store,&lt;br /&gt;
             gss_cred_id_t *output_cred_handle,&lt;br /&gt;
             gss_OID_set *actual_mechs,&lt;br /&gt;
             OM_uint32 *time_rec);&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gss_add_cred_from (&lt;br /&gt;
             OM_uint32 *minor_status,&lt;br /&gt;
             const gss_cred_id_t input_cred_handle,&lt;br /&gt;
             const gss_name_t desired_name,&lt;br /&gt;
             const gss_OID desired_mech,&lt;br /&gt;
             gss_cred_usage_t cred_usage,&lt;br /&gt;
             OM_uint32 initiator_time_req,&lt;br /&gt;
             OM_uint32 acceptor_time_req,&lt;br /&gt;
             gss_const_cred_store_t cred_store,&lt;br /&gt;
             gss_cred_id_t *output_cred_handle,&lt;br /&gt;
             gss_OID_set *actual_mechs,&lt;br /&gt;
             OM_uint32 *initiator_time_rec,&lt;br /&gt;
             OM_uint32 *acceptor_time_rec);&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gss_store_cred_into(&lt;br /&gt;
               OM_uint32         *minor_status,&lt;br /&gt;
               gss_cred_id_t     input_cred_handle,&lt;br /&gt;
               gss_cred_usage_t  cred_usage,&lt;br /&gt;
               const gss_OID     desired_mech,&lt;br /&gt;
               OM_uint32         overwrite_cred,&lt;br /&gt;
               OM_uint32         default_cred,&lt;br /&gt;
               gss_const_cred_store_t cred_store,&lt;br /&gt;
               gss_OID_set       *elements_stored,&lt;br /&gt;
               gss_cred_usage_t  *cred_usage_stored);&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Credential_Store_extensions&amp;diff=4620</id>
		<title>Projects/Credential Store extensions</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Credential_Store_extensions&amp;diff=4620"/>
				<updated>2012-05-03T20:50:42Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
This project is about adding a set of extensions to GSSAPI to more easily handle credentials in a mechanism agnostic way.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
During the development of the [https://fedorahosted.org/gss-proxy GSS-Proxy project] in connection with the [[Projects/ProxyGSSAPI]] project it became evident that the application implementing the proxy needs to be able to be configured to use different credentials depending on what application is connecting to the proxy.&lt;br /&gt;
Using the normal defaults of GSSAPI is not possible because the proxy application does not run in the same security context as the proxied application and it may run multiple concurrent tasks on behalf of different applications with different trust/credentials.&lt;br /&gt;
&lt;br /&gt;
A method to pass a set of default credentials to use on behalf of these application is necessary. This method should not be mechanism specific, as the proxy tries to be mechanism agnostic as much as possible.&lt;br /&gt;
&lt;br /&gt;
In this light a 'Credential Stores' Extension has been [http://www.ietf.org/mail-archive/web/kitten/current/msg03013.html proposed] on the Kitten IETF Mailing list.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Abstract interface to pass credential store configuration to GSSAPI mechanisms.&lt;br /&gt;
* The credentials need to be specified in configuration files so no security sensitive information (like passwords) must be exposed there.&lt;br /&gt;
* Mechanisms can define their own key/value pairs&lt;br /&gt;
* New Key/Value pairs can be easily added in future&lt;br /&gt;
* The actual API need not to know how to interpret Key/Value pairs, they are passed directly to mechanisms&lt;br /&gt;
&lt;br /&gt;
== Architecture ==&lt;br /&gt;
&lt;br /&gt;
The exposed public functions are paired with an analogous one in the mechglue SPI to give mechanisms access to the Credentials Store.&lt;br /&gt;
The implementation provides functions only for mechanisms for which it makes sense, initially krb5 but not SPNEGO&lt;br /&gt;
&lt;br /&gt;
== New APIs ==&lt;br /&gt;
&lt;br /&gt;
Functions:&lt;br /&gt;
* GSS_Acquire_cred_from()&lt;br /&gt;
* GSS_Add_cred_from()&lt;br /&gt;
* GSS_Store_cred_into()&lt;br /&gt;
&lt;br /&gt;
Structures:&lt;br /&gt;
* gss_cred_store_element_struct&lt;br /&gt;
* gss_cred_store_struct&lt;br /&gt;
&lt;br /&gt;
If the cred store structure does not contain a mechanism specific configuration for the mechanism at hand gthe usual defaults are applied.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== gss_aqcuire_cred_from() ===&lt;br /&gt;
&lt;br /&gt;
Acquires new credentials using the provided store. The store can specify both the actual credentials and/or the credential cache.&lt;br /&gt;
In the Krb5 mechanism case it could specify a keytab and a ccache location.&lt;br /&gt;
&lt;br /&gt;
=== gss_add_cred_from() ===&lt;br /&gt;
&lt;br /&gt;
Same as above but can target a specific mechanism. The credential store need not be mechanism specific and re mains abstract.&lt;br /&gt;
&lt;br /&gt;
=== gss_strore_cred_into() ===&lt;br /&gt;
&lt;br /&gt;
This is analogous to gss_cred_store() except that a specific credential store can be specified (In the krb5 case generally a ccache file).&lt;br /&gt;
&lt;br /&gt;
=== gss_cred_store_element_struct ===&lt;br /&gt;
&lt;br /&gt;
A urn/value pair.&lt;br /&gt;
Example:&lt;br /&gt;
URN = 'ccache'&lt;br /&gt;
Value = 'FILE:/tmp/somecc'&lt;br /&gt;
&lt;br /&gt;
=== gss_cred_store_struct ===&lt;br /&gt;
&lt;br /&gt;
A counter and an array of elements.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== C bindings ==&lt;br /&gt;
&lt;br /&gt;
 /* Extension for credential stores */&lt;br /&gt;
 typedef struct gss_cred_store_element_struct {&lt;br /&gt;
     const char *urn;&lt;br /&gt;
     const char *value;&lt;br /&gt;
 } gss_cred_store_element, *gss_cred_store_element_t;&lt;br /&gt;
 typedef const struct gss_cred_store_element gss_const_cred_store_element_t;&lt;br /&gt;
 &lt;br /&gt;
 typedef struct gss_cred_store_struct {&lt;br /&gt;
     OM_uint32 count;&lt;br /&gt;
     gss_const_cred_store_element_t *elements;&lt;br /&gt;
 } gss_cred_store, *gss_cred_store_t;&lt;br /&gt;
 typedef const struct gss_cred_store_struct *gss_const_cred_store_t;&lt;br /&gt;
&lt;br /&gt;
 #define GSS_C_NO_CRED_STORE ((gss_const_cred_store_t) 0)&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gss_acquire_cred_from(&lt;br /&gt;
             OM_uint32 *minor_status,&lt;br /&gt;
             const gss_name_t desired_name,&lt;br /&gt;
             OM_uint32 time_req,&lt;br /&gt;
             const gss_OID_set desired_mechs,&lt;br /&gt;
             gss_cred_usage_t cred_usage,&lt;br /&gt;
             gss_const_cred_store_t cred_store,&lt;br /&gt;
             gss_cred_id_t *output_cred_handle,&lt;br /&gt;
             gss_OID_set *actual_mechs,&lt;br /&gt;
             OM_uint32 *time_rec);&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gss_add_cred_from (&lt;br /&gt;
             OM_uint32 *minor_status,&lt;br /&gt;
             const gss_cred_id_t input_cred_handle,&lt;br /&gt;
             const gss_name_t desired_name,&lt;br /&gt;
             const gss_OID desired_mech,&lt;br /&gt;
             gss_cred_usage_t cred_usage,&lt;br /&gt;
             OM_uint32 initiator_time_req,&lt;br /&gt;
             OM_uint32 acceptor_time_req,&lt;br /&gt;
             gss_const_cred_store_t cred_store,&lt;br /&gt;
             gss_cred_id_t *output_cred_handle,&lt;br /&gt;
             gss_OID_set *actual_mechs,&lt;br /&gt;
             OM_uint32 *initiator_time_rec,&lt;br /&gt;
             OM_uint32 *acceptor_time_rec);&lt;br /&gt;
&lt;br /&gt;
 OM_uint32 gss_store_cred_into(&lt;br /&gt;
               OM_uint32         *minor_status,&lt;br /&gt;
               gss_cred_id_t     input_cred_handle,&lt;br /&gt;
               gss_cred_usage_t  cred_usage,&lt;br /&gt;
               const gss_OID     desired_mech,&lt;br /&gt;
               OM_uint32         overwrite_cred,&lt;br /&gt;
               OM_uint32         default_cred,&lt;br /&gt;
               gss_const_cred_store_t cred_store,&lt;br /&gt;
               gss_OID_set       *elements_stored,&lt;br /&gt;
               gss_cred_usage_t  *cred_usage_stored);&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Credential_Store_extensions&amp;diff=4619</id>
		<title>Projects/Credential Store extensions</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Credential_Store_extensions&amp;diff=4619"/>
				<updated>2012-05-03T20:48:31Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
This project is about adding a set of extensions to GSSAPI to more easily handle credentials in a mechanism agnostic way.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
During the development of the [https://fedorahosted.org/gss-proxy GSS-Proxy project] in connection with the [[Projects/ProxyGSSAPI]] project it became evident that the application implementing the proxy needs to be able to be configured to use different credentials depending on what application is connecting to the proxy.&lt;br /&gt;
Using the normal defaults of GSSAPI is not possible because the proxy application does not run in the same security context as the proxied application and it may run multiple concurrent tasks on behalf of different applications with different trust/credentials.&lt;br /&gt;
&lt;br /&gt;
A method to pass a set of default credentials to use on behalf of these application is necessary. This method should not be mechanism specific, as the proxy tries to be mechanism agnostic as much as possible.&lt;br /&gt;
&lt;br /&gt;
In this light a 'Credential Stores' Extension has been [http://www.ietf.org/mail-archive/web/kitten/current/msg03013.html proposed] on the Kitten IETF Mailing list.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Abstract interface to pass credential store configuration to GSSAPI mechanisms.&lt;br /&gt;
* The credentials need to be specified in configuration files so no security sensitive information (like passwords) must be exposed there.&lt;br /&gt;
* Mechanisms can define their own key/value pairs&lt;br /&gt;
* New Key/Value pairs can be easily added in future&lt;br /&gt;
* The actual API need not to know how to interpret Key/Value pairs, they are passed directly to mechanisms&lt;br /&gt;
&lt;br /&gt;
== Architecture ==&lt;br /&gt;
&lt;br /&gt;
The exposed public functions are paired with an analogous one in the mechglue SPI to give mechanisms access to the Credentials Store.&lt;br /&gt;
The implementation provides functions only for mechanisms for which it makes sense, initially krb5 but not SPNEGO&lt;br /&gt;
&lt;br /&gt;
== New APIs ==&lt;br /&gt;
&lt;br /&gt;
Functions:&lt;br /&gt;
* GSS_Acquire_cred_from()&lt;br /&gt;
* GSS_Add_cred_from()&lt;br /&gt;
* GSS_Store_cred_into()&lt;br /&gt;
&lt;br /&gt;
Structures:&lt;br /&gt;
* gss_cred_store_element_struct&lt;br /&gt;
* gss_cred_store_struct&lt;br /&gt;
&lt;br /&gt;
If the cred store structure does not contain a mechanism specific configuration for the mechanism at hand gthe usual defaults are applied.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== gss_aqcuire_cred_from() ===&lt;br /&gt;
&lt;br /&gt;
Acquires new credentials using the provided store. The store can specify both the actual credentials and/or the credential cache.&lt;br /&gt;
In the Krb5 mechanism case it could specify a keytab and a ccache location.&lt;br /&gt;
&lt;br /&gt;
=== gss_add_cred_from() ===&lt;br /&gt;
&lt;br /&gt;
Same as above but can target a specific mechanism. The credential store need not be mechanism specific and re mains abstract.&lt;br /&gt;
&lt;br /&gt;
=== gss_strore_cred_into() ===&lt;br /&gt;
&lt;br /&gt;
This is analogous to gss_cred_store() except that a specific credential store can be specified (In the krb5 case generally a ccache file).&lt;br /&gt;
&lt;br /&gt;
=== gss_cred_store_element_struct ===&lt;br /&gt;
&lt;br /&gt;
A urn/value pair.&lt;br /&gt;
Example:&lt;br /&gt;
URN = 'ccache'&lt;br /&gt;
Value = 'FILE:/tmp/somecc'&lt;br /&gt;
&lt;br /&gt;
=== gss_cred_store_struct ===&lt;br /&gt;
&lt;br /&gt;
A counter and an array of elements.&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/Credential_Store_extensions&amp;diff=4618</id>
		<title>Projects/Credential Store extensions</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/Credential_Store_extensions&amp;diff=4618"/>
				<updated>2012-05-03T20:33:39Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: New page: {{project-early}}  This project is about adding a set of extensions to GSSAPI to more easily handle credentials in a mechanism agnostic way.  == Background ==  During the development of th...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
This project is about adding a set of extensions to GSSAPI to more easily handle credentials in a mechanism agnostic way.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
During the development of the [https://fedorahosted.org/gss-proxy GSS-Proxy project] in connection with the [[Projects/ProxyGSSAPI]] project it became evident that the application implementing the proxy needs to be able to be configured to use different credentials depending on what application is connecting to the proxy.&lt;br /&gt;
Using the normal defaults of GSSAPI is not possible because the proxy application does not run in the same security context as the proxied application and it may run multiple concurrent tasks on behalf of different applications with different trust/credentials.&lt;br /&gt;
&lt;br /&gt;
A method to pass a set of default credentials to use on behalf of these application is necessary. This method should not be mechanism specific, as the proxy tries to be mechanism agnostic as much as possible.&lt;br /&gt;
&lt;br /&gt;
In this light a 'Credential Stores' Extension has been [http://www.ietf.org/mail-archive/web/kitten/current/msg03013.html proposed] on the Kitten IETF Mailing list.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Abstract interface to pass credential store configuration to GSSAPI mechanisms.&lt;br /&gt;
* The credentials need to be specified in configuration files so no security sensitive information (like passwords) must be exposed there.&lt;br /&gt;
* Mechanisms can define their own key/value pairs&lt;br /&gt;
* New Key/Value pairs can be easily added in future&lt;br /&gt;
* The actual API need not to know how to interpret Key/Value pairs, they are passed directly to mechanisms&lt;br /&gt;
&lt;br /&gt;
== Architecture ==&lt;br /&gt;
&lt;br /&gt;
The exposed public functions are paired with an analogous one in the mechglue SPI to give mechanisms access to the Credentials Store.&lt;br /&gt;
The implementation provides functions only for mechanisms for which it makes sense, initially krb5 but not SPNEGO&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/ProxyGSSAPI&amp;diff=4617</id>
		<title>Projects/ProxyGSSAPI</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/ProxyGSSAPI&amp;diff=4617"/>
				<updated>2012-05-03T20:15:37Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: /* RPC mechanism */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
This project is about creating a mechanism by which it is possible to proxy accepting and initializing a security context to a separate trusted system service without giving access to long term keys to an application.&lt;br /&gt;
The proxy would be created at the mechglue layer so that any mechanism can be proxied.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
We have identified two main scenarios that benefit from this approach.&lt;br /&gt;
&lt;br /&gt;
One is the ability to lock long term keys (especially the host/ key when the krb5 mechanism is used) into a trusted service on the system so that &amp;quot;less&amp;quot; trusted applications do not have direct access to the keys. This is a form of privilege separation that allows better control of the keys and reduces the attack surface of the system when it comes to gaining access to such keys.&lt;br /&gt;
&lt;br /&gt;
The other is about trusting data being carried through, for example, krb5 tickets. In systems that use signed authorization data, it is fundamental for a &amp;quot;trusted&amp;quot; service to directly handle accepting a context so that it is impossible for an application to &amp;quot;fake&amp;quot; Authorization data by having access to the host keys and therefore being able to sign authorization data blobs.&lt;br /&gt;
As an example think of a user accessing a FTP daemon and sending a user credentials (MS-PAC/PAD) in the ticket. A trusted service need to be able to verify that the KDC actually did sign this data in order to trust its authenticity and allow the system to create a user out of this data. A way to fully trust this data when it is signed by the long term key is to not allow the FTP service to have access to the long term keys, so that a subverted service is not allowed to create fake data and sign it in order to perform privilege elevation attacks.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
In order to be able to implement this proxy it is fundamental to be able to create an IPC mechanism to transfer data from the process handling the GSSAPI exchange to the trusted service holding the keys and negotiating the security context.&lt;br /&gt;
&lt;br /&gt;
This IPC mechanism should use a defined protocol so that independent implementations of the trusted service can be created.&lt;br /&gt;
&lt;br /&gt;
Interface stability either at an API level (if an endpoint library is created) or at the protocol level is highly desirable but not fundamental.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Considerations on the design =&lt;br /&gt;
&lt;br /&gt;
There are a few challenges that need to be considered for this project.&lt;br /&gt;
&lt;br /&gt;
== Access privileges ==&lt;br /&gt;
&lt;br /&gt;
Currently access to credentials is determined base on file permissions. If the user/application have access to the keytab/credentials then it is allowed to use them for any purpose. By adding an IPC mechanism we need to also add a mechanism to determine what privileges the calling in process have.&lt;br /&gt;
&lt;br /&gt;
One way to do this is by replicating the permission model on keytab files as permission on the directories containing the unix socket. One directory per credential/keytab with file system permissions et so only processes belonging to the user owner can access the IPC pipe.&lt;br /&gt;
On some systems it is also possible to inspect the credentials of the connecting process via special system calls on the socket. On those systems it is possible to decide to use a single socket and perform access control in the daemon.&lt;br /&gt;
&lt;br /&gt;
== What to proxy ? ==&lt;br /&gt;
&lt;br /&gt;
There are a few ways the proxy code can be designed.&lt;br /&gt;
&lt;br /&gt;
a) Proxy everything unconditionally in any case&lt;br /&gt;
b) Have a flag or method call that can tell which mechanisms to proxy&lt;br /&gt;
c) Proxy on a per application based on per application configuration&lt;br /&gt;
&lt;br /&gt;
Each of them may be desirable but there are a few drawbacks with each approach:&lt;br /&gt;
&lt;br /&gt;
With (a) it may turn out that the mechanism will need access to long term secrets even after the security context has been established. That could be handled by passing in the long term keys with the export/import credentials function that is needed to transfer session keys.&lt;br /&gt;
This would render privilege separation useless though. Another option would be to provide extensions so mechanism can delegate these operation to the proxy, but this looks tricky.&lt;br /&gt;
&lt;br /&gt;
With (b), mechanisms that cannot easily be proxied could be marked as such and not proxied. The issue here is that there are meta-mechs like SPNEGO that would have to deal with the saem flags and change behavior dynamically based on which mech is being probed. It is not unconceivable to make meta-mechs smart enough to do that but probably too much for a first release.&lt;br /&gt;
&lt;br /&gt;
The problem with (c) is that it may require application changes to add the desired option, and in general you want a global policy. However a simplistic method to check whether to proxy or not could be for the GSSAPI to check if direct access to credentials is available and skip proxying in case direct access is possible.&lt;br /&gt;
&lt;br /&gt;
== RPC mechanism ==&lt;br /&gt;
&lt;br /&gt;
In order to proxy data around the IPC pipes need to be able to (un)marshal data back and forth.&lt;br /&gt;
There are a few options I can see to handle messaging.&lt;br /&gt;
&lt;br /&gt;
After careful considreation it has been decided to use SUNRPC/XDR as the transport. The actual proxy server does not register to a RPC endpoint mapper but otherwise uses full RPC format on the wire and XDR encoding.&lt;br /&gt;
&lt;br /&gt;
The actual protocol has been assigned number 400112 and is being documented in the [https://fedorahosted.org/gss-proxy/wiki/ProtocolDocumentation gss-proxy project]&lt;br /&gt;
&lt;br /&gt;
The resons for choosing RPC/XDR were multiple.&lt;br /&gt;
* It is a wellknown encoding with a reasonable description language and a compiler for RPC stubs.&lt;br /&gt;
* Most krb5 projects already have bultin facilities to handle this protocol.&lt;br /&gt;
* Most kernels also already have support for handling SUNRPC/XDR from the NFS code.&lt;br /&gt;
&lt;br /&gt;
The last point is relevant due to the fact that the Gss-Proxy concept aligns quite well also to the Kernel case where supporting GSSAPI authentication for NFS or CIFS server/clients is valuable but embedding a whle gss library is excessive. In this case using the gss-proxy protocol directly allows to use basic gssapi services easily without having to implement a full gssapi library in kernel.&lt;br /&gt;
A proof of concept implementation for using part of the protocol in the Linux kernel has been implemented and posted to LKML.&lt;br /&gt;
&lt;br /&gt;
== Additional Considerations ==&lt;br /&gt;
&lt;br /&gt;
The GSSAPI design is currently completely synchronous. By adding an IPC communication venue we increase the risk of stalling the application by blocking on socket operations while waiting for the trusted service to be scheduled and perform the needed operations.&lt;br /&gt;
Although this is not always desirable as it add latency, other parts of GSSAPI can add latency during accept/init phases. Some mechanism for example may perform blocking netowrk operations like DNS lookups as well.&lt;br /&gt;
Considering that the accept/init phases usually represent a very tiny amount of time compared to the life of a secured connection and considering that most of the time the connection setup already suffers from network latencies we think this is acceptable at this stage. Application can mitigate issues with blocking operations by confining GSSAPI related handling into a separate thread.&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
(Draft)&lt;br /&gt;
&lt;br /&gt;
The two main hooks for this functionality will be implemented in gss_accept_sec_context() for accepting 3rd party initiate security negotiations and gss_init_sec_context() for initializing a security context on the application behalf.&lt;br /&gt;
&lt;br /&gt;
= Milestones =&lt;br /&gt;
&lt;br /&gt;
* Introduce new RPC library with stub generator/IDL compiler&lt;br /&gt;
* Define the RPC interfaces to be implemented&lt;br /&gt;
* Introduce a new meta-mechanism that implements the client side of the proxy&lt;br /&gt;
* Create a simple server program for testing purposes&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
= Dependencies =&lt;br /&gt;
&lt;br /&gt;
TBD, potentially needs to rupdate the RPC code.&lt;br /&gt;
&lt;br /&gt;
= Goal =&lt;br /&gt;
&lt;br /&gt;
Have a working prototype for the 1.11 release&lt;br /&gt;
&lt;br /&gt;
= Testing Plan =&lt;br /&gt;
&lt;br /&gt;
TBD&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/ProxyGSSAPI&amp;diff=3930</id>
		<title>Projects/ProxyGSSAPI</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/ProxyGSSAPI&amp;diff=3930"/>
				<updated>2011-08-23T20:04:23Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
This project is about creating a mechanism by which it is possible to proxy accepting and initializing a security context to a separate trusted system service without giving access to long term keys to an application.&lt;br /&gt;
The proxy would be created at the mechglue layer so that any mechanism can be proxied.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
We have identified two main scenarios that benefit from this approach.&lt;br /&gt;
&lt;br /&gt;
One is the ability to lock long term keys (especially the host/ key when the krb5 mechanism is used) into a trusted service on the system so that &amp;quot;less&amp;quot; trusted applications do not have direct access to the keys. This is a form of privilege separation that allows better control of the keys and reduces the attack surface of the system when it comes to gaining access to such keys.&lt;br /&gt;
&lt;br /&gt;
The other is about trusting data being carried through, for example, krb5 tickets. In systems that use signed authorization data, it is fundamental for a &amp;quot;trusted&amp;quot; service to directly handle accepting a context so that it is impossible for an application to &amp;quot;fake&amp;quot; Authorization data by having access to the host keys and therefore being able to sign authorization data blobs.&lt;br /&gt;
As an example think of a user accessing a FTP daemon and sending a user credentials (MS-PAC/PAD) in the ticket. A trusted service need to be able to verify that the KDC actually did sign this data in order to trust its authenticity and allow the system to create a user out of this data. A way to fully trust this data when it is signed by the long term key is to not allow the FTP service to have access to the long term keys, so that a subverted service is not allowed to create fake data and sign it in order to perform privilege elevation attacks.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
In order to be able to implement this proxy it is fundamental to be able to create an IPC mechanism to transfer data from the process handling the GSSAPI exchange to the trusted service holding the keys and negotiating the security context.&lt;br /&gt;
&lt;br /&gt;
This IPC mechanism should use a defined protocol so that independent implementations of the trusted service can be created.&lt;br /&gt;
&lt;br /&gt;
Interface stability either at an API level (if an endpoint library is created) or at the protocol level is highly desirable but not fundamental.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Considerations on the design =&lt;br /&gt;
&lt;br /&gt;
There are a few challenges that need to be considered for this project.&lt;br /&gt;
&lt;br /&gt;
== Access privileges ==&lt;br /&gt;
&lt;br /&gt;
Currently access to credentials is determined base on file permissions. If the user/application have access to the keytab/credentials then it is allowed to use them for any purpose. By adding an IPC mechanism we need to also add a mechanism to determine what privileges the calling in process have.&lt;br /&gt;
&lt;br /&gt;
One way to do this is by replicating the permission model on keytab files as permission on the directories containing the unix socket. One directory per credential/keytab with file system permissions et so only processes belonging to the user owner can access the IPC pipe.&lt;br /&gt;
On some systems it is also possible to inspect the credentials of the connecting process via special system calls on the socket. On those systems it is possible to decide to use a single socket and perform access control in the daemon.&lt;br /&gt;
&lt;br /&gt;
== What to proxy ? ==&lt;br /&gt;
&lt;br /&gt;
There are a few ways the proxy code can be designed.&lt;br /&gt;
&lt;br /&gt;
a) Proxy everything unconditionally in any case&lt;br /&gt;
b) Have a flag or method call that can tell which mechanisms to proxy&lt;br /&gt;
c) Proxy on a per application based on per application configuration&lt;br /&gt;
&lt;br /&gt;
Each of them may be desirable but there are a few drawbacks with each approach:&lt;br /&gt;
&lt;br /&gt;
With (a) it may turn out that the mechanism will need access to long term secrets even after the security context has been established. That could be handled by passing in the long term keys with the export/import credentials function that is needed to transfer session keys.&lt;br /&gt;
This would render privilege separation useless though. Another option would be to provide extensions so mechanism can delegate these operation to the proxy, but this looks tricky.&lt;br /&gt;
&lt;br /&gt;
With (b), mechanisms that cannot easily be proxied could be marked as such and not proxied. The issue here is that there are meta-mechs like SPNEGO that would have to deal with the saem flags and change behavior dynamically based on which mech is being probed. It is not unconceivable to make meta-mechs smart enough to do that but probably too much for a first release.&lt;br /&gt;
&lt;br /&gt;
The problem with (c) is that it may require application changes to add the desired option, and in general you want a global policy. However a simplistic method to check whether to proxy or not could be for the GSSAPI to check if direct access to credentials is available and skip proxying in case direct access is possible.&lt;br /&gt;
&lt;br /&gt;
== RPC mechanism ==&lt;br /&gt;
&lt;br /&gt;
In order to proxy data around the IPC pipes need to be able to (un)marshal data back and forth.&lt;br /&gt;
There are a few options I can see to handle messaging.&lt;br /&gt;
&lt;br /&gt;
a) Stick all data in a flat structure that uses no pointers and just shove a copy of the structure down the socket. If proper alignment is used for the structure than even hybrid32/64 bit systems should be able to exchange data between 32 bit and 64 bit processes without issues. On the other hand it is very easy to break such a protocol by simply changing the structure. It is also somewhat difficult to deal with variable size buffers and optional values.&lt;br /&gt;
&lt;br /&gt;
b) Manually (un)marshal data in a custom crafted protocol. Not really appealing unless the data to be transfered is really simple and the variations/type of messages are very few and well defined.&lt;br /&gt;
&lt;br /&gt;
c) Use an RPC library that has an IDL compiler/stub generator and all the tools necessary to automatically serialize structures and data. This is definitely the preferred solution when complex structures need to be passed around. Unfortunately the current MIT libraries lack an IDL compiler, so some updates/new dependencies would need to be introduced.&lt;br /&gt;
&lt;br /&gt;
d) Defer the actual RPC mechanism by offloading data transfer to a pluggable library mechanism. This would offload the problem on the trusted service implementers. But it would also mean problems with interoperability and problems with testing in tree. Testing is especially important in order to prevent breakage.&lt;br /&gt;
&lt;br /&gt;
The GSSAPI interfaces include some complex structures like channel bindings and session crdentials that need to be passed back and forth. So option (c) looks like the soundest approach.&lt;br /&gt;
&lt;br /&gt;
== Additional Considerations ==&lt;br /&gt;
&lt;br /&gt;
The GSSAPI design is currently completely synchronous. By adding an IPC communication venue we increase the risk of stalling the application by blocking on socket operations while waiting for the trusted service to be scheduled and perform the needed operations.&lt;br /&gt;
Although this is not always desirable as it add latency, other parts of GSSAPI can add latency during accept/init phases. Some mechanism for example may perform blocking netowrk operations like DNS lookups as well.&lt;br /&gt;
Considering that the accept/init phases usually represent a very tiny amount of time compared to the life of a secured connection and considering that most of the time the connection setup already suffers from network latencies we think this is acceptable at this stage. Application can mitigate issues with blocking operations by confining GSSAPI related handling into a separate thread.&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
(Draft)&lt;br /&gt;
&lt;br /&gt;
The two main hooks for this functionality will be implemented in gss_accept_sec_context() for accepting 3rd party initiate security negotiations and gss_init_sec_context() for initializing a security context on the application behalf.&lt;br /&gt;
&lt;br /&gt;
= Milestones =&lt;br /&gt;
&lt;br /&gt;
* Introduce new RPC library with stub generator/IDL compiler&lt;br /&gt;
* Define the RPC interfaces to be implemented&lt;br /&gt;
* Introduce a new meta-mechanism that implements the client side of the proxy&lt;br /&gt;
* Create a simple server program for testing purposes&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
= Dependencies =&lt;br /&gt;
&lt;br /&gt;
TBD, potentially needs to rupdate the RPC code.&lt;br /&gt;
&lt;br /&gt;
= Goal =&lt;br /&gt;
&lt;br /&gt;
Have a working prototype for the 1.11 release&lt;br /&gt;
&lt;br /&gt;
= Testing Plan =&lt;br /&gt;
&lt;br /&gt;
TBD&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/ProxyGSSAPI&amp;diff=3929</id>
		<title>Projects/ProxyGSSAPI</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/ProxyGSSAPI&amp;diff=3929"/>
				<updated>2011-08-23T19:53:37Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
This project is about creating a mechanism by which it is possible to proxy accepting and initializing a security context to a separate trusted system service without giving access to long term keys to an application.&lt;br /&gt;
The proxy would be created at the mechglue layer so that any mechanism can be proxied.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
We have identified two main scenarios that benefit from this approach.&lt;br /&gt;
&lt;br /&gt;
One is the ability to lock long term keys (especially the host/ key when the krb5 mechanism is used) into a trusted service on the system so that &amp;quot;less&amp;quot; trusted applications do not have direct access to the keys. This is a form of privilege separation that allows better control of the keys and reduces the attack surface of the system when it comes to gaining access to such keys.&lt;br /&gt;
&lt;br /&gt;
The other is about trusting data being carried through, for example, krb5 tickets. In systems that use signed authorization data, it is fundamental for a &amp;quot;trusted&amp;quot; service to directly handle accepting a context so that it is impossible for an application to &amp;quot;fake&amp;quot; Authorization data by having access to the host keys and therefore being able to sign authorization data blobs.&lt;br /&gt;
As an example think of a user accessing a FTP daemon and sending a user credentials (MS-PAC/PAD) in the ticket. A trusted service need to be able to verify that the KDC actually did sign this data in order to trust its authenticity and allow the system to create a user out of this data. A way to fully trust this data when it is signed by the long term key is to not allow the FTP service to have access to the long term keys, so that a subverted service is not allowed to create fake data and sign it in order to perform privilege elevation attacks.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
In order to be able to implement this proxy it is fundamental to be able to create an IPC mechanism to transfer data from the process handling the GSSAPI exchange to the trusted service holding the keys and negotiating the security context.&lt;br /&gt;
&lt;br /&gt;
This IPC mechanism should use a defined protocol so that independent implementations of the trusted service can be created.&lt;br /&gt;
&lt;br /&gt;
Interface stability either at an API level (if an endpoint library is created) or at the protocol level is highly desirable but not fundamental.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Considerations on the design =&lt;br /&gt;
&lt;br /&gt;
There are a few challenges that need to be considered for this project.&lt;br /&gt;
&lt;br /&gt;
== Access privileges ==&lt;br /&gt;
&lt;br /&gt;
Currently access to credentials is determined base on file permissions. If the user/application have access to the keytab/credentials then it is allowed to use them for any purpose. By adding an IPC mechanism we need to also add a mechanism to determine what privileges the calling in process have.&lt;br /&gt;
&lt;br /&gt;
One way to do this is by replicating the permission model on keytab files as permission on the directories containing the unix socket. One directory per credential/keytab with file system permissions et so only processes belonging to the user owner can access the IPC pipe.&lt;br /&gt;
On some systems it is also possible to inspect the credentials of the connecting process via special system calls on the socket. On those systems it is possible to decide to use a single socket and perform access control in the daemon.&lt;br /&gt;
&lt;br /&gt;
== What to proxy ? ==&lt;br /&gt;
&lt;br /&gt;
There are a few ways the proxy code can be designed.&lt;br /&gt;
&lt;br /&gt;
a) Proxy everything unconditionally in any case&lt;br /&gt;
b) Have a flag or method call that can tell which mechanisms to proxy&lt;br /&gt;
c) Proxy on a per application based on per application configuration&lt;br /&gt;
&lt;br /&gt;
Each of them may be desirable but there are a few drawbacks with each approach:&lt;br /&gt;
&lt;br /&gt;
With (a) it may turn out that the mechanism will need access to long term secrets even after the security context has been established. That could be handled by passing in the long term keys with the export/import credentials function that is needed to transfer session keys.&lt;br /&gt;
This would render privilege separation useless though. Another option would be to provide extensions so mechanism can delegate these operation to the proxy, but this looks tricky.&lt;br /&gt;
&lt;br /&gt;
With (b), mechanisms that cannot easily be proxied could be marked as such and not proxied. The issue here is that there are meta-mechs like SPNEGO that would have to deal with the saem flags and change behavior dynamically based on which mech is being probed. It is not unconceivable to make meta-mechs smart enough to do that but probably too much for a first release.&lt;br /&gt;
&lt;br /&gt;
The problem with (c) is that it may require application changes to add the desired option, and in general you want a global policy. However a simplistic method to check whether to proxy or not could be for the GSSAPI to check if direct access to credentials is available and skip proxying in case direct access is possible.&lt;br /&gt;
&lt;br /&gt;
== RPC mechanism ==&lt;br /&gt;
&lt;br /&gt;
In order to proxy data around the IPC pipes need to be able to (un)marshal data back and forth.&lt;br /&gt;
There are a few options I can see to handle messaging.&lt;br /&gt;
&lt;br /&gt;
a) Stick all data in a flat structure that uses no pointers and just shove a copy of the structure down the socket. If proper alignment is used for the structure than even hybrid32/64 bit systems should be able to exchange data between 32 bit and 64 bit processes without issues. On the other hand it is very easy to break such a protocol by simply changing the structure. It is also somewhat difficult to deal with variable size buffers and optional values.&lt;br /&gt;
&lt;br /&gt;
b) Manually (un)marshal data in a custom crafted protocol. Not really appealing unless the data to be transfered is really simple and the variations/type of messages are very few and well defined.&lt;br /&gt;
&lt;br /&gt;
c) Use an RPC library that has an IDL compiler/stub generator and all the tools necessary to automatically serialize structures and data. This is definitely the preferred solution when complex structures need to be passed around. Unfortunately the current MIT libraries lack an IDL compiler, so some updates/new dependencies would need to be introduced.&lt;br /&gt;
&lt;br /&gt;
d) Defer the actual RPC mechanism by offloading data transfer to a pluggable library mechanism. This would offload the problem on the trusted service implementers. But it would also mean problems with interoperability and problems with testing in tree. Testing is especially important in order to prevent breakage.&lt;br /&gt;
&lt;br /&gt;
The GSSAPI interfaces include some complex structures like channel bindings and session crdentials that need to be passed back and forth. So option (c) looks like the soundest approach.&lt;br /&gt;
&lt;br /&gt;
= Milestones =&lt;br /&gt;
&lt;br /&gt;
* Introduce new RPC library with stub generator/IDL compiler&lt;br /&gt;
* Define the RPC interfaces to be implemented&lt;br /&gt;
* Introduce a new meta-mechanism that implements the client side of the proxy&lt;br /&gt;
* Create a simple server program for testing purposes&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
= Dependencies =&lt;br /&gt;
&lt;br /&gt;
TBD, potentially needs to rupdate the RPC code.&lt;br /&gt;
&lt;br /&gt;
= Goal =&lt;br /&gt;
&lt;br /&gt;
Have a working prototype for the 1.11 release&lt;br /&gt;
&lt;br /&gt;
= Testing Plan =&lt;br /&gt;
&lt;br /&gt;
TBD&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/ProxyGSSAPI&amp;diff=3928</id>
		<title>Projects/ProxyGSSAPI</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/ProxyGSSAPI&amp;diff=3928"/>
				<updated>2011-08-23T19:40:09Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
This project is about creating a mechanism by which it is possible to proxy accepting and initializing a security context to a separate trusted system service without giving access to long term keys to an application.&lt;br /&gt;
The proxy would be created at the mechglue layer so that any mechanism can be proxied.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
We have identified two main scenarios that benefit from this approach.&lt;br /&gt;
&lt;br /&gt;
One is the ability to lock long term keys (especially the host/ key when the krb5 mechanism is used) into a trusted service on the system so that &amp;quot;less&amp;quot; trusted applications do not have direct access to the keys. This is a form of privilege separation that allows better control of the keys and reduces the attack surface of the system when it comes to gaining access to such keys.&lt;br /&gt;
&lt;br /&gt;
The other is about trusting data being carried through, for example, krb5 tickets. In systems that use signed authorization data, it is fundamental for a &amp;quot;trusted&amp;quot; service to directly handle accepting a context so that it is impossible for an application to &amp;quot;fake&amp;quot; Authorization data by having access to the host keys and therefore being able to sign authorization data blobs.&lt;br /&gt;
As an example think of a user accessing a FTP daemon and sending a user credentials (MS-PAC/PAD) in the ticket. A trusted service need to be able to verify that the KDC actually did sign this data in order to trust its authenticity and allow the system to create a user out of this data. A way to fully trust this data when it is signed by the long term key is to not allow the FTP service to have access to the long term keys, so that a subverted service is not allowed to create fake data and sign it in order to perform privilege elevation attacks.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
In order to be able to implement this proxy it is fundamental to be able to create an IPC mechanism to transfer data from the process handling the GSSAPI exchange to the trusted service holding the keys and negotiating the security context.&lt;br /&gt;
&lt;br /&gt;
This IPC mechanism should use a defined protocol so that independent implementations of the trusted service can be created.&lt;br /&gt;
&lt;br /&gt;
Interface stability either at an API level (if an endpoint library is created) or at the protocol level is highly desirable but not fundamental.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Considerations on the design =&lt;br /&gt;
&lt;br /&gt;
There are a few challenges that need to be considered for this project.&lt;br /&gt;
&lt;br /&gt;
== Access privileges ==&lt;br /&gt;
&lt;br /&gt;
Currently access to credentials is determined base on file permissions. If the user/application have access to the keytab/credentials then it is allowed to use them for any purpose. By adding an IPC mechanism we need to also add a mechanism to determine what privileges the calling in process have.&lt;br /&gt;
&lt;br /&gt;
One way to do this is by replicating the permission model on keytab files as permission on the directories containing the unix socket. One directory per credential/keytab with file system permissions et so only processes belonging to the user owner can access the IPC pipe.&lt;br /&gt;
On some systems it is also possible to inspect the credentials of the connecting process via special system calls on the socket. On those systems it is possible to decide to use a single socket and perform access control in the daemon.&lt;br /&gt;
&lt;br /&gt;
== What to proxy ? ==&lt;br /&gt;
&lt;br /&gt;
There are a few ways the proxy code can be designed.&lt;br /&gt;
&lt;br /&gt;
a) Proxy everything unconditionally in any case&lt;br /&gt;
b) Have a flag or method call that can tell which mechanisms to proxy&lt;br /&gt;
c) Proxy on a per application based on per application configuration&lt;br /&gt;
&lt;br /&gt;
Each of them may be desirable but there are a few drawbacks with each approach:&lt;br /&gt;
&lt;br /&gt;
With (a) it may turn out that the mechanism will need access to long term secrets even after the security context has been established. That could be handled by passing in the long term keys with the export/import credentials function that is needed to transfer session keys.&lt;br /&gt;
This would render privilege separation useless though. Another option would be to provide extensions so mechanism can delegate these operation to the proxy, but this looks tricky.&lt;br /&gt;
&lt;br /&gt;
With (b), mechanisms that cannot easily be proxied could be marked as such and not proxied. The issue here is that there are meta-mechs like SPNEGO that would have to deal with the saem flags and change behavior dynamically based on which mech is being probed. It is not unconceivable to make meta-mechs smart enough to do that but probably too much for a first release.&lt;br /&gt;
&lt;br /&gt;
The problem with (c) is that it may require application changes to add the desired option, and in general you want a global policy. However a simplistic method to check whether to proxy or not could be for the GSSAPI to check if direct access to credentials is available and skip proxying in case direct access is possible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    * A design for how the desired functionality will be implemented&lt;br /&gt;
    * A breakdown of tasks or milestones to judge progress of the project&lt;br /&gt;
    * Screenshots or other proposed user interface descriptions&lt;br /&gt;
    * Documentation and sample code for any APIs that are proposed&lt;br /&gt;
    * Dependencies on other projects&lt;br /&gt;
    * Information on desired integration and release goals&lt;br /&gt;
    * Testing plan&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Projects/ProxyGSSAPI&amp;diff=3926</id>
		<title>Projects/ProxyGSSAPI</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Projects/ProxyGSSAPI&amp;diff=3926"/>
				<updated>2011-08-23T19:27:34Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: New page: {{project-early}}  This project is about creating a mechanism by which it is possible to proxy accepting and initializing a security context to a separate trusted system service without gi...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{project-early}}&lt;br /&gt;
&lt;br /&gt;
This project is about creating a mechanism by which it is possible to proxy accepting and initializing a security context to a separate trusted system service without giving access to long term keys to an application.&lt;br /&gt;
The proxy would be created at the mechglue layer so that any mechanism can be proxied.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
We have identified two main scenarios that benefit from this approach.&lt;br /&gt;
&lt;br /&gt;
One is the ability to lock long term keys (especially the host/ key when the krb5 mechanism is used) into a trusted service on the system so that &amp;quot;less&amp;quot; trusted applications do not have direct access to the keys. This is a form of privilege separation that allows better control of the keys and reduces the attack surface of the system when it comes to gaining access to such keys.&lt;br /&gt;
&lt;br /&gt;
The other is about trusting data being carried through, for example, krb5 tickets. In systems that use signed authorization data, it is fundamental for a &amp;quot;trusted&amp;quot; service to directly handle accepting a context so that it is impossible for an application to &amp;quot;fake&amp;quot; Authorization data by having access to the host keys and therefore being able to sign authorization data blobs.&lt;br /&gt;
As an example think of a user accessing a FTP daemon and sending a user credentials (MS-PAC/PAD) in the ticket. A trusted service need to be able to verify that the KDC actually did sign this data in order to trust its authenticity and allow the system to create a user out of this data. A way to fully trust this data when it is signed by the long term key is to not allow the FTP service to have access to the long term keys, so that a subverted service is not allowed to create fake data and sign it in order to perform privilege elevation attacks.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
In order to be able to implement this proxy it is fundamental to be able to create an IPC mechanism to transfer data from the process handling the GSSAPI exchange to the trusted service holding the keys and negotiating the security context.&lt;br /&gt;
&lt;br /&gt;
This IPC mechanism should use a defined protocol so that independent implementations of the trusted service can be created.&lt;br /&gt;
&lt;br /&gt;
Interface stability either at an API level (if an endpoint library is created) or at the protocol level is highly desirable but not fundamental.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Considerations on the design =&lt;br /&gt;
&lt;br /&gt;
There are a few challenges that need to be considered for this project.&lt;br /&gt;
&lt;br /&gt;
Access privilege.&lt;br /&gt;
Currently access to credentials is determined base on file permissions. If the user/application have access to the keytab/credentials then it is allowed to use them for any purpose.&lt;br /&gt;
By adding an IPC mechanism we need a mechanism to determine &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    * A design for how the desired functionality will be implemented&lt;br /&gt;
    * A breakdown of tasks or milestones to judge progress of the project&lt;br /&gt;
    * Screenshots or other proposed user interface descriptions&lt;br /&gt;
    * Documentation and sample code for any APIs that are proposed&lt;br /&gt;
    * Dependencies on other projects&lt;br /&gt;
    * Information on desired integration and release goals&lt;br /&gt;
    * Testing plan&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	<entry>
		<id>https://k5wiki.test.kerberos.org/wiki?title=Pkinit_configuration&amp;diff=3677</id>
		<title>Pkinit configuration</title>
		<link rel="alternate" type="text/html" href="https://k5wiki.test.kerberos.org/wiki?title=Pkinit_configuration&amp;diff=3677"/>
				<updated>2010-10-29T19:40:08Z</updated>
		
		<summary type="html">&lt;p&gt;Simo: /* Configuring a KDC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Pkinit''' provides support  for using public-key authentication with Kerberos.  Pkinit is useful in the following situations:&lt;br /&gt;
# Using smart cards for Kerberos authentication&lt;br /&gt;
# Authentication based on soft tokens (or certificates stored on a computer) instead of passwords&lt;br /&gt;
# In conjunction with [[anonymous kerberos]] and [[Projects/FAST | FAST]] protecting password exchanges to remove the possibility of [[dictionary attacks]]&lt;br /&gt;
&lt;br /&gt;
This article describes minimal Pkinit configuration  for a KDC and clients.  It assumes you already have a Kerberos realm functioning and that you have the &amp;lt;tt&amp;gt;openssl&amp;lt;/tt&amp;gt; command available.&lt;br /&gt;
&lt;br /&gt;
The following  steps are involved:&lt;br /&gt;
# Setting up a certificate authority&lt;br /&gt;
# Generating a KDC certificate&lt;br /&gt;
# Generating client certificates&lt;br /&gt;
# Configuring the KDC and clients&lt;br /&gt;
# Testing&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
Pkinit requires a public key infrastructure.  The simplest use of&lt;br /&gt;
Pkinit ([[anonymous kerberos]]) requires a certificate authority (CA)&lt;br /&gt;
certificate and a KDC certificate.  The certificate authority&lt;br /&gt;
certificate is known by all clients; any certificates signed by this&lt;br /&gt;
certificate are trusted by the clients.  The KDC certificate is signed&lt;br /&gt;
by the certificate authority certificate (and thus trusted by the&lt;br /&gt;
clients) and identifies the KDC.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If Pkinit is used with smart cards or for other forms of user authentication, then each user will need a certificate as well.&lt;br /&gt;
&lt;br /&gt;
This document discusses how to set up Pkinit for the EXAMPLE.COM realm by hand.  This sort of by-hand setup may be appropriate for anonymous usage.  However if a realm is going to provide certificates to each client then some sort of automated certificate authority will be required to manage certificates.  Configuring an automated certificate authority will depend on what certificate authority is chosen.&lt;br /&gt;
&lt;br /&gt;
== Generating the certificate authority certificate ==&lt;br /&gt;
&lt;br /&gt;
In this document we will use OpenSSL to generate a simple self-signed certificate to use for the certificate authority.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First, generate a private key:&lt;br /&gt;
&amp;lt;pre&amp;gt; openssl genrsa -out cakey.pem 2048 &amp;lt;/pre&amp;gt;&lt;br /&gt;
This will generate a 2048-bit RSA key and write it to file &amp;lt;tt&amp;gt;cakey.pem&amp;lt;/tt&amp;gt;.  In a production environment, this private key should be carefully protected.&lt;br /&gt;
Now, generate the CA certificate:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl req -key cakey.pem -new -x509 -out cacert.pem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This command will ask for the name of the CA and output a CA certificate into &amp;lt;tt&amp;gt;cacert.pem&amp;lt;/tt&amp;gt; using the previously generated key.&lt;br /&gt;
&lt;br /&gt;
== Generating Kerberos certificates ==&lt;br /&gt;
&lt;br /&gt;
Kerberos certificates take advantage of two uncommon features of&lt;br /&gt;
certificates.  First, an extended key usage is used to indicate that&lt;br /&gt;
the certificate should be used with Pkinit.  An extended key usage is&lt;br /&gt;
an object identifier placed in a certificate to indicate what the&lt;br /&gt;
public key should be used for.  Secondly, an otherName form of a&lt;br /&gt;
subjectAlternativeName is used to describe the Kerberos principal&lt;br /&gt;
associated with the certificate.  An otherName is a way of including&lt;br /&gt;
types of names in certificates that were not part of the original&lt;br /&gt;
X.509 architecture.  Unfortunately, including these elements in a&lt;br /&gt;
certificate requires the use of an OpenSSL extensions file.  This&lt;br /&gt;
file provides configuration for the certificate generation process.  However the mechanisms for providing user data such as the name of the realm and the  client principal to the otherName component are primitive.&lt;br /&gt;
&lt;br /&gt;
This article includes a sample OpenSSL extensions file; see&lt;br /&gt;
[[#Extensions file]].  Paste that section of the article into a filed called &amp;lt;tt&amp;gt;pkinit_extensions&amp;lt;/tt&amp;gt;.  That file uses environment variables to set the&lt;br /&gt;
client and realm name.&lt;br /&gt;
&lt;br /&gt;
=== Generating KDC certificate ===&lt;br /&gt;
&lt;br /&gt;
First, generate the KDC key:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl genrsa -out kdckey.pem 2048 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then,  generate a certificate request&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl req -new -out kdc.req -key kdckey.pem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Enter in the KDC name information.&lt;br /&gt;
To generate the certificate:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
REALM=EXAMPLE.COM; export REALM&lt;br /&gt;
&lt;br /&gt;
openssl x509 -req -in kdc.req -CAkey cakey.pem -CA cacert.pem -out kdc.pem -extfile pkinit_extensions -extensions kdc_cert -CAcreateserial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will generate a certificate, &amp;lt;tt&amp;gt;kdc.pem&amp;lt;/tt&amp;gt;, for the KDC.  The&lt;br /&gt;
first two lines set environment variables used by the extensions&lt;br /&gt;
file. The &amp;lt;i&amp;gt;REALM&amp;lt;/i&amp;gt; variable should be set to the name of your&lt;br /&gt;
realm.&lt;br /&gt;
&lt;br /&gt;
=== Generating client certificates ===&lt;br /&gt;
&lt;br /&gt;
For use with anonymous Kerberos, no additional certificates are needed.  For other uses of Pkinit, generate a certificate for each client.  Typically on the client machine, the private key is generated:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl genrsa -out clientkey.pem 2048&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The certificate request is also typically generated on the client machine:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl req -new -key clientkey.pem -out client.req&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;tt&amp;gt;client.req&amp;lt;/tt&amp;gt; file needs to be copied to the machine with the certificate authority key.  Then, sign the certificate:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
REALM=EXAMPLE.COM; export REALM&lt;br /&gt;
CLIENT=alice; export CLIENT&lt;br /&gt;
openssl x509 -CAkey cakey.pem -CA cacert.pem -req -in client.req -extensions client_cert -extfile pkinit_extensions  -out client.pem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
That will sign a certificate for &amp;lt;tt&amp;gt;alice@EXAMPLE.COM&amp;lt;/tt&amp;gt;.  The resulting &amp;lt;tt&amp;gt;client.pem&amp;lt;/tt&amp;gt; needs to be copied back to the client.&lt;br /&gt;
&lt;br /&gt;
== Configuring a KDC ==&lt;br /&gt;
Insert the following entries into the &amp;lt;i&amp;gt;kdcdefaults&amp;lt;/i&amp;gt; or a &amp;lt;i&amp;gt;realms&amp;lt;/i&amp;gt; section of the &amp;lt;tt&amp;gt;kdc.conf&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;krb5.conf&amp;lt;/tt&amp;gt; used by the KDC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pkinit_identity = FILE:/var/lib/krb5kdc/kdc.pem,/var/lib/krb5kdc/kdckey.pem&lt;br /&gt;
pkinit_anchors = FILE:/var/lib/krb5kdc/cacert.pem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Of course, adjust the directory to where the files are stored on your system.&lt;br /&gt;
Then, for each client principal that uses pkinit, set the &amp;lt;i&amp;gt;requires_preauth&amp;lt;/i&amp;gt; attribute from within &amp;lt;b&amp;gt;kadmin&amp;lt;/b&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
modprinc +requires_preauth alice@EXAMPLE.COM&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring a client ==&lt;br /&gt;
Add the following to the appropriate realm section of &amp;lt;tt&amp;gt;krb5.conf&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[realms]&lt;br /&gt;
	EXAMPLE.COM = {&lt;br /&gt;
		    pkinit_anchors = FILE:/etc/krb5/cacert.pem&lt;br /&gt;
&lt;br /&gt;
		    pkinit_identities = FILE:/etc/krb5/client.pem,/etc/krb5/clientkey.pem&lt;br /&gt;
		    		    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Of course, &amp;lt;tt&amp;gt;clientkey.pem&amp;lt;/tt&amp;gt; needs to be protected .&lt;br /&gt;
After this point, using &amp;lt;b&amp;gt;kinit&amp;lt;/b&amp;gt; as the appropriate client principal should not require a password.&lt;br /&gt;
&lt;br /&gt;
== Advanced Configuration ==&lt;br /&gt;
=== Including pkinit options in a certificate request ===&lt;br /&gt;
Note that in the above example, the client name was not actually set&lt;br /&gt;
		    		    in the certificate request but was&lt;br /&gt;
		    		    set when the certificate was&lt;br /&gt;
		    		    generated.  In a production&lt;br /&gt;
		    		    situation, it would be desirable&lt;br /&gt;
		    		    to include the client name in a&lt;br /&gt;
		    		    certificate request.  There is an&lt;br /&gt;
		    		    option to do this: the&lt;br /&gt;
		    		    &amp;lt;b&amp;gt;-extenios&amp;lt;/b&amp;gt; option to the&lt;br /&gt;
		    		    &amp;lt;b&amp;gt;openssl req&amp;lt;/b&amp;gt; command is&lt;br /&gt;
		    		    intended for this purpose.&lt;br /&gt;
		    		    Unfortunately, the &amp;lt;b&amp;gt;openssl&lt;br /&gt;
		    		    req&amp;lt;/b&amp;gt; command does not have a&lt;br /&gt;
		    		    &amp;lt;b&amp;gt;-extfile&amp;lt;/b&amp;gt; option.  It seems&lt;br /&gt;
		    		    that a special file for input to&lt;br /&gt;
		    		    the &amp;lt;b&amp;gt;-config&amp;lt;/b&amp;gt; option could be&lt;br /&gt;
		    		    constructed to accomplish this. &lt;br /&gt;
&lt;br /&gt;
In theory, if the options were included in the certificate request,&lt;br /&gt;
then  a traditional certificate authority could be used to issue the&lt;br /&gt;
certificate.  Common practice is not to copy the requested extensions&lt;br /&gt;
into the issued certificate, so special configuration would probably&lt;br /&gt;
be required on the part of the certificate authority.&lt;br /&gt;
&lt;br /&gt;
=== Client identity on the command line ===&lt;br /&gt;
The &amp;lt;b&amp;gt;-X X509_user_identity&amp;lt;/b&amp;gt; option to &amp;lt;b&amp;gt;kinit&amp;lt;/b&amp;gt; allows users&lt;br /&gt;
to specify what Pkinit idenity and key should be used.  It provides an&lt;br /&gt;
alternative to specifying this information in &amp;lt;tt&amp;gt;krb5.conf&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Smart card configuration ===&lt;br /&gt;
The [http://web.mit.edu/Kerberos/krb5-1.6/krb5-1.6.3/doc/krb5-admin.html#pkinit-client-options Kerberos administration manual]&lt;br /&gt;
describes how to configure Pkinit to use PKCS11 smart cards  and how to configure the selection of the correct identity.&lt;br /&gt;
&lt;br /&gt;
== Debugging Pkinit ==&lt;br /&gt;
By default, the MIT Kerberos Pkinit plugin does not support debugging output.  Debugging can be enabled but requires changing the source and rebuilding the plugin.  Add the following line to the top of &amp;lt;tt&amp;gt;src/plugins/preauth/pkinit.h&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define DEBUG&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, rebuild the sources.  Copy the generated &amp;lt;tt&amp;gt;pkinit.so&amp;lt;/tt&amp;gt; into place to get debugging output.&lt;br /&gt;
==Extensions file==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[ kdc_cert ]&lt;br /&gt;
basicConstraints=CA:FALSE&lt;br /&gt;
&lt;br /&gt;
# Here are some examples of the usage of nsCertType. If it is omitted&lt;br /&gt;
keyUsage = nonRepudiation, digitalSignature, keyEncipherment, keyAgreement&lt;br /&gt;
&lt;br /&gt;
#Pkinit EKU&lt;br /&gt;
extendedKeyUsage = 1.3.6.1.5.2.3.5&lt;br /&gt;
&lt;br /&gt;
subjectKeyIdentifier=hash&lt;br /&gt;
authorityKeyIdentifier=keyid,issuer&lt;br /&gt;
&lt;br /&gt;
# Copy subject details&lt;br /&gt;
&lt;br /&gt;
issuerAltName=issuer:copy&lt;br /&gt;
&lt;br /&gt;
# Add id-pkinit-san (pkinit subjectAlternativeName)&lt;br /&gt;
subjectAltName=otherName:1.3.6.1.5.2.2;SEQUENCE:kdc_princ_name&lt;br /&gt;
&lt;br /&gt;
[kdc_princ_name]&lt;br /&gt;
realm = EXP:0, GeneralString:${ENV::REALM}&lt;br /&gt;
principal_name = EXP:1, SEQUENCE:kdc_principal_seq&lt;br /&gt;
&lt;br /&gt;
[kdc_principal_seq]&lt;br /&gt;
name_type = EXP:0, INTEGER:1&lt;br /&gt;
name_string = EXP:1, SEQUENCE:kdc_principals&lt;br /&gt;
&lt;br /&gt;
[kdc_principals]&lt;br /&gt;
princ1 = GeneralString:krbtgt&lt;br /&gt;
princ2 = GeneralString:${ENV::REALM}&lt;br /&gt;
&lt;br /&gt;
[ client_cert ]&lt;br /&gt;
&lt;br /&gt;
# These extensions are added when 'ca' signs a request.&lt;br /&gt;
&lt;br /&gt;
basicConstraints=CA:FALSE&lt;br /&gt;
&lt;br /&gt;
keyUsage = digitalSignature, keyEncipherment, keyAgreement&lt;br /&gt;
&lt;br /&gt;
extendedKeyUsage =  1.3.6.1.5.2.3.4&lt;br /&gt;
subjectKeyIdentifier=hash&lt;br /&gt;
authorityKeyIdentifier=keyid,issuer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
subjectAltName=otherName:1.3.6.1.5.2.2;SEQUENCE:princ_name&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Copy subject details&lt;br /&gt;
&lt;br /&gt;
issuerAltName=issuer:copy&lt;br /&gt;
&lt;br /&gt;
[princ_name]&lt;br /&gt;
realm = EXP:0, GeneralString:${ENV::REALM}&lt;br /&gt;
principal_name = EXP:1, SEQUENCE:principal_seq&lt;br /&gt;
&lt;br /&gt;
[principal_seq]&lt;br /&gt;
name_type = EXP:0, INTEGER:1&lt;br /&gt;
name_string = EXP:1, SEQUENCE:principals&lt;br /&gt;
&lt;br /&gt;
[principals]&lt;br /&gt;
princ1 = GeneralString:${ENV::CLIENT}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Simo</name></author>	</entry>

	</feed>