show using --authtype=noauth to skip authentication phase.
fix issue#155
rebased
1 new commit added
update this PR
ClientAuthHandler
--authtype
SSLAuthHandler.login()
@xning, @mikem, please have a look
update this PR create a class ClientAuthHandler to build the login logic if no --authtype specified, SSLAuthHandler.login() will always try first UnitTests haven't been added @xning, @mikem, please have a look The OrderedDict is not available on the RHEL5, perhaps you can try the list of tuples.
create a class ClientAuthHandler to build the login logic if no --authtype specified, SSLAuthHandler.login() will always try first UnitTests haven't been added
@xning, @mikem, please have a look The OrderedDict is not available on the RHEL5, perhaps you can try the list of tuples.
It's an interesting approach. More verbose than I expected.
I don't think the output from an auth failure is going to help most folks, though. Here is are some example errors:
Unable to log in, no authentication methods available, or all authentication met hods failed. [Auth-Trace] : - [0] ssl: {'proxyuser': None, 'serverca': '/home/mi ke/.fedora-server-ca.cert', 'cert': '/home/mike/.fedora.cert', 'ca': '~/.fedora- server-ca.cert', 'error': "Error: [('SSL routines', 'SSL3_READ_BYTES', 'sslv3 al ert certificate expired'), ('SSL routines', 'SSL3_READ_BYTES', 'ssl handshake fa ilure')]"} - [1] kerberos: {'proxyuser': None, 'error': 'AuthError: Kerberos authentica tion failed: Ticket expired (-1765328352)', 'keytab': None, 'principal': None} using --authtype=noauth to skip login phase
and
Unable to log in, no authentication methods available, or all authentication met hods failed. [Auth-Trace] : - [0] kerberos: {'proxyuser': None, 'error': 'AuthEr ror: Kerberos authentication failed: Ticket expired (-1765328352)', 'keytab': No ne, 'principal': None} using --authtype=noauth to skip login phase
When auth goes wrong, what the user needs to know is:
I.e. similar information to what the hello output generates when successful.
@mikem I'll add the help info in the trace. Would I remove the error msg from it?
please avoid merges within pull requests
5 new commits added
updated
It is already on line 2
@tkopecek updated
Updated for ISSUE #155
I moved cli.activate_session() to koji.ClientSession.activate()
cli.activate_session()
koji.ClientSession.activate()
error msg is always passed to invokers wrapped by Exception. Invoker could decide if print it or not.
@mikem Is it over-pattern to seperate the logic by increase the code from 20 lines to about 200 lines?
I'd rather not change the signature of the (still local) activate_session function.
Needs a rebase, which is painful as-is, but becomes painless if you follow the above and amend the last commit. I have done so here
https://github.com/mikem23/koji-playground/tree/login-failed-msg-2
a bit. It's not necessarily a problem, but it does seem like a lot of change to accomplish the stated goal.
I'd rather not change the signature of the (still local) activate_session function. Needs a rebase, which is painful as-is, but becomes painless if you follow the above and amend the last commit. I have done so here https://github.com/mikem23/koji-playground/tree/login-failed-msg-2
rebased. I found a bug in my last commit, I tried to change global options to signature args of activate_session following your comment in issue#155
global options
activate_session
This also means refactoring this a bit. No more global options. Probably shouldn't print. This probably also ties into PR #72
But a lots of handler functions would change the value of options. Rollbacking to no change for global options could avoid this. Would we change the signature of global options to make it clearer differing from handler options?
options
rebased onto 8bc920c912a138fc5688972a3c66994041212f56
cancel this PR, since it looks not good enough nowadays
Pull-Request has been closed by julian8628
show using --authtype=noauth to skip authentication phase.
fix issue#155