Skip to main content
On this page

Kater CLI Share and administer admin connection

kater admin connection sign-in

Replaces the sign-in that Kater stores for a Snowflake connection, or adds one to a connection that has none.

Kater tests the new sign-in with the account, the warehouse and the role in connection.yaml, and stores it only when the test passes. A failed test changes nothing. Run it when a password or a key changes, or to move a connection to a key pair.

Examples

Terminal window
# Sign in with a new key pair. The key has no passphrase
kater admin connection sign-in snowflake_prod_connection --user kater_service --private-key-file ~/.ssh/kater_key.p8
# Sign in with a key pair. Kater asks for the key's passphrase
kater admin connection sign-in snowflake_prod_connection --user kater_service --private-key-file ~/.ssh/kater_key.p8 --passphrase
# Sign in with a password. Kater asks for it in a browser page
kater admin connection sign-in snowflake_prod_connection --user kater_service --password
# Sign in with a password, typed at a hidden prompt in this terminal
kater admin connection sign-in snowflake_prod_connection --user kater_service --password --prompt

Arguments

ArgumentDescription
<connection-name>The Snowflake connection whose sign-in to replace, such as snowflake_prod_connection.

Options

OptionDescription
--user <user>Required. The Snowflake user that Kater signs in as.
--private-key-file <file>A PEM private key file, for key-pair sign-in. Add --passphrase when the key has one.
--passphraseSays that the key has a passphrase. You type it in a browser page, and Kater stores it.
--passwordSigns in with a password. You type it in a browser page, and Kater stores it.
--promptAsks for the password or the passphrase at a hidden prompt in this terminal, not in a browser page. Use it on a machine with no browser, such as one you reach over SSH.

It also takes the global options --json and --help.

What it prints

  • Each step of the test as it passes: Kater finds the account, signs in, uses the warehouse and reads the role.
  • When a step fails, the step and the warehouse’s error. The command exits with an error code, and the old sign-in stays.
  • When the test passes, the account and the role that Kater signed in with.
  • When the new sign-in uses another method, such as a key pair in place of a password, Kater also sets auth_method in connection.yaml and prints the commit. Run kater git pull to get it in your local copy.

The secret

Give --private-key-file or --password, not both. With --password or --passphrase, Kater opens a page on 127.0.0.1 in your browser, where you type the secret. A wrong secret shows its error on the page, and you try again. Any other error closes the page, and the command stops with it. The secret is never a flag’s value or an environment variable, so an agent that runs the command does not see it.

Where it runs

  • It runs through Kater’s API, which stores the sign-in on its server, encrypted. It needs the settings:manage permission.

See also