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

Merge web-login into login #525

Merged
merged 3 commits into from
May 14, 2024
Merged

Merge web-login into login #525

merged 3 commits into from
May 14, 2024

Conversation

jastang
Copy link
Contributor

@jastang jastang commented May 13, 2024

Description of your changes

Unify up web-login and up login. The default behaviour will be the old web-login unless flags are explicitly supplied.

CI systems for pushing Crossplane packages to registries will rely on docker login instead.

I have:

  • Read and followed Upbound's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR, as appropriate.

How has this code been tested

➜  darwin_arm64 ./up login -h
Usage: up login

Login to Upbound. Will attempt to launch a web browser by default. Use auth flags for automations.

Flags:
  -h, --help                         Show context-sensitive help.
      --format="default"             Format for get/list commands. Can be: json, yaml, default
  -q, --quiet                        Suppress all output.
      --pretty                       Pretty print output.

  -u, --username=STRING              Username used to execute command ($UP_USER).
  -p, --password=STRING              Password for specified user. '-' to read from stdin ($UP_PASSWORD).
      --domain=https://upbound.io    Root Upbound domain ($UP_DOMAIN).
      --profile=STRING               Profile used to execute command ($UP_PROFILE).
  -a, --account=STRING               Account used to execute command ($UP_ACCOUNT).
      --insecure-skip-tls-verify     [INSECURE] Skip verifying TLS certificates ($UP_INSECURE_SKIP_TLS_VERIFY).
  -d, --debug=INT                    [INSECURE] Run with debug logging. Repeat to increase verbosity. Output might contain confidential data like tokens
                                     ($UP_DEBUG).

with explicit flags:

➜  darwin_arm64 ./up login -u jasont
Password: 
jasont logged in
./up login -u jasont -p ********
jasont logged in

Verified up login will attempt to launch a browser and produce a TOTP QR code otherwise.

The default behaviour will be the old `web-login` unless flags are explicitly supplied.

Signed-off-by: Jason Tang <jason@upbound.io>
Signed-off-by: Jason Tang <jason@upbound.io>
cmd/up/main.go Outdated Show resolved Hide resolved
@jastang jastang marked this pull request as ready for review May 13, 2024 18:30
Signed-off-by: Jason Tang <jason@upbound.io>
@jastang jastang merged commit fa32c2c into upbound:main May 14, 2024
7 checks passed
@jastang jastang deleted the merge-login-cmds branch May 14, 2024 19:00
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.

None yet

2 participants