Skip to content

2025.1.0.0-b143

@Arpit-yb Arpit-yb tagged this 13 Jun 12:52
Summary:
```
Login to YBA using OIDC authentication

Usage:
  yba oidc login [flags]

Examples:
yba oidc login

Flags:
  -f, --force   [Optional] Bypass the prompt for non-interactive usage. Provide the host (--host/-H)
  -h, --help    help for login

Global Flags:
  -a, --apiToken string    YugabyteDB Anywhere api token.
      --ca-cert string     CA certificate file path for secure connection to YugabyteDB Anywhere. Required when the endpoint is https and --insecure is not set.
      --config string      Full path to a specific configuration file for YBA CLI. If provided, this takes precedence over the directory specified via --directory, and the generated files are added to the same path. If not provided, the CLI will look for '.yba-cli.yaml' in the directory specified by --directory. Defaults to '$HOME/.yba-cli/.yba-cli.yaml'.
      --debug              Use debug mode, same as --logLevel debug.
      --directory string   Directory containing YBA CLI configuration and generated files. If specified, the CLI will look for a configuration file named '.yba-cli.yaml' in this directory. Defaults to '$HOME/.yba-cli/'.
      --disable-color      Disable colors in output. (default false)
  -H, --host string        YugabyteDB Anywhere Host (default "http://localhost:9000")
      --insecure           Allow insecure connections to YugabyteDB Anywhere. Value ignored for http endpoints. Defaults to false for https.
  -l, --logLevel string    Select the desired log level format. Allowed values: debug, info, warn, error, fatal. (default "info")
  -o, --output string      Select the desired output format. Allowed values: table, json, pretty. (default "table")
      --timeout duration   Wait command timeout, example: 5m, 1h. (default 168h0m0s)
      --wait               Wait until the task is completed, otherwise it will exit immediately. (default true)
```
Orignal commit - 4f31110d12d0 / https://phorge.dev.yugabyte.com/D44448

Test Plan:
```
./yba sso login
Enter Host [http://10.157.0.38:9000]:
Opening browser to authenticate...
Failed to open browser.
Please open the following URL in your browser to authenticate:

  http://10.157.0.38:9000/api/third_party_login?show_api_token=true

Please authenticate in the browser and copy the API token displayed.
Enter your API token:
Invalid or missing value provided for 'insecure'. Setting it to 'true'.
Configuration file '/home/anabaria/.yba-cli/.yba-cli.yaml' successfully updated.
Customer UUID                          API Token
f33e3c9b-75ab-4c30-80ad-cba85646ea39   4.fb7***********df-b234-1bbba3e85924
```

Reviewers: dkumar, asharma, sneelakantan

Reviewed By: dkumar

Differential Revision: https://phorge.dev.yugabyte.com/D44722
Assets 2
Loading