allow the username component of the client's DN to be configurable

This commit is contained in:
Mike Bonnet 2007-03-20 10:56:52 -04:00
parent 27100cd914
commit 1ab7d2c898
2 changed files with 5 additions and 3 deletions

View file

@ -354,9 +354,10 @@ class Session(object):
if env.get('SSL_CLIENT_VERIFY') != 'SUCCESS':
raise koji.AuthError, 'could not verify client: %s' % env.get('SSL_CLIENT_VERIFY')
client_name = env.get('SSL_CLIENT_S_DN_CN')
name_dn_component = context.opts.get('DNUsernameComponent', 'CN')
client_name = env.get('SSL_CLIENT_S_DN_%s' % name_dn_component)
if not client_name:
raise koji.AuthError, 'unable to get user information from client certificate'
raise koji.AuthError, 'unable to get user information (%s) from client certificate' % name_dn_component
if proxyuser:
client_dn = env.get('SSL_CLIENT_S_DN')