You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "ruowan (via GitHub)" <gi...@apache.org> on 2024/04/26 04:29:58 UTC
[I] Snowflake invalid JWT token for the keypair auth. [arrow-adbc]
ruowan opened a new issue, #1777:
URL: https://github.com/apache/arrow-adbc/issues/1777
### What happened?
In the basic auth scenario.
The privateLink + Basic Authentication is succeeded.

The privateLink + KeyPair auth is failed.

The error report is the JWT token is invalid. Customer confirmed when using the public endpoint. The the keyPair auth is succeeded.
Error Message:
```
[Snowflake] 390144 (08004): JWT token is invalid.
```
The privateLink name format is link `org-account.privatelink`.
@davidhcoe These issues related with the Account Identifier. Do you have any insights for this? Does the snowflake ADBC driver doesn't support account name with privateLink.
### How can we reproduce the bug?
_No response_
### Environment/Setup
_No response_
--
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
Re: [I] Snowflake driver report invalid JWT token for the keypair auth with privateLink accountIdentifer [arrow-adbc]
Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on issue #1777:
URL: https://github.com/apache/arrow-adbc/issues/1777#issuecomment-2079963796
Does our C# binding provide a UI? or is that something external to the ADBC project?
--
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
Re: [I] Snowflake driver report invalid JWT token for the keypair auth with privateLink accountIdentifer [arrow-adbc]
Posted by "davlee1972 (via GitHub)" <gi...@apache.org>.
davlee1972 commented on issue #1777:
URL: https://github.com/apache/arrow-adbc/issues/1777#issuecomment-2123276020
Ok I found the bug.. The Snowflake GO Driver isn't capturing the region into cfg.Region before stripping it from cfg.Account in parseDSN().. This should fix this ADF UI issue..

