Hello.
I am a Linux admin, attempting to authenticate against several large installed AD forests.
Or rather, we have been doing this for years, I'm just exploring some of the nuances of SSH's GSSAPI-based SSO.
All of our default principal names are in camel-case. For example:
Spike...@AMER.EXAMPLE.COM
Why? I suppose because the Windows admins that originally set up these AD forest liked camel-case and Windows is case-insenstive (for principal name.)
Not so Linux. This breaks SSO, as all Linux logins are lower case.
I can create a .k5login file under my home dir as so:
Spike...@AMER.EXAMPLE.COM
and that allows me to SSO to my 'spike_white' account. But instead of requiring a .k5login for every Linux user on every Linux server, I'd prefer to use /etc/krb5.conf auth_to_local rules to convert from uppercase to lower case.
That is, I'd prefer for krb5_kuserok() to match against
spike...@AMER.EXAMPLE.COM, instead of the principal name (found in the client-supplied KRB5 TGT) of
Spike...@AMER.EXAMPLE.COM.
The problem is I'm unsure of the auth_to_local rules syntax. To convert from upper case to lower case.
If this were sed-like syntax, I'd do:
[realms]
AMER.EXAMPLE.COM = {
auth_to_local = {
RULE:[1:$1](^.*$)s/\(.*\)/\L\1/
DEFAULT
}
}
If this were tr-like syntax I could do:
[realms]
AMER.EXAMPLE.COM = {
auth_to_local = {
RULE:[1:$1](^.*$)s/[A-Z]/[a-z]/g
DEFAULT
}
}
Yet another possibility would be to write 26 sequentially rules:
[realms]
AMER.EXAMPLE.COM = {
auth_to_local = {
RULE:[1:$1](^.*$)s/A/a/g
RULE:[1:$1](^.*$)s/B/b/g
...
RULE:[1:$1](^.*$)s/Z/z/g
DEFAULT
}
}
Which of these is the proper way to write the rule?
Spike