Is there a 3rd party package to handle authentication for Django via OAuth? I've looked into OAuth Toolkit but it only seems to be a provider that provision tokens. I'm looking for something that can consume an existing provider much like All Auth does with Google, Facebook, etc. The problem is that I want to integrate with a private provider, not a popular social provider as mentioned above. Is there any package that could do this or do I have to write the OAuth flow entirely by myself?
Related
As per Keycloak documentation to connect to an existing external database with user information we will need to implement the UserStorageProvider interface:
https://www.keycloak.org/docs/latest/server_development/index.html#_user-storage-spi
I couldn't find the same within the latest version of python keycloak package:
https://pypi.org/project/python-keycloak/
How can i connect to an external database like postgres from my python application if the UserStorageProvider class is not present in the supported keycloak library for python?.
Couldn't find this information on any other forum so any help regarding this would be much appreciated
How can i connect to an external database like postgres from my python
application if the UserStorageProvider class is not present in the
supported keycloak library for python?.
This library:
https://pypi.org/project/python-keycloak/
is just a library for the client side to communicate with the Keycloak server via Rest API calls. From that project you can read
python-keycloak is a Python package providing access to the Keycloak
API.
It is not officially maintained by the Keycloak project; but even if that was the case, it is just a wrap around the Keycloak Rest API. You would not be able to implement your custom UserStorageProvider using it anyway.
When the Keycloak documentation states:
You can use the User Storage SPI to write extensions to Keycloak to
connect to external user databases and credential stores.
is referring to extending the code of the Keycloak server, which is writing in Java not in python. You have to look at this documentation to understand the interfaces provided. To extend the Keycloak server code via Service Provider Interfaces (SPI) check the official documentation. It will tell you how to create your custom user storage provider using SPI.
I have an application created using Django that uses MSAL library to authenticate with Azure AD.
As I understand, MSAL uses OAuth and so far the authentication/authorization works great. Is there a way to implement authentication using SAML instead of OAuth. I came across pysaml2 library but doesn't have sufficient documentation to integrate with Azure AD. Can someone please share your thoughts.
Is there a way to implement authentication using SAML instead of
OAuth.
No it's not possible to use SAML authentication in MSAL library.MSAL does not support SAML. It only supports OAuth / OpenID Connect.
Similar kind of request also raised on StackOverflow and Microsoft Q&A as well you can check for more information
SAML is devloped by the Security Services Technical Committee of OASIS (Organization for the Advancement of Structured Information Standards) not by Microsoft so this might be the reason SAML is not included in MSAL Library.
I am using two social auth libraries in django framework social-auth-app-django and graphql-social-auth. I have successfully implemented the login functionality using these libraries but now I want to introduce a feature in my app to disconnect social account. So according to this documentation (https://python-social-auth.readthedocs.io/en/latest/pipeline.html#disconnection-pipeline) I have added SOCIAL_AUTH_DISCONNECT_PIPELINE but having no idea how can I use this disconnect functionality from my react frontend. I am using React frontend so how can I disconnect social account using rest api?
I am trying to see some example of how to connect to atlassian bitbucket (used to be STASH) API and I don't see any examples of how does one authenticate to start retrieving data like, projects, repos etc.
You probably want to use OAuth for authentication instead of user passwords and basic auth. For this you need to have an application link in place. I blogged about how to communicate with Atlassian applications by using OAuth in Python here. This will also work in Bitbucket Server.
Hope this helps.
Cheers,
Michael
About to embark on a Java project using Spring Security to create a Restful Web Service (JSON) that will use Kerberos authentication to authenticate users in Active Directory.
I'm not locked into using Java and am considering the use of Python to gain new skills and look at potential alternative platforms.
So far I have looked at Twisted and Web2Py but they don't seem to have support for Kerberos nor could I find information around implementing Kerberos support.
Does anyone know of frameworks supporting the above deployment or pointers to get me started?
Python Eve is a restful api written in Python that uses mongo as its backend.
It provides a simple class that you can use to implement your own authentication which would allow you to use the python kerberos module
I use this setup but with ldap instead of kerb.
The underlying web framwork behind eve is Flask.