Help › Tunnels, sign-in and passwords

Sign in with AWS, Entra ID, Google Cloud or OIDC

Connect to RDS, Aurora, Redshift, Amazon MSK, Azure databases, BigQuery and MongoDB Atlas with your cloud identity instead of a database password.

Querlyn 0.1.0 is not released yet. This help describes it ahead of release.

Some cloud databases let you sign in with your cloud identity. Querlyn then obtains a short-lived token or temporary credentials each time it opens a session, and no database password is stored anywhere.

Where it works

Under AuthenticationDatabases
AWS IAMAmazon RDS and Aurora for PostgreSQL, MySQL and MariaDB; Amazon Redshift clusters and Serverless workgroups; MongoDB and MongoDB Atlas (MONGODB-AWS); Amazon MSK clusters, provisioned and serverless (AWS_MSK_IAM)
Microsoft Entra IDAzure SQL Database, Azure SQL Managed Instance and Azure Synapse (through a SQL Server connection); Azure Database for PostgreSQL; Azure Database for MySQL
Google CloudGoogle BigQuery, which has no other sign-in; see Connect to Google BigQuery
OIDC (workforce)MongoDB Atlas with workforce identity federation (MONGODB-OIDC): your organization's identity provider

The Authentication row is shown only for engines that have such a sign-in.

A cloud sign-in needs an encrypted connection: TLS must be Verify full or Require (no verification), and Verify full for Microsoft Entra ID and Google Cloud (see Where tokens are sent). Choosing a cloud sign-in sets it to what it needs if it was weaker.

Sign in with AWS IAM

  1. In the connection dialog, choose AWS IAM under Authentication.
  2. Enter the User: the database user that is allowed to sign in with IAM. (For Redshift see Connect to Amazon Redshift.) MongoDB and Amazon MSK need none: your AWS identity is the user. A MongoDB cluster needs a database user for your IAM user or role; an MSK cluster needs an IAM policy that lets it kafka-cluster:Connect.
  3. AWS profile and AWS region may stay empty; see below.
  4. Choose Sign In (Command Palette › Database: Sign In with Cloud Identity) to check the sign-in now, without connecting. The line under the button says who signed in and for how long the result is valid.
  5. Choose Test Connection, then Save & Connect.

Querlyn uses the AWS credentials already on your computer, as the AWS command-line tools do. It looks for them in this order:

  1. The profile named under AWS profile, if you named one. Then only that profile is used.
  2. Otherwise the environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.
  3. Otherwise the profile named by AWS_PROFILE, and then default.

A profile may hold access keys, an IAM Identity Center (SSO) sign-in, a role to assume, or a credential_process.

For MongoDB, Querlyn signs MongoDB's own sign-in with these credentials (MONGODB-AWS): the secret key never leaves your computer, only a signature and, for temporary credentials, their session token are sent. For Amazon MSK, it signs each broker's sign-in the same way (AWS_MSK_IAM); when temporary credentials expire while a connection is open, the next broker it reaches signs in again with fresh ones.

The region is the one you enter, or else the one in the database's host name, or else your AWS configuration's. For Amazon MSK, it is the one you enter, or else the one in the brokers' host names (b-1.….kafka.us-east-1.amazonaws.com).

When the AWS sign-in has expired

Querlyn reads the sign-in the AWS CLI keeps for IAM Identity Center (under ~/.aws/sso/cache), refreshes it when it can, and writes the refreshed sign-in back there so that the AWS CLI and Querlyn keep sharing it. It never opens the AWS sign-in page itself. When the sign-in has expired, the error shows the command to run in a terminal, with a Copy button (Command Palette › Database: Copy Command That Fixes the Sign-In):

aws sso login --profile dev

What AWS IAM does not support yet

Profiles that need an MFA code typed in (mfa_serial), web identity tokens, and credentials from an EC2 instance's or a container's metadata service.

Sign in with Microsoft Entra ID

  1. In the connection dialog, choose Microsoft Entra ID under Authentication.

  2. Under Sign in with, choose how:

    ChoiceWhat happens
    BrowserQuerlyn opens your browser to sign in to Microsoft. Later sessions sign in without asking.
    Device codeQuerlyn shows a code to enter at Microsoft's device sign-in page on any device. Use it where a browser cannot open, such as a remote desktop. Later sessions sign in without asking.
    Azure CLIQuerlyn asks the Azure CLI (az) for a token each time a session opens. Sign in first with az login.
  3. Tenant may stay empty for any work or school account; enter your directory's ID or domain to pin it. Client ID may stay empty unless your organization requires its own application registration.

  4. For Browser and Device code, choose whether Querlyn keeps you signed in: Stay signed in (Keychain) or Sign in at every connect.

  5. Enter the User if the database needs it: for Azure Database for PostgreSQL and MySQL it is your Entra user or group name as the database knows it. For Azure SQL it is optional and only suggests which account to sign in with.

  6. Choose Sign In to check it now, then Test Connection and Save & Connect.

While you sign in, a window titled Sign in to Microsoft Entra ID for and the connection's name stays open. It has Open Browser Again (or, for a device code, Copy Code and Open Sign-In Page) and Cancel, and closes by itself when the sign-in is done.

