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.
You can install snowflakeauth
from CRAN with:
install.packages("snowflakeauth")
Or, install the development version of snowflakeauth
from GitHub with:
# install.packages("pak")
::pak("posit-dev/snowflakeauth") pak
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"
)
snowflake_connection(
account = "myaccount",
user = "me",
authenticator = "externalbrowser"
)
These parameters can then be used to retrieve credentials, which take the form of a one or more of HTTP headers:
<- snowflake_connection(
conn account = "myaccount",
user = "me",
authenticator = "oauth",
token = "token"
)
snowflake_credentials(conn)
No support for SSO authentication using a browser.
No support for key-pair authentication with password-protected private keys.
No support for connection caching.
No support for direct username/password authentication, username/password authentication with MFA, or “Native SSO” authentication, (which is Okta-only). These are not planned; please migrate to OAuth or key-pair authentication when a browser is not available.
MIT (c) Posit Software, PBC