Bug #4300
Kamaki POSTs tokens when there is no need to
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
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.
Update Changelog for lazy authentication
Refs: #4300
Remove token from http body (can be switched on)
Refs: #4300
History
#1 Updated by Stavros Sachtouris over 9 years ago
- Due date set to 09/20/2013
- Estimated time set to 3.00
#2 Updated by Stavros Sachtouris over 9 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
#3 Updated by Stavros Sachtouris over 9 years ago
- Status changed from Resolved to Closed