MyNixOS website logo
Description

Authentication Helpers for 'Snowflake'.

Authentication helpers for 'Snowflake'. It provides compatibility with authentication approaches supported by the 'Snowflake Connector for Python' <https://pypi.org/project/snowflake-connector-python> and the 'Snowflake CLI' <https://pypi.org/project/snowflake-cli>.

snowflakeauth

lifecycle R-CMD-check

snowflakeauth is a toolkit for authenticating with Snowflake. It aims for compatibility with the connections.toml and config.toml files used by the Snowflake Connector for Python and the Snowflake CLI, so that R users can use a consistent approach to Snowflake credentials across both languages.

snowflakeauth is intended for use by R package authors targeting the Snowflake platform.

Installation

You can install snowflakeauth from CRAN with:

install.packages("snowflakeauth")

Or, install the development version of snowflakeauth from GitHub with:

# install.packages("pak")
pak::pak("posit-dev/snowflakeauth")

Example

snowflakeauth can pick up on the default Snowflake connection parameters from the connections.toml and config.toml files used by the Python Connector for Snowflake and the Snowflake CLI (or any other named connection, for that matter):

library(snowflakeauth)

snowflake_connection()

snowflake_connection(name = "testing")

or you can define the parameters of a connection manually:

snowflake_connection(
  account = "myaccount",
  user = "me",
  private_key_file = "rsa_key.p8",
  private_key_file_pwd = "supersecret"
)

These parameters can then be used to retrieve credentials, which take the form of a one or more of HTTP headers:

conn <- snowflake_connection(
  account = "myaccount",
  user = "[email protected]",
  authenticator = "externalbrowser"
)

snowflake_credentials(conn)

Supported Authentication Methods

The following table details authentication methods supported by snowflake_credentials():

MethodSupportedNotes
Browser-based SSOInteractive, desktop-only
Key-pair
OAuth token
Workload identity federationOIDC only
Programmatic access token (PAT)
OAuth 2.0 client credentialsRarely used, not planned
OAuth 2.0 authorization codeRarely used, not planned
Username and passwordInsecure, not planned
Username and password with MFANot planned
Native SSO (Okta-only)Superceded by other methods, not planned

Limitations

  • Browser-based authentication is known to fail in Positron, but should work in RStudio.

License

MIT (c) Posit Software, PBC.

Metadata

Version

0.2.2

License

Unknown

Platforms (78)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows