snowflakedb / snowflake-connector-nodejs

NodeJS driver
Apache License 2.0
121 stars 128 forks source link

Add support for MFA token caching #493

Closed nathanjcochran closed 1 month ago

nathanjcochran commented 1 year ago

What is the current behavior?

Every time a new connection is created, a new Duo MFA prompt is triggered. When creating multiple connections in quick succession, this can be very annoying. It is easy to miss one or more of the prompts, which can cause you to be locked out of your account for awhile.

What is the desired behavior?

The Duo MFA prompt is only triggered for the first connection made in some time window, because the MFA token is cached. Basically, add support for MFA Token Caching.

How would this improve snowflake-connector-nodejs?

It would reduce the number of repeated Duo MFA prompts that users have to approve when an application using the node.js snowflake driver makes multiple connections in quick succession.

References, Other Background

Official documentation on MFA Token Caching.

sfc-gh-dszmolka commented 1 year ago

hello and thank you for submitting this enhancement request. we'll take a look and i'll try to keep this Issue updated with the news. thank you in advance for bearing with us !

john-pavlat commented 1 year ago

+1 on this issue; this would be incredibly helpful for serverless applications.

Oracen commented 5 months ago

Quick +1 to this. Is there an approximate ETA on this? Last update was 4 months ago

sfc-gh-dszmolka commented 5 months ago

apologies it taking so long, but being an entirely new feature which on top of it, operates on user credentials, we also had to go through a (lengthy) internal security review before the actual implementation.

Feature PR's can be followed here:

As of now, I cannot give a specific ETA for the actual implementation, but syncing internally with the team and will update if there's any more specifics.

edit: there is - we aim to release both features in the April release cycle (happens usually towards end of given month) so fingers crossed !

jonathankkizer commented 4 months ago

Is there an update for this? I see that it missed the April release cycle. Is it likely that it is shipped in the next few months?

sfc-gh-dszmolka commented 4 months ago

you can follow the linked PRs for updates. We plan to release this in the upcoming months indeed (there were other priorities so this fell back a bit). Thank you for bearing with us !

sfc-gh-dszmolka commented 3 months ago

PR #820 for SSO token caching is now merged, and will be part of the next upcoming release. We keep working on the MFA token caching #711 too, to be released hopefully at the same time.

sfc-gh-dszmolka commented 2 months ago

MFA token caching PR also merged, and both SSO and MFA token caching will be part of the next upcoming release in July 2024.

sfc-gh-dszmolka commented 1 month ago

released with Snowflake Node.JS driver v1.12.0 - thank you for bearing with us !