Skip to content

Conversation

@pauliyobo
Copy link

When using keypair authentication with snowflake, and when a JWT token is issued, the account identifier needs to have the region information stripped from it.
This PR aims to fix this issue, as currently, the whole account identifier is used as the issuer, which causes an invalid token to be generated.

@pauliyobo
Copy link
Author

Hello
@andrusha @dmzmk
Any thoughts? Furthermore, is it a wanted change?
Thanks :)

@andrusha
Copy link
Owner

@pauliyobo I've read through the https://docs.snowflake.com/en/user-guide/admin-account-identifier#non-vps-account-locator-formats-by-cloud-platform-and-region, but don't quite understand in which cases the region information is significant and which it isn't, the ".global" I haven't seen anywhere there at all.

Maybe it would be helpful if you could add a few test cases? For example, for account identifier xy12345.dod.us-gov-west-1.aws should the token be generated for xy12345.dod.aws or xy12345 or xy12345.dod.us-gov-west-1.aws?

@pauliyobo
Copy link
Author

Hello
@andrusha
I've also went through the page, and have reviewed the general documentation again.
I believe we may actually be able to get rid of the .global check.
I had originally included it because I was also keeping the python snowflake connector as reference, which seemed to have introduced this check about 4 years ago. Furthermore, it seems to be likely the only one to perform this check.
I'm happy to remove it, though the split by dot is necessary in order to extract the account name and strip away the region information.
Do you still want tescases to be added in this case?

@pauliyobo
Copy link
Author

Hello,
@andrusha sorry for pinging you again. I only would like to know how to proceed, if I have to at all.
Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants