what is the difference between openam and openid SSO implementation? - liferay

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.

Related

Spring security support multiple authentication types

I need to support 3 way of authentication at the same time in the application: LDAP, Azure AD, Basic.
After few hours of googling i found that the best way to do it would be to implement 3 authentication providers and then register them with AuthenticationManagerBuilder. But the issue i stumbled into is, that i dont know how the make the Azure Ad provider. For LDAP i found an online example i can use, and based on the LDAP i could probably also make the Basic username and password provider, but havent found anything similar on Azure AD. All i have found is that, i need to add 2-3 dependencies to the project for the Azure AD and then it automagically works.
I dont understand spring security that much, so im stumped atm. Can i just trust the automagic to do everything correctly, or are there some resouces on how to create AzureADAuthenticationProvider i could use with AuthenticationManagerBuilder?
An authentication provider is an abstraction for accessing user information from LDAP, custom third-party source, database etc. it validates the user credentials.
Spring security with azure ad:
Firstly, azure ad is integrated with Spring security for secure your application.
User login through their credential and get validate by azure AD.
From azure graph API you have to access token and membership information.
Membership for role based authorization.
LDAP Authentication:
Unique LDAP or DN ,you can perform search in directory unless you know username to DNS is known in advance.
You can authenticate the user by binding that user.
Load the Number of authorities for the user.
Custom Authentication Provider:
Create own authentication (custom) with the help of authentication provider interface in which you can use
authenticate method and implementing it and make authentication object with username and password of user
Then after you can configure these authentication in spring security configuration.
Here is the Reference Link regarding Spring Security

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.

How can we allow microsoft single sign on only for .onmicrosoft.com?

We have used NodeJS quickstart for SSO using OpenID connect authentication. All domain logins allowed here. We just want to restrict login using .onmicrosoft.com. Can you please help us.

Azure AD B2C Open ID Connectivity Vs OAuth 2.0

On this Microsoft documentation on Azure AD B2C, I read
OpenID Connect is recommended if you're building a web application that's hosted on a server and accessed through a browser. If you want to add identity management to your mobile or desktop applications using Azure AD B2C, you should use OAuth 2.0 rather than OpenID Connect.
What are the roles of OpenID Connect and OAuth 2.0 in Azure AD B2C and what features they separately support?
The question is not quite correct. On the same page you can read
OpenID Connect extends the OAuth 2.0 authorization protocol for use as
an authentication protocol. This authentication protocol allows you to
perform single sign-on. It introduces the concept of an ID token,
which allows the client to verify the identity of the user and obtain
basic profile information about the user.
OpenID Connect (OIDC) is an extension or superset standard/RFC for OAuth 2.0. Both protocols define authentication flows, while OAuth2 is a bit generic, a general framework, that gives a lot of freedom of choice, OIDC specifies important aspects in detail. OIDC adds id_token in JWT format in addition to access token, flows like Hybrid flow, token introspection endpoints etc to OAuth2.
Usually OAuth2 comes together with OIDC. If you want to know difference in detail then there are RFCs for OIDC and OAuth2
So your questions is about protocol difference, you can find a lot of information in addition to RFCs. Here is IMO good article link.
In short:
OAuth2
access token use but not format specified
Authorization Code Grant
Implicit Grant
Resource Owner Password Credential Grant
Client Credential Grant
OIDC
extension of access token by id_token use. id_token in JWT format
token endpoints, self issued token, offline access
Authorization Code Flow (extension to Authorization Code Grant)
Implicit Flow (extension Authorization Code Grant)
Hybrid Flow
B2C is focused on use from client application side from consumer applications. When you will be creating IdP provider Azure B2C support already existing social providers (Facebook, Microsoft etc), which in fact are OIDC with proprietary extensions, or custom OIDC IdP provider. In terms of API and authentication flows, and it is very typical for any IdP provider, it supports both, so you can use HTTP API for OAuth2 or OIDC, and OIDC is recommended.

Azure AD B2C social sign-in with OAuth2 Provider

Kinda new to this area of customizable sign-in/sign-up.
I'm currently planning to use social sing-in/sign-up in my Web API project, that handles backend process for my Web App and Desktop Client. I found it is easy to add a OpenID Connect provider to my Identity Provider, but am not sure how can I add OAuth2 provider. Is there a good example or tutorial on this topic?
Also, according to this and that post, it is recommended to use OAuth2 for native apps and OpenID Connect for Web API/Web Apps. Unfortunately the organization whose authentication I'd like to let customers use doesn't provide OpenID Connect. Is this still fine for my scenario?
This sample should be able to help you achieve what you are looking for. It uses the OAuth2.0 authorization code grant with confidential client and ADAL to obtain access tokens for the web app to call the Graph API with the user's identity.
This reference on authentication scenarios should also be useful to you.

Resources