add kerberos support for lookaside-cache uploading

This commit is contained in:
clime 2017-02-02 15:16:42 +01:00
parent 4fefd7f1d5
commit 8f03e69d81

View file

@ -100,6 +100,9 @@ def main():
os.umask(002)
username = os.environ.get('SSL_CLIENT_S_DN_CN', None)
gssname = os.environ.get('GSS_NAME', None)
if gssname and '@' in gssname and not username:
username = gssname.partition('@')[0]
if not check_auth(username):
send_error('You must connect with a valid certificate and be in the '
'%s group to upload.' % PACKAGER_GROUP,