aiosnow icon indicating copy to clipboard operation
aiosnow copied to clipboard

Add OAuth support

Open rbw opened this issue 4 years ago • 11 comments

rbw avatar Feb 22 '20 21:02 rbw

How would connecting with okta look like?

satzynu avatar Nov 14 '20 15:11 satzynu

Can you elaborate? Do you mean OIDC, Okta and OAuth?

rbw avatar Nov 19 '20 23:11 rbw

@satzynu ping

rbw avatar Nov 19 '20 23:11 rbw

Would love OAuth support if this is still on the table.

SobieskiCodes avatar Jan 25 '21 19:01 SobieskiCodes

Life's a little busy right now, but yes - it sure is. I'll be looking into adding more authentication methods once I've completed some documentation updates.

If someone wants to help out with this, please go ahead. And I'd be happy to discuss the design beforehand.

rbw avatar Jan 25 '21 22:01 rbw

If someone wants to help out with this, please go ahead. And I'd be happy to discuss the design beforehand.

I havent a clue where to start, but I'll take a look at it throughout the week. Appreciate the project.

SobieskiCodes avatar Jan 25 '21 22:01 SobieskiCodes

I'm pro for Oauth2 integration

padrian2s avatar Mar 18 '21 13:03 padrian2s

I'll start working on this shortly.

rbw avatar Mar 24 '21 11:03 rbw

Most of the mid-large organizations use OAuth2 with respect to the in-house security policies. Also a good practice is to use a service account instead of a regular (human) user. At first look the change is not big in aiosnow:

  • aiosnow Client use session_cls for any future aiohttp requests, currently only basic_auth is provided
  • using oauthlib we could pass bearer in the session headers after doing Auth against service token (look at Client->get_session()). Let the user provide oauth client.

The most intricate use case is the refresh of token before expiration.

After some research spent I would recommend oauthlib. @rbw I appreciate your work & time. aiosnow is the most comprehensive open source library and could spike in adoption with oauth2 integration.

padrian2s avatar Mar 24 '21 17:03 padrian2s

I'm sorry this got delayed again.

Thank you for the input @padrian2s

Let the user provide oauth client.

Sounds like a great idea I think. Would you be interested in helping out with this? I can make you a contributor, so you can work on the code in your own branch and submit a PR for review when you're ready.

rbw avatar May 13 '21 21:05 rbw

This would be an interesting feature, thanks for the updates on this.

weyCC81 avatar Aug 14 '22 20:08 weyCC81