[OpenAFS] Migrating away from single DES
r. l.
rainer.laatsch@t-online.de
Wed, 16 Sep 2020 16:39:02 +0200
I am using openafs-1.8.6 on SL-6.10/Centos-6.10
I just rekeyed successfully.
The docs in OpenAFS lead to some rxkad.keytab for some Openafs-1.6.x
(around year 2013)
After creating such a file, one needs to apply 'akeyconvert' ; which
transfers the heart of it
to the file KeyFileExt which is used for newer openafs versions , e.g.
1.8x, for non-DES-Keys.
=== In short: ===
# cd /usr/afs/etc
## dont -keepold:
kadmin.local: cpw -e aes256-cts-hmac-sha1-96 -pw XXXXXXXXX afs/cellname
kadmin.local: ktadd -k rxkad.keytab -norandkey afs/cellname
# ls -la
total 36
drwxr-xr-x 2 root root 4096 Sep 16 16:47 .
drwxr-xr-x 6 root root 4096 Sep 11 16:12 ..
-rw-r--r-- 1 root root 60 Sep 11 16:31 CellServDB
-rw------- 1 root root 16 Sep 11 16:31 KeyFile
-rw------- 1 root root 4 Sep 11 16:31 KeyFileExt
-rw-r--r-- 1 root root 11 Sep 11 16:30 ThisCell
-rw-r--r-- 1 root root 6 Sep 11 16:31 UserList
-rw-r--r-- 1 root root 23 Sep 11 17:35 krb.conf
-rw------- 1 root root 88 Sep 16 16:47 rxkad.keytab
cp -p KeyFile KeyFile.save
hexdump -C KeyFileExt
00000000 00 00 00 00 |....|
00000004
# /usr/afs/bin/akeyconvert
Wrote 1 keys
# ls -la
total 40
drwxr-xr-x 2 root root 4096 Sep 16 17:00 .
drwxr-xr-x 6 root root 4096 Sep 11 16:12 ..
-rw-r--r-- 1 root root 60 Sep 16 17:02 CellServDB
-rw------- 1 root root 16 Sep 16 17:02 KeyFile
-rw------- 1 root root 16 Sep 11 16:31 KeyFile.save
-rw------- 1 root root 56 Sep 16 17:02 KeyFileExt
##############################
-rw-r--r-- 1 root root 11 Sep 11 16:30 ThisCell
-rw-r--r-- 1 root root 6 Sep 11 16:31 UserList
-rw-r--r-- 1 root root 23 Sep 11 17:35 krb.conf
-rw------- 1 root root 88 Sep 16 16:47 rxkad.keytab
# umount /afs ; /usr/vice/etc/afsd -shutdown ; rmmod libafs
# killproc -y /bosserver
# --
# /usr/afs/bin/bosserver
# /root/startafsd
# kinit admin
# aklog -d -setpag
# touch /afs/.$cell/XXX ## if this works , all is done
# klist -fe
# you should not see anything with 'des' , only AES***
Now you should be done.
Jeffrey is right advising to rekey, see below.
My earlier mail about gssklog: it could circumvent an outage because of
newer KRB5 distros,
but also uses DES and does not help the security concerns with it.
My above notices might be helpful insofar the 'akeyconvert' as a needed
afterburner is set in place.
Best regards
Rainer
On 2020-09-15 19:33, Jeffrey E Altman wrote:
> Hi Rainer,
>
> The DES only limitatJeffreyion of the afs/cell@REALM service principal was
> removed in the 2013 release of OpenAFS 1.4.15 and 1.6.5. Since those
> releases neither the server ticket key nor the session key are
> restricted to the des-cbc-crc encryption type. All cells should be
> upgraded to current versions of OpenAFS on the servers and should rekey
> the afs/cell@REALM service principal with the aes256-cts-hmac-sha1-96
> encryption type.
>
> This includes cells that have deployed gssklogd. If the KeyFile
> contains a des-cbc-crc key, the cell is vulnerable to the Brute Force
> Attacks described by
>
> http://www.openafs.org/pages/security/OPENAFS-SA-2013-003.txt
>
> Changing the service principal encryption type protects against this
> brute force attack. However, it is important to note that even when an
> aes256-cts-hmac-sha1-96 session key is negotiated, the OpenAFS client
> and server will derive from that key a 56-bit key to use for the fcrypt
> encryption type used by rxkad for wire security.
>
> Jeffrey Altman
>
> On 9/15/2020 12:32 PM, r. l. (rainer.laatsch@t-online.de) wrote:
>> The simplest solution: use gssklog of D.E.Engert. The token then
>> comes from an AFS vlservers KeyFile
>>
>> and not from an entry afs/**@*** in some krb5kdc. Just run some gssklogd
>> and switch from aklog to
>>
>> gssklog in your profiles. Some times ago, even CERN.ch used it.
>>
>> The original tarfile can still be found at
>>
>> http://www.hep.man.ac.uk/u/masj/gssklog/
>>
>> or try my updated version at
>>
>> http://95.217.219.185/ContribAFS/Gssklog-0.11.tar
>>
>> The binaries were done on ScientificLinux-6.10 with a newer KRB5 in
>> /opt/krb5/
>>
>> and a static compilation of openafs (had to fix hcrypto and roken libs
>> there)
>>
>>
>> Best regards
>>
>> R. Laatsch
>>
>>
>>
>>
>>
>>
>>
>>
>> =================================================================
>>
>> On 2020-09-14 10:32, ProbaNet SRLS wrote:
>>> Hello!
>>>
>>> Recent releases of krb5 (> 1.18) no longer support single des
>>> encryption (the "allow_weak_crypto = yes" option in krb5.conf client
>>> side has no longer effect), so now we get this error with "aklog -d":
>>>
>>> ---
>>>
>>> Kerberos error code returned by get_cred : -1765328370
>>> aklog: Couldn't get XXXXX AFS tickets:
>>> aklog: KDC has no support for encryption type while getting AFS tickets
>>>
>>> ---
>>>
>>> How should we proceed?
>>>
>>>
>>> Stefano
>>>
>>> _______________________________________________
>>> OpenAFS-info mailing list
>>> OpenAFS-info@openafs.org
>>> https://lists.openafs.org/mailman/listinfo/openafs-info
>> _______________________________________________
>> OpenAFS-info mailing list
>> OpenAFS-info@openafs.org
>> https://lists.openafs.org/mailman/listinfo/openafs-info