Forget Sign-In (Command Palette › Database: Forget Cloud Sign-In) removes what Querlyn kept for a browser or device-code sign-in, so the next connect signs in again.

Sign in with OIDC (MongoDB Atlas)

With workforce identity federation, MongoDB Atlas sends you to your organization's identity provider (Okta, Microsoft Entra ID, …) to sign in.

  1. In the connection dialog for a MongoDB connection, choose OIDC (workforce) under Authentication.
  2. User may stay empty: the identity provider says who you are.
  3. Redirect URI may stay empty. It must be the one the provider's application registers for MongoDB's tools, http://localhost:27097/redirect unless your administrator chose another.
  4. Allowed hosts may stay empty. Because the server names the provider, Querlyn opens your browser only for servers MongoDB's own tools trust (Atlas's *.mongodb.net, and localhost), or the hosts you list here, such as db.example.com, *.example.com. The list is kept on this computer only: it is not synced and not shared with a team, so nobody else can add a host to it. On another computer, or for a connection a teammate shared, add the host there yourself.
  5. Choose whether Querlyn keeps you signed in: Stay signed in (Keychain) or Sign in at every connect.
  6. Choose Test Connection, then Save & Connect.

An OIDC sign-in needs TLS set to Verify full, also for a local server: the server names the provider your browser is sent to, so Querlyn signs in only with a server whose certificate it checked. The dialog sets it when you choose OIDC.

The first connect opens your browser at the provider. Querlyn checks the provider's address and the answer it sends back (PKCE and state), never shows the provider's page inside Querlyn, and later sessions sign in without asking until the provider says otherwise. There is no Sign In before connecting: the server names the provider only when Querlyn connects.

Sign in with Google Cloud

BigQuery connections sign in with Google Cloud only, so the dialog shows Sign in with in place of a password:

  • Service account key: Querlyn signs a request with the key's private key and exchanges it at Google for an hour-long token. Choose the key's JSON file under Key file, or leave it empty and paste the key under Service account key (JSON), which is then kept like a password.
  • Google Cloud CLI: Querlyn runs gcloud auth application-default print-access-token for a token, as the account you signed in with gcloud auth application-default login. If that sign-in has run out, the error says to run the login again.

A token is used for 45 minutes, and asked for again sooner when BigQuery refuses it. Keys from other kinds of credential file (a user's authorized_user file, workload identity federation) are refused with a message saying so.

Where tokens are sent

A Microsoft Entra ID or Google Cloud token is not tied to the one server it is sent to: whoever receives it can use it on every server it is valid for (all your Azure SQL servers, a whole Google Cloud project) until it runs out. So Querlyn sends such a token only:

  • over TLS that checks the server's certificate: Verify full. The dialog asks for it, and a connection set to anything weaker is refused with a message before you are asked to sign in;
  • to the provider's own servers: names ending in .database.windows.net (and Azure's government and China clouds, Azure Synapse and Microsoft Fabric), .postgres.database.azure.com, .mysql.database.azure.com, or .googleapis.com.

A connection to another name (a private endpoint with a name of your own, a proxy, a test server) is refused until you allow it: in the connection dialog, turn on Send sign-in tokens to this host, which is shown only then. The choice is kept on this computer only, for that host: it is not synced or shared with a team, and it ends when the connection's host changes. A Snowflake key pair's sign-in works the same way, with Snowflake's own names (see Connect to Snowflake).

AWS IAM tokens are signed for one server and port, and Redshift's temporary passwords are per cluster, so they go wherever the connection says.

What is kept, and where

Sign-inWhat Querlyn keeps
AWS IAMNothing. The profile name and region are saved with the connection; credentials stay with AWS's own files. Tokens are kept in memory and asked for again when they run out.
Microsoft Entra ID, Browser or Device codeWith Stay signed in (Keychain), a refresh token in the keychain. With Sign in at every connect, a refresh token in memory while the connection is open.
Microsoft Entra ID, Azure CLINothing. The Azure CLI keeps its own sign-in.
Google Cloud, Service account keyThe key file's path; or, when the key was pasted, the key in the keychain (or where you chose to keep it).
Google Cloud, Google Cloud CLINothing. The Google Cloud CLI keeps its own sign-in.
OIDC (workforce)With Stay signed in (Keychain), a refresh token in the keychain. With Sign in at every connect, a refresh token in memory while the connection is open.

The tokens that are sent to the database are only ever in memory.

When the database refuses the sign-in

A token can be valid and the database can still refuse it, because the database user is not set up for it. The error then says what to check on the database, for example that the user has the rds_iam role on RDS PostgreSQL, or that the Entra user exists in the database. See also Read a connection error.

What is not supported

  • Windows integrated sign-in (Kerberos or NTLM) for SQL Server.
  • Entra service principals, managed identities and certificates.
  • Google Cloud sign-in for databases other than BigQuery (Cloud SQL, AlloyDB), a Google account's sign-in in the browser, and workload identity federation.
  • MongoDB's workload identity (OIDC for machines), LDAP and Kerberos.
  • The cloud sign-ins of ClickHouse Cloud, Oracle Cloud and Snowflake. (Snowflake has its own sign-in methods; see Connect to Snowflake.)

Help for Querlyn 0.1.0. All help topics