make timeout of authentication configurable
This commit is contained in:
parent
31b9e14dfe
commit
2696f35b55
2 changed files with 12 additions and 3 deletions
|
|
@ -39,3 +39,9 @@
|
||||||
|
|
||||||
;enabled plugins for CLI, runroot and save_failed_tree are available
|
;enabled plugins for CLI, runroot and save_failed_tree are available
|
||||||
;plugins =
|
;plugins =
|
||||||
|
|
||||||
|
;timeout of XMLRPC requests by seconds, default: 60 * 60 * 12 = 43200
|
||||||
|
;timeout = 43200
|
||||||
|
|
||||||
|
;timeout of GSSAPI/SSL authentication by seconds, default: 60
|
||||||
|
;auth_timeout = 60
|
||||||
|
|
|
||||||
|
|
@ -1648,6 +1648,7 @@ def read_config(profile_name, user_config=None):
|
||||||
'offline_retry_interval' : None,
|
'offline_retry_interval' : None,
|
||||||
'keepalive' : True,
|
'keepalive' : True,
|
||||||
'timeout' : None,
|
'timeout' : None,
|
||||||
|
'auth_timeout' : None,
|
||||||
'use_fast_upload': False,
|
'use_fast_upload': False,
|
||||||
'upload_blocksize': 1048576,
|
'upload_blocksize': 1048576,
|
||||||
'poll_interval': 6,
|
'poll_interval': 6,
|
||||||
|
|
@ -1719,7 +1720,8 @@ def read_config(profile_name, user_config=None):
|
||||||
'debug', 'debug_xmlrpc', 'krb_canon_host'):
|
'debug', 'debug_xmlrpc', 'krb_canon_host'):
|
||||||
result[name] = config.getboolean(profile_name, name)
|
result[name] = config.getboolean(profile_name, name)
|
||||||
elif name in ('max_retries', 'retry_interval',
|
elif name in ('max_retries', 'retry_interval',
|
||||||
'offline_retry_interval', 'poll_interval', 'timeout',
|
'offline_retry_interval', 'poll_interval',
|
||||||
|
'timeout', 'auth_timeout',
|
||||||
'upload_blocksize', 'pyver'):
|
'upload_blocksize', 'pyver'):
|
||||||
try:
|
try:
|
||||||
result[name] = int(value)
|
result[name] = int(value)
|
||||||
|
|
@ -2037,6 +2039,7 @@ def grab_session_options(options):
|
||||||
'anon_retry',
|
'anon_retry',
|
||||||
'keepalive',
|
'keepalive',
|
||||||
'timeout',
|
'timeout',
|
||||||
|
'auth_timeout',
|
||||||
'use_fast_upload',
|
'use_fast_upload',
|
||||||
'upload_blocksize',
|
'upload_blocksize',
|
||||||
'krb_rdns',
|
'krb_rdns',
|
||||||
|
|
@ -2239,7 +2242,7 @@ class ClientSession(object):
|
||||||
old_opts = self.opts
|
old_opts = self.opts
|
||||||
self.opts = old_opts.copy()
|
self.opts = old_opts.copy()
|
||||||
try:
|
try:
|
||||||
self.opts['timeout'] = 60
|
self.opts['timeout'] = self.opts.get('auth_timeout') or 60
|
||||||
kwargs = {}
|
kwargs = {}
|
||||||
if keytab:
|
if keytab:
|
||||||
old_env['KRB5_CLIENT_KTNAME'] = os.environ.get('KRB5_CLIENT_KTNAME')
|
old_env['KRB5_CLIENT_KTNAME'] = os.environ.get('KRB5_CLIENT_KTNAME')
|
||||||
|
|
@ -2304,7 +2307,7 @@ class ClientSession(object):
|
||||||
# 60 second timeout during login
|
# 60 second timeout during login
|
||||||
old_opts = self.opts
|
old_opts = self.opts
|
||||||
self.opts = old_opts.copy()
|
self.opts = old_opts.copy()
|
||||||
self.opts['timeout'] = 60
|
self.opts['timeout'] = self.opts.get('auth_timeout') or 60
|
||||||
self.opts['cert'] = cert
|
self.opts['cert'] = cert
|
||||||
self.opts['serverca'] = serverca
|
self.opts['serverca'] = serverca
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue