Bug #4300

Kamaki POSTs tokens when there is no need to

Added by Dionysis Grigoropoulos about 7 years ago. Updated almost 7 years ago.

Status:Closed Start date:09/12/2013
Priority:Medium Due date:09/20/2013
Assignee:Stavros Sachtouris % Done:

100%

Category:kamaki Spent time: 6.00 hours
Target version:v0.11 Estimated time:3.00 hours

Description

When running 'kamaki file', 'kamaki server' etc, kamaki first POSTs tokens, waits for a reply from the server and then prints the help file.
In case of a .kamakirc misconfiguration or network connectivity issues, kamaki won't even print the help file, since an error occurred earlier.

Way to reproduce/test:

kamaki file -v
> - -  -   -     -        -             -
> POST https://accounts.okeanos.grnet.gr/identity/v2.0/tokens
>   Content-Length: 74
>   Content-Type: application/json
> data size:74
> 
< 200 OK

Associated revisions

Revision db03f805
Added by Stavros Sachtouris about 7 years ago

Make authentication lazy

Refs: #4300

Authentication (a.k.a. POST /tokens) is performed only if needed, therefore a
syntax query will not request for authentication.

A new method is introduced in kamaki.cli: init_chached_authenticator. This
method authenticated the resolved URL and TOKEN.

Until now, this functionality was part of the _init_session method located at
kamaki.cli entry point. Now, this method call has been pushed down.

In case of an interactive shell, the method is called during the shell setup
In case of a one_command, the method is called right before a new executable
command is initialized. This also means that a non-executable command name
space will not cause the execution of init_cached_authenticator.

Revision 2af217f3
Added by Stavros Sachtouris about 7 years ago

Update Changelog for lazy authentication

Refs: #4300

Revision 7f85a914
Added by Stavros Sachtouris about 7 years ago

Remove token from http body (can be switched on)

Refs: #4300

History

#1 Updated by Stavros Sachtouris about 7 years ago

  • Due date set to 09/20/2013
  • Estimated time set to 3.00

#2 Updated by Stavros Sachtouris about 7 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

#3 Updated by Stavros Sachtouris almost 7 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF