Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI authentication via via CLI should allow user to print the URL to stdout #10630

Closed
galeep opened this issue May 20, 2021 · 3 comments
Closed

Comments

@galeep
Copy link
Contributor

galeep commented May 20, 2021

Proposal

nomad ui -authenticate should be able to print the URL/otp as a fallback (or with a --stdout flag)

Use-cases

As a practitioner, I want to be able to authenticate to the Nomad UI even when I'm executing nomad from a headless session (i.e., ssh/cloud shell/otherwise not running a display manager.)

In my particular case, I was executing the command from an ssh session, and was accessing the GUI through a tunnel. This is how I normally use Nomad.

Attempted Solutions

Currently, this is handled via xdg-open with no fallback mechanism.
If xdg-open is not present in the user's path, the user will see an error. The URL will not be printed.
if xdg-open is present, the user will see a message that indicates the URL will be opened, but nothing will happen.

The user requesting this already has access to the secret.

@tgross
Copy link
Member

tgross commented May 20, 2021

Currently, this is handled via xdg-open with no fallback mechanism.
If xdg-open is not present in the user's path, the user will see an error.

Just for clarity for whomever ends up implementing this, we use xdg-open only on Linux. We're using https://github.com/skratchdot/open-golang to use the OS-specific open, xdg-open, or start command. So we'll want to catch the error condition where the user has a headless environment to capture the token (or use an explicit flag as suggested here).

@lgfa29
Copy link
Contributor

lgfa29 commented Oct 13, 2021

Closed by #11213

@lgfa29 lgfa29 closed this as completed Oct 13, 2021
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants