{"action":"created","issue":{"url":"https://api.github.com/repos/StackStorm/st2/issues/3110","repository_url":"https://api.github.com/repos/StackStorm/st2","labels_url":"https://api.github.com/repos/StackStorm/st2/issues/3110/labels{/name}","comments_url":"https://api.github.com/repos/StackStorm/st2/issues/3110/comments","events_url":"https://api.github.com/repos/StackStorm/st2/issues/3110/events","html_url":"https://github.com/StackStorm/st2/issues/3110","id":195326196,"number":3110,"title":"Update CLI authentication to store login","user":{"login":"codyaray","id":44062,"avatar_url":"https://avatars.githubusercontent.com/u/44062?v=3","gravatar_id":"","url":"https://api.github.com/users/codyaray","html_url":"https://github.com/codyaray","followers_url":"https://api.github.com/users/codyaray/followers","following_url":"https://api.github.com/users/codyaray/following{/other_user}","gists_url":"https://api.github.com/users/codyaray/gists{/gist_id}","starred_url":"https://api.github.com/users/codyaray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codyaray/subscriptions","organizations_url":"https://api.github.com/users/codyaray/orgs","repos_url":"https://api.github.com/users/codyaray/repos","events_url":"https://api.github.com/users/codyaray/events{/privacy}","received_events_url":"https://api.github.com/users/codyaray/received_events","type":"User","site_admin":false},"labels":[{"id":94405704,"url":"https://api.github.com/repos/StackStorm/st2/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":226576374,"url":"https://api.github.com/repos/StackStorm/st2/labels/feature","name":"feature","color":"207de5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-13T18:06:34Z","updated_at":"2016-12-14T17:46:53Z","closed_at":null,"body":"We use LDAP for authentication. I've been sharing this one-liner with all of our internal users:\r\n\r\n```\r\nexport ST2_AUTH_TOKEN=$(st2 auth `whoami` -t)\r\n```\r\n\r\nAs a new user this is definitely non-intuitive. It'd be really nice to support a mechanism like\r\n\r\n```\r\nst2 login\r\n```\r\n\r\nWhile you could require your username, you could also just default to the current user name since thats how many (most?) corporate environments would be setup with ldap anyway.\r\n\r\nOr you can prompt with default like:\r\n\r\n```\r\n$ st2 login\r\nUsername [default <user>]: <prompt for input>\r\nPassword: <prompt for input>\r\n```\r\n\r\nOr skip straight to username and optional password\r\n\r\n```\r\n$ st2 login `whoami` -p $PASSWORD\r\n```\r\n\r\nLots of ways to skin the cat. But the business objective here is to make it easier for new/occasional end-users to authenticate."},"comment":{"url":"https://api.github.com/repos/StackStorm/st2/issues/comments/267103031","html_url":"https://github.com/StackStorm/st2/issues/3110#issuecomment-267103031","issue_url":"https://api.github.com/repos/StackStorm/st2/issues/3110","id":267103031,"user":{"login":"Mierdin","id":4230395,"avatar_url":"https://avatars.githubusercontent.com/u/4230395?v=3","gravatar_id":"","url":"https://api.github.com/users/Mierdin","html_url":"https://github.com/Mierdin","followers_url":"https://api.github.com/users/Mierdin/followers","following_url":"https://api.github.com/users/Mierdin/following{/other_user}","gists_url":"https://api.github.com/users/Mierdin/gists{/gist_id}","starred_url":"https://api.github.com/users/Mierdin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mierdin/subscriptions","organizations_url":"https://api.github.com/users/Mierdin/orgs","repos_url":"https://api.github.com/users/Mierdin/repos","events_url":"https://api.github.com/users/Mierdin/events{/privacy}","received_events_url":"https://api.github.com/users/Mierdin/received_events","type":"User","site_admin":false},"created_at":"2016-12-14T17:46:53Z","updated_at":"2016-12-14T17:46:53Z","body":"@codyaray The difficulty is that `st2client` won't be able to modify the environment of the parent shell due to the way environments work in Linux. This is why many tools that use this approach recommend you set the env yourself first.\r\n\r\nWe may be able to do something a little different to accomplish the same goal, however. Stay tuned here, I'll let you know if I come up with anything"}}
{"actor":{"display_login":"Mierdin"}}