Skip to content

Conversation

@Mierdin
Copy link
Member

@Mierdin Mierdin commented Feb 4, 2017

This PR adds an explanation of the new st2 login and st2 whoami commands that were introduced in StackStorm/st2#3123

Signed-off-by: Matt Oswalt <oswaltm@brocade.com>
Copy link

@dzimine dzimine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GTG once changes land.

configured user.

The ``st2 login`` command is a good option if you want an easy way to authenticate
via the CLI without storing your password in plain text. Switching between users is also
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider a ref to the CLI 101 section that talks about plain text option.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and m.b. warn that it'll override the ./st2/config credentials?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I took a stab at adding these in a6f4612 - hopefully that's on target

Matt Oswalt added 4 commits February 3, 2017 17:35
Signed-off-by: Matt Oswalt <oswaltm@brocade.com>
Signed-off-by: Matt Oswalt <oswaltm@brocade.com>
Signed-off-by: Matt Oswalt <oswaltm@brocade.com>
@LindsayHill
Copy link
Contributor

LGTM, now that the crisis of the missing period has been resolved.

retrieve an auth token.
If you don't wish to store your password in plain-text as shown in the previous section,
the ``st2 login`` command offers an alternative. Similar to ``st2 auth``, you must provide your
username and password:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's maybe also worth adding a note that since this command doesn't store password by default in the config and it relies on a cached auth token it will only work until the token expires (which is 24 hours by default, IIRC).

After that, the user will need to re-login. And / or perhaps also document the --write-password option.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides that, LGTM.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea - added in 8e3dc46

If you specify username and password as authentication credentials in the
configuration file, the CLI will try to use those credentials to authenticate and
retrieve an auth token.
If you don't wish to store your password in plain-text as shown in the previous section,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I think we should probably still keep part of this paragraph somewhere here explaining how authentication works in the CLI if username and password are specific in the config.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved this further down to line 116. Clarified in 8e3dc46

Signed-off-by: Matt Oswalt <oswaltm@brocade.com>
@Mierdin Mierdin merged commit 43033ce into master Feb 7, 2017
@Mierdin Mierdin deleted the login-auth-command branch February 7, 2017 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants