mozilla-django-oidc sso authentication not getting email address after user authentication in web application - onelogin

I am using mozilla-django-oidc library for SSO implementation on Django web application. I would like to get user email address after authentication. Please help.
I have followed below documents for SSO implementation.
https://developers.onelogin.com/quickstart/authentication/django-with-onelogin
Thanks

Related

Liferay 7.4 OpenID Connect as SP for Azure B2C

I'm trying to configure Liferay as an SP with Azure B2C IdP by OpenId Connect.
My issue is that I can't handle what kind of OAuh/oidc flow Liferay start in the portal login process. The first request for login when you configure OpenID Connect Provider in Liferay (and select openid connect on login page) is a redirect for your authorize URL, and Liferay set response_type=code in the URL.It's ok, and Azure B2C cand handled it, asking me for user/pass.
But, then, when IdP response with a code (after succesfull login), like protocol define, Liferay try to parse this like if it were a JWT access token. but isn't it. Because it's a code that Liferay need to validate to request a token for the auth token endpoint (configured in OpenID Connect Provider section on Liferay).
So I received an Internal Error on Liferay login page.
I've followed this procedure,
https://help.liferay.com/hc/en-us/articles/360028711312-Authenticating-with-OpenID-Connect
Thanks in advance!
The B2C configuration is here.
B2C scopes are usually openid and offline_access.
Did you create a B2C application?
Finally found out that Liferay need the implementation of the user_info endpoint to be able to work with openid.
It's rare because it's not necesary actually. I mean, Liferay go to user_info endpoint after call the authorize one, to get email address of the user, even if this information were in the first authorize token.
Anyways, the solution was implement user_info in B2C, so Liferay is working well now.

How to SSO to a directory server from a python application

I am developing a python backend using FastAPI (in docker) and I need to:
Implement an authentication service that utilizes SSO
Search the directory for users
use identity-provider/directory-server in development that is going to be replaced eventually by Microsoft Active Directory (I am developing a mac)
I searched a lot but I am still not sure. What I know now:
I can use any directory server as long as they support ldap
through ldap, I can search the directory
However, SSO does not seem to be a feature in ldap
SSO can be implemented using SAML2
Can you please guide me how to setup this. I am not sure how to integrate SAML2 and ldap to work together in my application.
Can you please guide me how to setup this. I am not sure how to integrate SAML2 and ldap to work together in my application.
You will need to set up an identity provider (or find an existing one) that:
has support for SAML2 and can act as a SAML2 identity provider.
has support for validating user credentials using LDAP and directory servers.
Your application, acting as a SAML2 SP, would send a SAML2 authentication to this IdP. The IdP then asks the user for credentials and validates them against the directory server, and would produce a SAML2 response back to your SP. Your SP would validate and parse the response, and all things permitting, would let the user through.
An example of such an IdP would be: https://github.com/apereo/cas or https://www.shibboleth.net/products/. Both OSS under Apache v2.

Azure AD Single Sign On

My company has developed a web-based application for internal and external use. The application is developed by angular + asp.net WebApi and authorised by OAuth. Users have to use the username and password given by us to login. The application works well. Recently, clients made a new request to login our system through Azure AD SSO. They want us to integrate their Azure AD.
Requirements:
On login page, there should be a new option for users to login our system by connecting to their Azure AD.
Alternatively, if their employees are connected to their system and then visit to our website, they will be automatically logged in our website without entering username and password.
I have no knownledge about Azure AD SSO and still get confused even I did some search on google. Can someone give me some advice or hints?
Using Msal with Angular you can implement the Azure AD SSO login. There are multiple code samples and microsoft documents available to achieve your requirement.
Please go through the documentation and code Sample.
In the Angular sample there is a function as mentioned below which verifies the user credentials if the user is already logged in or not.
checkoutAccount() {
this.loggedIn = !!this.authService.getAccount();
}

Office365 SSO for WebAPI based applications

I've been developing an WebAPI based application with token based authentication implemented and Using angularJs 1.6 as front-end. Requirement is to provide SSO for office365 without navigating user to microsoft login page for consent when user in signed in to application using login page of dashboard. Currently I'm not able to find any way to do that. Kindly guide me in accomplishing that. In my dashboard I'll provide link for any microsoft service. Let's say OutLook. When the user clicks on that link it will open up in new tab. I've been able to accomplish that using SMART LINKS. But for now user need to authenticate again on microsoft's login page.
Kindly help me in accomplishing SSO for that.

what is the difference between openam and openid SSO implementation?

As far as my understanding goes, OpenID uses accounts made on other websites to sign in to the website, so that user won't have to create multiple username and password.
Does OPENAM not to do the same thing? It uses providers like Facebook google in order to authenticate the user.
Please correct me if I am wrong.
OpenID Connect is a standard.
OpenAM is a product that amongst many other things, implements the OpenID Connect standard (both as a client/relying party and as a server/provider).
So, yes, you can configure your OpenAM to work with external OpenID Connect providers to establish sessions at OpenAM, but you can just as well configure your OpenAM to perform authentication against a local directory server and act as an OpenID Connect provider (like Facebook/Google/etc).
Above you mention scenario is Single Sign On (SSO). It provide OpenID-Connect with Oauth.
OpenID is a protocol(Standard).
OpenID Connect is a simple identity layer on top of the OAuth 2.0
protocol.
OAuth only provide authorization using an access token. OpenID-Connect is built on top of OAuth2, in order to provide user authentication information.
Not only OpenID Connect whether we can used SAML(Security Assertion Markup Language) for Single Sign On.Name it
SAML SSO.
OpenAM is a product and below Link you can read OpenAM feature Wikipedia OpenAM page and additionally you can used another open source Identity Server Name WSO2 Identity Server for implement this feature and there are more additional features as well.

Resources