• Services

    IT SERVICES

    solutions for almost every porblems

    Ecommerce Development

    Enterprise Solutions

    Web Development

    Mobile App Development

    Digital Marketing Services

    Quick Links

    To Our Popular Services
  • Hire Developers

    Hire Developers

    OUR ExEPRTISE, YOUR CONTROL

    Hire Mangeto Developers

    Hire Java Developers

    Hire Node Developers

    Hire Shopify Developers

    Hire Android Developers

    Hire Angular Developers

    Hire Shopware Developers

    Hire iOS App Developers

    Hire WordPress Developers

    Hire A full Stack Developer

    Choose a truly all-round developer who is expert in all the stack you require.

  • Case Studies
  • About
  • Blog
  • Contact Us
Single Sign On (SSO) Setup | Okta integrating with  Keycloak using SAML and Application OIDC
Updated on 01/12/2022

Single Sign On (SSO) Setup | Okta integrating with Keycloak using SAML and Application OIDC

Technical

Basic Terminologies

SSO

Single sign-on (SSO) is a user authentication tool that enables users to securely access multiple applications and services using just one set of credentials.

Auth0

Auth0 is a flexible, is a solution to add authentication and authorization services   to your applications

OpenID Connect (OIDC)

It is an open authentication protocol that works on top of the OAuth 2.0 framework. Targeted toward consumers, OIDC allows individuals to use single sign-on (SSO) to access relying party sites using OpenID Providers (OPs), such as an email provider or social network, to authenticate their identity

SAML

Security Assertion Markup Language (SAML) is an XML-based protocol used for Single Sign-On (SSO) and exchanging authentication and authorization data between applications. Within the SAML workflow, Okta can act as both the Identity Provider (IdP) or as the Service Provider (SP), depending on your use case.

Lets begin with the integration.

Okta Configuration

Firstly, you need to create an account on https://www.okta.com/ and login using admin user.

Step 1:  Create an SAML app in Okta

Step 2: Set the values as below.

  1. Single Sign On URL:
    root/auth/realms/{broker-realm}/broker/{idp-name}/endpoint/clients/{client-id}
  2. Audience Restriction:
    https://{keycloakHost}/auth/realms/{realm-name}
  3. Copy SAML Certificate Meta-data URl

KeyCloak Configuration

Before you start you need to download and install keyClock
https://www.keycloak.org/downloads.html

Step 1:  Create new Realm (optional) if you have already created you can skip it

Read More About
Multi Tenancy via Single-realm Approach with Keyclock

Step 2: Authentication Flow

Create a new authentication flow for SAML. Log into Keycloak, navigate to Authentication > New.

Set Alias to SAML_First_Broker. Leave Top level flow type as generic.

Add executions to SAML First_Broker flow:

  1. Add execution Create User if Unique
  2. Add execution Automatically Set Existing User.

Step 3: Create A SAML identity provider.

  1. Navigate to Identity Provider and add a new user-definer SAML 2.0 provider. Set the alias to okta, import. This name would be used for configuration in future.
  2. Paste SAML Entity descriptor metadata.
  1. Set First Login Flow to SAML_First_Broker.
  2. Set NameID Policy Format to Unspecified.
  3. Save as XML SAML 2.0 Service Provider Metadata

Step 4: Configure Keycloak Client

Create a new Keycloak client by using Keycloak’s Identity Provider metadata file that you saved in the above step.

  • Client ID: (this should be created automatically)
  • IDP Initiated SSO URL Name: myapp-saml
  • IDP Initiated SSO Relay State: Application URL where you want to redirect
  • Assertion Consumer Service POST Binding URL : Application URL where you want to redirect

Consult our expert java developers for any complex backend problems

Logo for Java

Demo Application

Python Flask Application.

[Github link]??

Steps

  1. Unzip the folder
  2. Navigate to project directory
  3. Run pip3 install -r .\req.txt (this will install the dependency) Configure client_secrets_copy_.py Update redirect URI to application URL.
  1. Python keyck.py (this will start the server)

Flask App KeyCloak configuration:

  • Create open Id Connect Client 
  • Add valid URL : Application URL

  • Configuration Done.

Now you can go to Okta login and choose the application that we set up. You should be redirected to you Application

Get Help from Our Experts in Creating Large Scale Enterprise Grade Solution

enterprise solution

Free Newsletter Subscription

Join the list if you find this kind of technical blogs useful

    Would you like to share this article?

    Share

    All Categories

    Artificial Intelligence
    ChatGPT
    Communication
    ecommerce
    Magento
    News and Updates
    Technical
    UX and Navigation
    WhatsApp API

    Latest Post

    • Magento 2 Rich Text Schema Setup in JSON-LD: Step-by-Step Guide
    • Fixing Magento 2 Product Schema Markup | Missing “image” field FIX
    • How to Dispatch Custom Events in Magento 2
    • Adding Filters in Magento Admin Grid | Column and Non-Column Component
    • How to add custom styles (Colors and Fonts) to Magento Admin Grid

    Related Post

    • Magento 2 Rich Text Schema Setup in JSON-LD: Step-by-Step Guide
    • Fixing Magento 2 Product Schema Markup | Missing “image” field FIX
    • How to Dispatch Custom Events in Magento 2
    • Adding Filters in Magento Admin Grid | Column and Non-Column Component
    • How to add custom styles (Colors and Fonts) to Magento Admin Grid

    310 Kuber Avenue, Near Gurudwara Cross Road, Jamnagar – 361008

    Plot No 36, Galaxy Park – II, Morkanda Road,
    Jamnagar – 361001

    Quick Links

    • About
    • Career
    • Case Studies
    • Blog
    • Contact Us
    • Privacy Policy
    Icon-facebook Linkedin Google Clutch Logo White

    Our Expertise

    • eCommerce Development
    • Web Development Service
    • Enterprise Solutions
    • Mobile App Development
    • Digital Marketing Services

    Hire Dedicated Developers

    • Hire Full Stack Developers
    • Hire Certified Magento Developers
    • Hire Top Java Developers
    • Hire Node.JS Developers
    • Hire Angular Developers
    • Hire Android Developers
    • Hire iOS Developers
    • Hire Shopify Developers
    • Hire WordPress Developer
    • Hire Shopware Developers

    Copyright @Azguards Technolabs 2025 all Rights Reserved.