Skip to content

err:260002: password is empty when trying to use RSA keys for Snowflake connections. #151

@brunobrn

Description

@brunobrn

Hello there!

We recently changed your default authentication method here to RSA keys, so I'm trying to convert some jobs to authenticate with RSA keys.

I tried a bunch of strings, but always return the same error, the Go Driver has support to RSA keys, but I don't find any documentation about this in the sql_exporter GitHub.

We have any especial way to connected using RSA keys or we don't have support?

connections:
- "snowflake://username@snowflake_account?private_key_file=/path/to/key/rsa_key.p8"
- "snowflake://username@snowflake_account?authenticator=SNOWFLAKE_JWT&private_key_file=/path/to/key/rsa_key.p8&role=my_role&warehouse=my_warehouse&database=my_database&schema=my_schema"
- 'snowflake://username@snowflake_account?authenticator=SNOWFLAKE_JWT'
- 'snowflake://username@snowflake_accountauthenticator=SNOWFLAKE_JWT&private_key_path=/path/to/key/rsa_key.p8'

2025/02/19 17:39:23 maxprocs: Leaving GOMAXPROCS=16: CPU quota undefined
{"build_context":"(go=go1.21.13, platform=linux/amd64, user=, date=, tags=unknown)","caller":"main.go:58","msg":"Starting sql_exporter","ts":"2025-02-19T17:39:23.582224194Z","version_info":"(version=, branch=, revision=12bc92e399ff2b68c847d999481ef3b955b85314)"}
{"caller":"job.go:397","connection":"snowflake://username@snowflake_account?authenticator=SNOWFLAKE_JWT&private_key_file=/path/to/key/rsa_key.p8&role=my_role&warehouse=my_warehouse&database=my_database&schema=my_schema","err":"260002: password is empty","job":"sql_snowflake_warehouse_utilization","level":"error","msg":"Failed to create Snowflake DSN","ts":"2025-02-19T17:39:23.582716773Z"}
{"caller":"exporter.go:103","interval":"8h0m0s","level":"info","msg":"Started periodically execution of job","name":"sql_snowflake_warehouse_utilization","ts":"2025-02-19T17:39:23.582737525Z"}
{"caller":"main.go:81","level":"info","listenAddress":":9237","msg":"Listening","ts":"2025-02-19T17:39:23.582781206Z"}
{"caller":"job.go:414","job":"sql_snowflake_warehouse_utilization","level":"debug","msg":"Starting","ts":"2025-02-19T17:39:23.582787736Z"}

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions