fixer-m / snowflake-db-net-client

Snowflake .NET Client
Apache License 2.0
51 stars 14 forks source link

SSO Sign In for Client #28

Open lawrence-vo opened 2 years ago

lawrence-vo commented 2 years ago

Is there anyway to authenticate via. SSO? I don't mind taking a crack at this, just need to know if it's been implemented or not.

Thanks!

fixer-m commented 2 years ago

Hi! No, unfortunately this library doesn't support this yet. You can create dedicated user in SF, allow auth with password for it and use it for this client.

lawrence-vo commented 2 years ago

@fixer-m would you like me to take a crack at SSO or would you prefer that be implemented at a later time?

fixer-m commented 2 years ago

@lawrence-vo Sure - you can try to implement it, this would be great actually. I have only demo account in SF, so I guess I can't login via SSO and thus can't properly try and test this auth scheme. I would start with analysing how SSO works in official connector, try to recreate it and simplify it if possible.

lawrence-vo commented 2 years ago

@fixer-m might take longer as expected since the official client also has issues with SSO.

tsanton commented 1 year ago

@lawrence-vo can you link to the issue with the official client?

I just implemented a client credentials flow (OAuth) between DBT and Azure AD for Snowflake. The project I'm working on requires OAuth-authentication in prod and I'm also utilising this client, therefore I too wouldn't mind taking a stab at as I would love to use this package.

@fixer-m do you have any design ideas for how to implement multiple authentication alternatives?

I'm thinking a IAuthenticator interface... ?

If we can agree on some common patterns then I'd have no problems with creating the AzureOauthAuthenication implementation!

fixer-m commented 1 year ago

@Tsanton Yes, I guess there should be IAuthenticator interface with multiple implementations. I don't know much about OAuth, so right now I can't suggest any design patterns (I would start from researching official connector code).

I have a few requirements though:

lawrence-vo commented 1 year ago

@Tsanton , the issue is here