You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "GShotwell (via GitHub)" <gi...@apache.org> on 2023/06/23 13:29:05 UTC
[GitHub] [arrow-adbc] GShotwell opened a new issue, #841: Expose multiple authentication options
GShotwell opened a new issue, #841:
URL: https://github.com/apache/arrow-adbc/issues/841
Snowflake supports a number of authentication methods including:
- User/password
- Key pair authentication
- External browser SSO
- Native SSO
The Snowflake documentation on this is here: https://docs.snowflake.com/en/user-guide/admin-security-fed-auth-use
For the most part these are all fairly well supported in the Snowflake Python Connector, but can be a pain to enable for R. It would be great to have support for this in ADBC, and to feature multiple options in the documentation as SSO is an increasingly common authentication pattern for Snowflake data.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] liamnz commented on issue #841: go/adbc/driver/snowflake: expose multiple authentication options
Posted by "liamnz (via GitHub)" <gi...@apache.org>.
liamnz commented on issue #841:
URL: https://github.com/apache/arrow-adbc/issues/841#issuecomment-1701839562
It also seems that the client option `adbc.snowflake.sql.role` may be interpreted as both the username and role, because I get this error when trying to add that to the adbc_database_init() function:
```
time="2023-09-01T09:56:36+12:00" level=error msg="Authentication FAILED" func="gosnowflake.(*defaultLogger).Errorln" file="log.go:242"
Error in force(code) :
[Snowflake] 390100 (08004): Incorrect username or password was specified.
```
This might be fine in some deployments, but in ours a user can have multiple roles by different names so it fails to connect.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] paleolimbot commented on issue #841: go/adbc/driver/snowflake: expose multiple authentication options
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on issue #841:
URL: https://github.com/apache/arrow-adbc/issues/841#issuecomment-1604370934
> I have no idea whether or not Go would be able to launch the browser when buried beneath R
I still think I might just be passing unexpected values into the auth. If anybody can successfully get a browser to pop up from anywhere else (ADBC, Python/Snowflake, Go/Snowflake, or otherwise) I'm game to try those parameters from R.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] liamnz commented on issue #841: go/adbc/driver/snowflake: expose multiple authentication options
Posted by "liamnz (via GitHub)" <gi...@apache.org>.
liamnz commented on issue #841:
URL: https://github.com/apache/arrow-adbc/issues/841#issuecomment-1701829972
I was having similar issues connecting to an enterprise Snowflake instance using the external browser authentication method.
However, initialising the connection in this way worked for me:
```r
db <- adbc_database_init(
adbcsnowflake::adbcsnowflake(),
adbc.snowflake.sql.account = 'acc',
adbc.snowflake.sql.region = 'australia-east.azure',
adbc.snowflake.sql.uri.protocol = 'https',
adbc.snowflake.sql.uri.host = 'acc.australia-east.azure.snowflakecomputing.com',
adbc.snowflake.sql.uri.port = '443',
adbc.snowflake.sql.auth_type = 'auth_ext_browser'
)
con <- adbc_connection_init(db)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] lidavidm commented on issue #841: go/adbc/driver/snowflake: expose multiple authentication options
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #841:
URL: https://github.com/apache/arrow-adbc/issues/841#issuecomment-1702648936
Thanks all for figuring this out. Let's get this into the docs for the next release. (I'll double check how `role` is mapped through.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] g-m-robin commented on issue #841: go/adbc/driver/snowflake: expose multiple authentication options
Posted by "g-m-robin (via GitHub)" <gi...@apache.org>.
g-m-robin commented on issue #841:
URL: https://github.com/apache/arrow-adbc/issues/841#issuecomment-1670378028
@RoyalTS does the account name work with ADBC if you use a dash in place of the period separating your organization name and account name (i.e., deliveroo-eu-central-1)? I had a similar error when using the format `<orgname>.<accountname>` but had success connecting over adbc with the format `<orgname>-<accountname>`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] lidavidm commented on issue #841: go/adbc/driver/snowflake: expose multiple authentication options
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #841:
URL: https://github.com/apache/arrow-adbc/issues/841#issuecomment-1703083389
I was able to specify a role (which was separate from my username) without incident in R, hmm.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] zeroshade commented on issue #841: go/adbc/driver/snowflake: expose multiple authentication options
Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on issue #841:
URL: https://github.com/apache/arrow-adbc/issues/841#issuecomment-1604354387
@paleolimbot Yea, I have no idea whether or not Go would be able to launch the browser when buried beneath R, I'm also not familiar with the code that launches the browser as we just pass that off to Snowflake's code.
@lidavidm Yea, all those options are exposed in the Client Options documentation but maybe we should make a specific "Auth Options" section in the documentation to call it out? (or rather, move those options into the Authentication section?)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] RoyalTS commented on issue #841: go/adbc/driver/snowflake: expose multiple authentication options
Posted by "RoyalTS (via GitHub)" <gi...@apache.org>.
RoyalTS commented on issue #841:
URL: https://github.com/apache/arrow-adbc/issues/841#issuecomment-1669186462
I'm having similar/the same issues.
```r
db <- adbcdrivermanager::adbc_database_init(
adbcsnowflake::adbcsnowflake(),
username = '<my_username>,
adbc.snowflake.sql.account = "deliveroo.eu-central-1",
adbc.snowflake.sql.auth_type = "auth_ext_browser"
)
con <- adbcdrivermanager::adbc_connection_init(db)
```
results in
```r
time="2023-08-08T10:42:23+02:00" level=error msg="Authentication FAILED" func="gosnowflake.(*defaultLogger).Errorln" file="log.go:242"
Error in force(code) :
[Snowflake] 390400 (08004): Bad request; operation not supported.
```
Following suggestions in thread and appending `.aws` to the account – I do not believe this is the correct account, but whatever – results in the operation waiting a long time to return but then eventually returning with
```r
Error in force(code) :
[Snowflake] Post "https://deliveroo.eu-central-1.aws.snowflakecomputing.com:443/session/authenticator-request?requestId=e2b4ec97-827a-4056-729d-930d4ad03f3f": tls: failed to verify certificate: x509: certificate is valid for *.prod3.us-west-2.snowflakecomputing.com, *.us-west-2.snowflakecomputing.com, *.global.snowflakecomputing.com, *.snowflakecomputing.com, *.prod3.us-west-2.aws.snowflakecomputing.com, not deliveroo.eu-central-1.aws.snowflakecomputing.com
```
which perhaps isn't surprising given it's not the correct account name.
The same credentials work swimmingly using the odbc driver.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] liamnz commented on issue #841: go/adbc/driver/snowflake: expose multiple authentication options
Posted by "liamnz (via GitHub)" <gi...@apache.org>.
liamnz commented on issue #841:
URL: https://github.com/apache/arrow-adbc/issues/841#issuecomment-1701831342
I was having similar issues connecting to an enterprise Snowflake instance using the external browser authentication method.
However, initialising the connection in this way worked for me:
```r
db <- adbc_database_init(
adbcsnowflake::adbcsnowflake(),
adbc.snowflake.sql.account = '<account>',
adbc.snowflake.sql.region = '<region>',
adbc.snowflake.sql.uri.protocol = 'https',
adbc.snowflake.sql.uri.host = '<account>.<region>.snowflakecomputing.com',
adbc.snowflake.sql.uri.port = '443',
adbc.snowflake.sql.auth_type = 'auth_ext_browser'
)
con <- adbc_connection_init(db)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] lidavidm closed issue #841: go/adbc/driver/snowflake: expose multiple authentication options
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm closed issue #841: go/adbc/driver/snowflake: expose multiple authentication options
URL: https://github.com/apache/arrow-adbc/issues/841
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] lidavidm commented on issue #841: go/adbc/driver/snowflake: expose multiple authentication options
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #841:
URL: https://github.com/apache/arrow-adbc/issues/841#issuecomment-1604356602
> (or rather, move those options into the Authentication section?)
Makes sense to me.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] paleolimbot commented on issue #841: go/adbc/driver/snowflake: expose multiple authentication options
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on issue #841:
URL: https://github.com/apache/arrow-adbc/issues/841#issuecomment-1631749823
Thank you!
When I run
```r
library(adbcdrivermanager)
db <- adbc_database_init(
adbcsnowflake::adbcsnowflake(),
username = "dunnington",
adbc.snowflake.sql.account = "wv15596.ca-central-1.aws",
adbc.snowflake.sql.auth_type = "auth_ext_browser"
)
adbc_connection_init(db)
```
on MacOS, I get a Finder window popping up, but no browser. Also, the R session blocks indefinitely and I have to kill it manually.
Using the Snowflake Python connector, I get an error message:
```python
>>> import snowflake.connector
>>> conn = snowflake.connector.connect(user="dunnington", account="wv15596.ca-central-1.aws", authenticator="externalbrowser")
Traceback (most recent call last):
...
snowflake.connector.errors.DatabaseError: 390190 (08001): Failed to connect to DB: wv15596.ca-central-1.aws.snowflakecomputing.com:443, There was an error related to the SAML Identity Provider account parameter. Contact Snowflake support.
```
I'm on a free trial, so perhaps SSO isn't a thing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] RoyalTS commented on issue #841: go/adbc/driver/snowflake: expose multiple authentication options
Posted by "RoyalTS (via GitHub)" <gi...@apache.org>.
RoyalTS commented on issue #841:
URL: https://github.com/apache/arrow-adbc/issues/841#issuecomment-1702342999
Can confirm this works for me, too!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] paleolimbot commented on issue #841: go/adbc/driver/snowflake: expose multiple authentication options
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on issue #841:
URL: https://github.com/apache/arrow-adbc/issues/841#issuecomment-1671318517
I think ultimately these are issues with the Snowflake Go connector; however, I don't have enough Snowflake or Go experience to set up something to test. If we can set up some reproducer that only uses Snowflake Go, we could open an issue there. It is possible that there are some options in the Snowflake Go connector that we can set to make this work more reliably on more systems (e.g., by printing out the URL to the console rather than attempting to open a browser).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] lidavidm commented on issue #841: Expose multiple authentication options
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #841:
URL: https://github.com/apache/arrow-adbc/issues/841#issuecomment-1604294324
@zeroshade I _think_ all of these are exposed in the driver, maybe we just need documentation?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] paleolimbot commented on issue #841: go/adbc/driver/snowflake: expose multiple authentication options
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on issue #841:
URL: https://github.com/apache/arrow-adbc/issues/841#issuecomment-1604313944
It should almost certainly have a better interface but today this would look like:
``` r
library(adbcdrivermanager)
db <- adbc_database_init(
adbcsnowflake::adbcsnowflake(),
adbc.snowflake.sql.account = "account_name",
adbc.snowflake.sql.auth_type = "auth_oauth"
)
adbc_connection_init(db)
#> Error in force(code): [Snowflake] 260008 (08004): failed to connect to db. verify account name is correct. HTTP: 403, URL: https://account_name.snowflakecomputing.com:443/session/v1/login-request?requestId=35862061-3adf-45d3-7e1f-269590d104fb&request_guid=56942559-5d4b-45e5-4414-ffb48d1ea152
```
<sup>Created on 2023-06-23 with [reprex v2.0.2](https://reprex.tidyverse.org)</sup>
I have no idea what my "account" is because I'm terrible at Snowflake. This is probably supposed to launch a browser?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] g-m-robin commented on issue #841: go/adbc/driver/snowflake: expose multiple authentication options
Posted by "g-m-robin (via GitHub)" <gi...@apache.org>.
g-m-robin commented on issue #841:
URL: https://github.com/apache/arrow-adbc/issues/841#issuecomment-1631579063
> > I have no idea whether or not Go would be able to launch the browser when buried beneath R
>
> I still think I might just be passing unexpected values into the auth. If anybody can successfully get a browser to pop up from anywhere else (ADBC, Python/Snowflake, Go/Snowflake, or otherwise) I'm game to try those parameters from R.
@paleolimbot not sure if you are still facing this issue, but I was able to connect through ADBC on R with the browser pop-up after adding "username."
`
db <- adbc_database_init(
adbcsnowflake::adbcsnowflake(),
username = "snowflake_username",
adbc.snowflake.sql.account = "<account_identifier>",
adbc.snowflake.sql.auth_type = "auth_ext_browser"
)
con <- adbc_connection_init(db)
`
The formatting of my account identifier was different from yours (orgname-account_name) but I can't speak to whether that would be causing an issue on your end. See additional documentation from Snowflake [here](https://docs.snowflake.com/en/user-guide/admin-account-identifier).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] RoyalTS commented on issue #841: go/adbc/driver/snowflake: expose multiple authentication options
Posted by "RoyalTS (via GitHub)" <gi...@apache.org>.
RoyalTS commented on issue #841:
URL: https://github.com/apache/arrow-adbc/issues/841#issuecomment-1670781304
> @RoyalTS does the account name work with ADBC if you use a dash in place of the period separating your organization name and account name (i.e., deliveroo-eu-central-1)? I had a similar error when using the format `<orgname>.<accountname>` but had success connecting over adbc with the format `<orgname>-<accountname>`
Sadly no:
```r
Error in force(code) :
[Snowflake] 260008 (08004): failed to connect to db. verify account name is correct. HTTP: 403, URL: https://deliveroo-eu-central-1.snowflakecomputing.com:443/session/authenticator-request?requestId=20722a67-2528-44a1-5de1-a8d9094c7798
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] paleolimbot commented on issue #841: go/adbc/driver/snowflake: expose multiple authentication options
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on issue #841:
URL: https://github.com/apache/arrow-adbc/issues/841#issuecomment-1604334816
Hm...I think I figured out 'account' but I can't seem to make it work. Perhaps Go doesn't know how to launch a browser?
``` r
library(adbcdrivermanager)
db <- adbc_database_init(
adbcsnowflake::adbcsnowflake(),
adbc.snowflake.sql.account = "wv15596.ca-central-1.aws",
adbc.snowflake.sql.auth_type = "auth_ext_browser"
)
adbc_connection_init(db)
#> Error in force(code): [Snowflake] 260001: user is empty
```
<sup>Created on 2023-06-23 with [reprex v2.0.2](https://reprex.tidyverse.org)</sup>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] GShotwell commented on issue #841: go/adbc/driver/snowflake: expose multiple authentication options
Posted by "GShotwell (via GitHub)" <gi...@apache.org>.
GShotwell commented on issue #841:
URL: https://github.com/apache/arrow-adbc/issues/841#issuecomment-1604411692
Another pattern that's pretty common when browser pop up is hard is to just print the URL. This is how AWS does SSO and it works well even though it's a bit more clicking on the user side.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org