I also figured out what was wrong with my original issue which uses a pure Config.. which has zero logic to manipulate any config parameters..
Instead of:
adbc.snowflake.sql.account: MYACCOUNT.privatelink
This worked:
adbc.snowflake.sql.account: MYACCOUNT
adbc.snowflake.sql.region: privatelink
This is just a bit confusing since the python snowflake connector and snowsql passes MYACCOUNT.privatelink for account..
--
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
Re: [I] Snowflake driver report invalid JWT token for the keypair auth with privateLink accountIdentifer [arrow-adbc]
Posted by "kiyoungoh (via GitHub)" <gi...@apache.org>.
kiyoungoh commented on issue #1777:
URL: https://github.com/apache/arrow-adbc/issues/1777#issuecomment-2079928027
The team owning the driver was not able to repro the issue with their latest version and closed the ticket.
https://github.com/snowflakedb/gosnowflake/issues/1033
--
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
Re: [I] Snowflake driver report invalid JWT token for the keypair auth with privateLink accountIdentifer [arrow-adbc]
Posted by "davlee1972 (via GitHub)" <gi...@apache.org>.
davlee1972 commented on issue #1777:
URL: https://github.com/apache/arrow-adbc/issues/1777#issuecomment-2078612172
https://github.com/apache/arrow-adbc/issues/1422
I got it to work, but you have to use a server url with .privatelink in it..
The Go driver has a bug which strips .privatelink causing the connection to fail..
--
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
Re: [I] Snowflake driver report invalid JWT token for the keypair auth with privateLink accountIdentifer [arrow-adbc]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #1777:
URL: https://github.com/apache/arrow-adbc/issues/1777#issuecomment-2113565778
This still sounds like an upstream issue, then.
--
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
Re: [I] Snowflake driver report invalid JWT token for the keypair auth with privateLink accountIdentifer [arrow-adbc]
Posted by "davlee1972 (via GitHub)" <gi...@apache.org>.
davlee1972 commented on issue #1777:
URL: https://github.com/apache/arrow-adbc/issues/1777#issuecomment-2137955331
This should be fixed if we can use an updated Snowflake Go driver..
> released in May 2024 cycle with version 1.10.1
The account will be parsed out of account.privatelink for JWT token generation..
--
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
Re: [I] Snowflake driver report invalid JWT token for the keypair auth with privateLink accountIdentifer [arrow-adbc]
Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on issue #1777:
URL: https://github.com/apache/arrow-adbc/issues/1777#issuecomment-2079950427
@kiyoungoh were you able to try using the approach that @davlee1972 mentioned in https://github.com/apache/arrow-adbc/issues/1777#issuecomment-2078612172 which he said was able to work?
--
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
Re: [I] Snowflake driver report invalid JWT token for the keypair auth with privateLink accountIdentifer [arrow-adbc]
Posted by "davlee1972 (via GitHub)" <gi...@apache.org>.
davlee1972 commented on issue #1777:
URL: https://github.com/apache/arrow-adbc/issues/1777#issuecomment-2123328267
Adding to the confusion..
adbc.snowflake.sql.account: MYACCOUNT.privatelink
works fine when using :
adbc.snowflake.sql.auth_type: auth_ext_browser
because this still works when constructing a host url, but no account is needed for the JWT..
--
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
Re: [I] Snowflake driver report invalid JWT token for the keypair auth with privateLink accountIdentifer [arrow-adbc]
Posted by "kiyoungoh (via GitHub)" <gi...@apache.org>.
kiyoungoh commented on issue #1777:
URL: https://github.com/apache/arrow-adbc/issues/1777#issuecomment-2080019213
I believe the combination mentioned was just a workaround of the issue that is caused by the old version 1.6.22 of gosnowflake. Can we consider updating the gosnowflake dependency to a more recent version that has already fixed the issue?
Appreciate suggesting the workaround but I believe having a more recent version of gosnowflake that already fixed the issue under the hood would be more efficient and beneficial.
--
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
Re: [I] Snowflake driver report invalid JWT token for the keypair auth with privateLink accountIdentifer [arrow-adbc]
Posted by "davlee1972 (via GitHub)" <gi...@apache.org>.
davlee1972 commented on issue #1777:
URL: https://github.com/apache/arrow-adbc/issues/1777#issuecomment-2123874136
Given the fact that ADF doesn't have fields for region or host, it might make more sense to check if account includes both account and region in MYACCOUNT.privatelink format and split it into account MYACCOUNT and region privatelink.
This probably should be done in the Snowflake Go driver or in the ADF UI..
--
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
Re: [I] Snowflake driver report invalid JWT token for the keypair auth with privateLink accountIdentifer [arrow-adbc]
Posted by "kiyoungoh (via GitHub)" <gi...@apache.org>.
kiyoungoh commented on issue #1777:
URL: https://github.com/apache/arrow-adbc/issues/1777#issuecomment-2079919293
Wasn't the issue fixed with 1.6.25?
https://docs.snowflake.com/en/release-notes/clients-drivers/golang-2023#:~:text=Fixed%20an%20issue%20with%20OCSP%20fallback%20requests%20in%20PrivateLink%20environments.

https://github.com/apache/arrow-adbc/issues/1422#:~:text=Returns%20with%20these%20errors%3A

Can we test with 1.6.25 or any version above and see if that helps?
--
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
Re: [I] Snowflake driver report invalid JWT token for the keypair auth with privateLink accountIdentifer [arrow-adbc]
Posted by "davlee1972 (via GitHub)" <gi...@apache.org>.
davlee1972 commented on issue #1777:
URL: https://github.com/apache/arrow-adbc/issues/1777#issuecomment-2097019484
The go driver repo has code that does strip ".privatelink" from the account, but I'm not sure ADBC driver uses this file..
https://github.com/snowflakedb/gosnowflake/blob/0389a9ab3f7073d4fbf527c06990ce11bd93b17e/dsn.go#L148C1-L156C3
```
// in case account includes region
posDot := strings.Index(cfg.Account, ".")
if posDot > 0 {
if cfg.Region != "" {
return "", errInvalidRegion()
}
cfg.Region = cfg.Account[posDot+1:]
cfg.Account = cfg.Account[:posDot]
}
```
--
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
Re: [I] Snowflake driver report invalid JWT token for the keypair auth with privateLink accountIdentifer [arrow-adbc]
Posted by "kiyoungoh (via GitHub)" <gi...@apache.org>.
kiyoungoh commented on issue #1777:
URL: https://github.com/apache/arrow-adbc/issues/1777#issuecomment-2079817423
Hi Team, do we have any ETA to fix the issue? Truly appreciate your time and consideration in advance.
--
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
Re: [I] Snowflake driver report invalid JWT token for the keypair auth with privateLink accountIdentifer [arrow-adbc]
Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on issue #1777:
URL: https://github.com/apache/arrow-adbc/issues/1777#issuecomment-2113035194
@davlee1972 We call `ParseDSN` to parse the URI if an explicit URI is provided, which looks like doesn't get processed by gosnowflake the same way to strip the region as if you do the reverse (converting a config into a dsn) https://github.com/snowflakedb/gosnowflake/blob/0389a9ab3f7073d4fbf527c06990ce11bd93b17e/dsn.go#L527
If you don't use a URI and instead supply the arguments individually, then we just populate gosnowflake.Config with the arguments which feels like gosnowflake should handle properly rather than needing ADBC to check for and strip things. Thoughts @lidavidm ?
--
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
Re: [I] Snowflake driver report invalid JWT token for the keypair auth with privateLink accountIdentifer [arrow-adbc]
Posted by "kiyoungoh (via GitHub)" <gi...@apache.org>.
kiyoungoh commented on issue #1777:
URL: https://github.com/apache/arrow-adbc/issues/1777#issuecomment-2079961188
@zeroshade Thanks for checking but from the UI, we don't have control to try the combination mentioned.
--
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
Re: [I] Snowflake driver report invalid JWT token for the keypair auth with privateLink accountIdentifer [arrow-adbc]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm closed issue #1777: Snowflake driver report invalid JWT token for the keypair auth with privateLink accountIdentifer
URL: https://github.com/apache/arrow-adbc/issues/1777
--
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
Re: [I] Snowflake driver report invalid JWT token for the keypair auth with privateLink accountIdentifer [arrow-adbc]
Posted by "davlee1972 (via GitHub)" <gi...@apache.org>.
davlee1972 commented on issue #1777:
URL: https://github.com/apache/arrow-adbc/issues/1777#issuecomment-2115499344
I opened a new issue with Snowflake..
https://github.com/snowflakedb/gosnowflake/issues/1132
I also contacted our Snowflake reps to see if they can prioritize this..
--
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
Re: [I] Snowflake driver report invalid JWT token for the keypair auth with privateLink accountIdentifer [arrow-adbc]
Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on issue #1777:
URL: https://github.com/apache/arrow-adbc/issues/1777#issuecomment-2079993072
Since we don't control the Azure ADF UI, you would have to talk to them about being able to try the fix that @davlee1972 mentioned if the UI doesn't provide the ability to try that combination.
--
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
Re: [I] Snowflake driver report invalid JWT token for the keypair auth with privateLink accountIdentifer [arrow-adbc]
Posted by "kiyoungoh (via GitHub)" <gi...@apache.org>.
kiyoungoh commented on issue #1777:
URL: https://github.com/apache/arrow-adbc/issues/1777#issuecomment-2079977533
Was referring to Azure ADF UI as @ruowan shared above, and it relies on the driver to construct the host URL.
--
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
Re: [I] Snowflake driver report invalid JWT token for the keypair auth with privateLink accountIdentifer [arrow-adbc]
Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on issue #1777:
URL: https://github.com/apache/arrow-adbc/issues/1777#issuecomment-2080039850
We are already using the most recent version of gosnowflake. ADBC v0.11.0 went out using gosnowflake v1.8.0, and the main branch is using v1.9.0
The snowflake ADBC driver hasn't used gosnowflake v1.6.22 since ADBC v0.9.0
--
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
Re: [I] Snowflake driver report invalid JWT token for the keypair auth with privateLink accountIdentifer [arrow-adbc]
Posted by "chr0m (via GitHub)" <gi...@apache.org>.
chr0m commented on issue #1777:
URL: https://github.com/apache/arrow-adbc/issues/1777#issuecomment-2111660664
Any resolution to this? I'm trying to set up an Azure Data Factory snowflake linked service using keypair auth and facing the same issue. My prvate key file works fine in snowsql but when I test the connection in ADF using the same key file I get:
```
Test connection operation failed.
Failed to open the database connection.
[Snowflake] 390144 (08004): JWT token is invalid.
```
--
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