SAML purpose and authentication in azure AD - azure-active-directory

I have to use Azure Active Directory for authentication to my web application.
In my company it was suggested to use SAML instead of oauth and I am very new to SAML.
Question:
Is the purpose of SAML is only to authenticate or there is any more functionality?
There are documents to use SAML in enterprise application. So,How to implement saml from app registration?

SAML SSO is a form of delegated authentication. The user is authenticated at the identity provider site (eg Azure AD) which sends a SAML assertion containing user identity information to the service provider site. The service provider trusts this information and establishes a local authentication session for the user using the information contained in the SAML assertion. SAML assertions often contain the user's email address but any user identity information may be included. This is the primary use case for SAML and in many instances the only one supported.
Most platforms have SAML libraries etc available. It's strongly recommended you use one of these rather than trying to implement SAML yourself.

Related

Standup a custom SAML IDP

In our organisation we implemented support for OIDC and OAuth2 support recently and we used the node-oidc-provider library to support the same. This way our product acts as an IDP that support Open IDC. We were also able to integrate our product as an IDP into our organisations instance of okta for certain scenarios.
In the same way we are planning to support SAML2 implementation in our security product that currently only supports OIDC. Is this possible and if so is it worth implementing SAML support? One of the reason to support SAML is so that we can talk to snowflake where Azure AD will use our SAML IDP to authenticate users and then provide access to snowflake.
Or the other way is to use Okta as a SAML provider and talk to snowflake. The flow would be users connect to okta and then okta will redirect certain users with a certain domain to our IDP (Supporting Open IDC) and then once that succeeds okta will use SAML to talk to Azure AD which in turn will provide access to snowflake.
Please suggest a good way. If you say we can integrate SAML support also into our existing Open IDC supported IDP what is the best library to use for nodejs.
Thanks

Can we use OneLogin/Okta/Auth0 as Proxy SP between Google IdP and application

We have an application for which we would like to enable users to login into our application with their own Identity Providers like Google, ADFS etc with SAML 2.0 as protocol.
In this context our application will be SP and Identity Providers will be Google, ADFS.
But currently we don't have SAML implementation at our application, so we would like to use some platform like OneLogin/Okta/Auth0 as middle proxy between our application and IdP so that SAML related handling can be done at OneLogin/Okta/Auth0 and we need to get callback to our application with user details after success login.
Is this possible with any SASS based SAML providers? and how to do it.
Thanks in advance
Yes - connect to Auth0 / Okta via OpenID Connect and then connect the IDP to other IDP via SAML.
So in this context, Auth0 / Okta is a SAML SP.
Have a look here.

Retrieving data from AD with SAML

We have been assigned a task, where we should integrate data from client's Active Directory on weekly basis. Currently we have working Single Sign On implemented with SAML with them. What would be the best approach to handle this situation? I'm still fairly new with SAML, so is it possible to access client's AD with SAML or should it be done with e.g LDAP instead?
All answers are much appreciated
- Andy
SAML is just an XML vocabulary. It has no functionality such as being able to connect to AD and search for users. That's what the Identity Provider (IdP) does. The IdP connects to AD, usually via LDAP, queries the attributes for a user and converts them to SAML format. It then sends the SAML, containing the attributes to the Service Provider (SP).
The point of SAML is the SP doesn't need integration, it just accepts SAML using SSO. So when a user logs in to the SP, the SP redirects them to the IdP, which authenticates them and redirects them back to the SP with their SAML attrobutes.
If you need to export all users from AD on a weekly basis you can just use LDAP and you don't need SSO.

Issue when calling New-CpimCertificate for Azure AD B2C custom policy

I'm trying to use Azure AD B2C as a SAML Identity Provider.
I am aware that several locations on the web state that B2C does not (yet) support SAML as identity provider (also e.g. answer on this question: Can I integrate a SAML application with Azure AD B2C?).
However, when I read the comparison between built-in policies and custom policies on the "Azure AD B2C Custom Policies" docs, I see that SAML is already supported today as an identity provider.
Also, I found this GitHub walk through: https://github.com/Azure-Samples/active-directory-b2c-advanced-policies/blob/master/Walkthroughs/RP-SAML.md
Following that walk through, I have an issue in step 5 "Upload Certs" of the first section "Create the SAML Token Issuer" while executing New-CpimCertificate.
I can successfully import the module ExploreAdmin.dll. However providing my credentials while calling New-CpimCertificate, I get this error on the console:
New-CpimCertificate : Unauthorized.
Access to this Api requires feature: 'Advanced' for the tenant: '<myazureb2ctenant>.onmicrosoft.com'.
Any help, thoughts, comments... are very welcome!
Azure AD B2C still does not officially support (even in preview) connecting with apps via SAML (aka being a SAML identity provider).
It only supports connecting to other identity providers via SAML (aka being a SAML relaying party).
The GitHub walk through you came across is an old walk through before the official launch of the Azure AD B2C Custom Policies preview. It talks about features that weren't included in the scope of the preview, such as B2C as a SAML IdP. It also references tools (those PowerShell scripts) and steps that are no longer applicable.
The mention of SAML in the Identity Providers section of the "Azure AD B2C Custom Policies" doc refers to supporting B2C being a relaying party that connects to a SAML Identity providers, not the other way around (where B2C is the SAML identity provider itself).
All that being said, you CAN make your scenario work, with the clear understanding that it's not supported.
You can use that GitHub document you've referenced, swapping out the steps that involve ExploreAdmin and New-CpimCertificate for these instructions that allow you to upload the certificate via the portal:
Go to your Azure AD B2C tenant. Click Settings > Identity Experience Framework > Policy Keys.
Click +Add, and then:
Click Options > Upload.
Enter a Name (for example, YourAppNameSamlCert). The prefix B2C_1A_ is automatically added to the name of your key.
To select your certificate, select upload file control.
Enter the certificate's password.
Click Create.
Verify that you've created a key (for example, B2C_1A_YourAppNameSamlCert).

Federated authentication and Delegated authentication in salesforce

Anybody know the difference between Federated authentication and Delegated authentication in salesforce? Can you explain the flow of request in these two methods?
The main difference is the use of Security Assertion Markup Language (SAML) on Federated Authentication.
Delegated Authentication Use delegated authentication if you have mobile users in your organization, or if you want to enable
single-sign on for partner portals or Customer Portals. You must
request that this feature be enabled by salesforce.com. This recipe
explains delegated authentication in more detail.
Federated Authentication using SAML Federated authentication uses SAML, an industry standard for secure integrations. Investing in SAML
with Salesforce.com can be leveraged with other products or services.
If you use SAML, you don't have to expose an internal server to the
Internet: the secure integration is done using the browser. In
addition, Salesforce.com never handles any passwords used by your
organization. For more information, see “Configuring SAML Settings for
Single Sign-On” in the Salesforce.com online help.
Difference
Delegated authentication has a few drawbacks with respect to federated authentication. First, delegated authentication is inherently **less secure than federated authentication**. Even if encrypted, delegated authentication still sends the username and password (possibly even your network password) over the internet to Force.com. Some companies have policies that preclude a third party for handling their network passwords. Second, delegated authentication **requires much more work for the company implementing it**. The Web services endpoint configured for the org must be developed, hosted, exposed on the Internet, and integrated with the company's identity store.
More detailed flow and code example on delegated
More detailed flow on SSO width SAML

Resources