-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNOW-1752110: generate-jwt should not fail on empty passphrase #1747
Comments
github-actions
bot
changed the title
generate-jwt should not fail on empty passphrase
SNOW-1752110: generate-jwt should not fail on empty passphrase
Oct 18, 2024
Interesting, I can't replicate the behavior. After this change I'm getting |
Looks like the latest version produces the same error without my patch:
If using RC4:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SnowCLI version
Snowflake CLI version: 3.2.0.dev0
Python version
Python 3.11.6
Platform
macOS-14.7-arm64-arm-64bit
What happened
For a key without passphrase, the passphrase is passed as empty string instead of
None
.Potential fixes
Use dynamic defaults for prompts
Move passphrase to arguments for
generate_jwt
function and use this click approach allows automating the "don't show prompt if envvar is set".Use value_proc in typer's prompt
Basically this will use a tiny value post-processor which turns empty string into None. Seems to work (all tests pass, jwt is generated); I'd be happy to submit a PR.
Console output
How to reproduce
The text was updated successfully, but these errors were encountered: