Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 84518 - krb5-kdc.schema does not work with openldap 2.2.x
Summary: krb5-kdc.schema does not work with openldap 2.2.x
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Kerberos Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-08 07:50 UTC by REdOG
Modified: 2007-04-03 20:32 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
A working krb5-kdc.schema (krb5-kdc.schema,3.95 KB, application/octet-stream)
2005-03-08 07:51 UTC, REdOG
Details

Note You need to log in before you can comment on or make changes to this bug.
Description REdOG 2005-03-08 07:50:42 UTC
Trying to use the krb5-kdc.schema included with app-crypt/heimdal-0.6.3-r1 with openldap-2.2.14 causes slapd to error on start. 


Reproducible: Always
Steps to Reproduce:
1.emerge openldap
2.emerge heimdal
3.include /etc/openldap/schema/krb5-kdc.schema in /etc/openldap/slapd.conf
4./etc/init.d/slapd start

Actual Results:  
/etc/openldap/schema/krb5-kdc.schema: line 80: AttributeType inappropriate
matching rule: "generalizedTimeOrderingMatch"                                  
                                                [ !! ]

Expected Results:  
the schema should work with the version of openldap

http://www.openldap.org/lists/openldap-software/200402/msg00134.html
Comment 1 REdOG 2005-03-08 07:51:39 UTC
Created attachment 52944 [details]
A working krb5-kdc.schema
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-03-09 14:48:17 UTC
this schema is bundled with heimdal NOT openldap.
passing to correct maintainers.
Comment 3 Jose Gonzalez Gomez 2005-04-27 00:46:36 UTC
Take a look at http://www.stacken.kth.se/lists/heimdal-discuss/2005-04/msg00067.html and corresponding thread.
Comment 4 Carsten Lohrke (RETIRED) gentoo-dev 2005-07-03 16:30:44 UTC
audience? :)
Comment 5 Mivz 2005-08-08 09:33:26 UTC
(In reply to comment #4)
> audience? :)

Mabey it would be a good idee to include the krb5-kdc.schema in the mit-krb5 ebuild?
Comment 6 Jose Gonzalez Gomez 2005-08-08 23:42:18 UTC
(In reply to comment #5)
> 
> Mabey it would be a good idee to include the krb5-kdc.schema in the mit-krb5
ebuild?

I see no reason to do that... as long as I know, MIT Kerberos has no support for
storing principal information in LDAP, so it makes no sense to include this
schema in the mit-krb5 ebuild. This schema is only suitable for Heimdal.
Comment 7 Mivz 2005-08-09 11:07:46 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > 
> > Mabey it would be a good idee to include the krb5-kdc.schema in the mit-krb5
> ebuild?
> 
> I see no reason to do that... as long as I know, MIT Kerberos has no support for
> storing principal information in LDAP, so it makes no sense to include this
> schema in the mit-krb5 ebuild. This schema is only suitable for Heimdal.

But ldap has support for gssapi/kerberos authentication whit sasl.
To bind as a ldap uid, there is a sasl-regex to look up the kerberosprincipal in
the ldap database. Normaly the krb5Principal attr of the uid. This can not be
done whit out the schema. So for a ldap v3 environment whit MIT Kerberos, the
schema is nessesary, but onley to register the user principal whit the uid.
Comment 8 Jose Gonzalez Gomez 2005-08-09 14:51:38 UTC
(In reply to comment #7)
> But ldap has support for gssapi/kerberos authentication whit sasl.
> To bind as a ldap uid, there is a sasl-regex to look up the kerberosprincipal in
> the ldap database. Normaly the krb5Principal attr of the uid. This can not be
> done whit out the schema. So for a ldap v3 environment whit MIT Kerberos, the
> schema is nessesary, but onley to register the user principal whit the uid.

I think you're wrong... when you use sasl-regexp to map your authentication
identities, you map the Kerberos authentication identity to an entry in LDAP.
The Kerberos authentication identity is in the form:

uid=<username>,cn=<realm>,cn=<mechanism>,cn=auth

with maybe cn=realm missing if the mechanism doesn't understand the concept of
realms or you're using the default realm. Nothing to do with LDAP schemas in
this part.

You must map that identity to an entry in LDAP, and you can do it for example in
the following way:

sasl-regexp
    uid=(.+),cn=(.+),cn=.+,cn=auth
    ldap:///dc=$2,dc=com??sub?(|(uid=$1)(cn=$1@$2))

Here we're using a ldap search to map the corresponing LDAP entry, and we're
searching just using uid and cn: there is no krb5PrincipalName involved nor
needed, so there is no need for the Kerberos schema.

The only place where you DO need to do a search based on the krb5PrincipalName
attribute is when you are storing your Kerberos entries in the LDAP directory.
For example:

sasl-regexp
    uid=(.+),cn=.+,cn=auth
    ldap:///dc=example,dc=com??sub?(|(uid=$1)(krb5PrincipalName=$1@EXAMPLE.COM))

Here we're searching for a matching uid or krb5PrincipalName, but just because
we're already storing our Kerberos principals in LDAP, and we have the
krb5PrincipalName attribute available. Even in this case you could map the
identities using just the uid and not using the krb5PrincipalName attribute at
all if you use the same uid in LDAP and Kerberos.

So I still think there's no sense in including the Kerberos schema with MIT
Kerberos because it isn't needed. I even think that including it and letting
somebody use krb5PrincipalName as an attribute of an LDAP entry just to map
authentication identities could lead to confusion, as you could think that
Kerberos principals would be stored in LDAP instead of MIT Kerberos own
database, where they really are.

Best regards
Jose

P.D: I think we're getting a bit off topic... maybe we could continue this
discussion privately?
Comment 9 Seemant Kulleen (RETIRED) gentoo-dev 2007-04-03 20:32:00 UTC
so what do you all want me to do with this?  Please reopen when you comment.