Basic Authentication – LDAP - MuleSoft API Manager Policy (2024)

Basic Authentication is simpleand most widely used authenticationmechanism in HTTP based services or APIs. The client sends HTTP requests with the Authorization HTTP header that contains the wordBasicword followed by a space and a base64-encoded string username:password .

For example, to authorize as username/password the client would send below HTTP header

Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=

Basic Authentication – LDAP is an extension of the Basic Authentication policy where the provided username and password will be authenticate against the target LDAP server

To Start with we first create a sample project in Design Center

Project – basic-auth-sample

RAML –

#%RAML 1.0title: basic-auth-sampleversion: 1.0.0securitySchemes: basic: description: | This API supports Basic Authentication. type: Basic Authentication/booking: get: securedBy: [basic] description: retrieve route list queryParameters: destination: type: string required: false responses: 200: body: application/json: 

Design Center

Basic Authentication – LDAP - MuleSoft API Manager Policy (1)

Now publish it to Exchange and API Manager

Exchange –

Basic Authentication – LDAP - MuleSoft API Manager Policy (2)

Provide the asset version

Basic Authentication – LDAP - MuleSoft API Manager Policy (3)

Exchange asset will be created

Basic Authentication – LDAP - MuleSoft API Manager Policy (4)

Now create an API Manager configuration

Basic Authentication – LDAP - MuleSoft API Manager Policy (5)

This will create the API Manager configuration for basic-auth-sample

Basic Authentication – LDAP - MuleSoft API Manager Policy (6)

Click Policies -> Apply New Policy -> Basic Authentication – LDAP policy

Basic Authentication – LDAP - MuleSoft API Manager Policy (7)

Now we have to provide the valid LDAP configuration, against which basic authentication username and password will be validated

Basic Authentication – LDAP - MuleSoft API Manager Policy (8)

We can see below properties

  • LDAP server URL – URL and port for the LDAP server
  • LDAP user DN – The name of the user or user group with access to the LDAP
  • LDAP user password – User password or user group
  • LDAP search base – Starting point for search in the directory tree
  • LDAP search filter – Filtering criteria

Which we have to update to use our LDAP server

Basic Authentication – LDAP - MuleSoft API Manager Policy (9)

LDAP configuration

Basic Authentication – LDAP - MuleSoft API Manager Policy (10)

Once done, Click apply and then it will come in API policies list

Basic Authentication – LDAP - MuleSoft API Manager Policy (11)

Now create mule application in Anypoint Studio

Basic Authentication – LDAP - MuleSoft API Manager Policy (12)

Add API Auto Discovery configuration – more on API Auto Discovery

Basic Authentication – LDAP - MuleSoft API Manager Policy (13)

Deploy the project on Cloudhub

Basic Authentication – LDAP - MuleSoft API Manager Policy (14)

API Manager Configuration should now come as active

Basic Authentication – LDAP - MuleSoft API Manager Policy (15)

Now if we test our API it will through 401 unauthorized error

Basic Authentication – LDAP - MuleSoft API Manager Policy (16)

Now we will use the user from LDAP server

Basic Authentication – LDAP - MuleSoft API Manager Policy (17)

Now we can see the 200 success response

Design Center project – basic-auth-sample

Sample mule application – basic-auth-sample

Sample SOAP UI project – basic-auth-sample-soapui-project

Thank you for taking out time to read the above post. Hope you found it useful. In case of any questions, feel free to comment below. Also, if you are keen on knowing about a specific topic, happy to explore your recommendations as well.

For any latest updates or posts on our website, you can follow us on LinkedIn. Look forward to connecting with you there.

Basic Authentication – LDAP - MuleSoft API Manager Policy (2024)
Top Articles
How Many Loads Of Washing Should You Do A Week? | Capital Hire Skips
Leon Itinerary (3 Days): Complete Day-by-day Breakdown
Was ist ein Crawler? | Finde es jetzt raus! | OMT-Lexikon
Danatar Gym
Crocodile Tears - Quest
Kansas Craigslist Free Stuff
Flixtor The Meg
Txtvrfy Sheridan Wy
Devotion Showtimes Near Mjr Universal Grand Cinema 16
Wild Smile Stapleton
Ou Class Nav
Cvs Devoted Catalog
Ave Bradley, Global SVP of design and creative director at Kimpton Hotels & Restaurants | Hospitality Interiors
4Chan Louisville
Jasmine Put A Ring On It Age
MindWare : Customer Reviews : Hocus Pocus Magic Show Kit
Socket Exception Dunkin
Kaomoji Border
Baywatch 2017 123Movies
Byte Delta Dental
Keurig Refillable Pods Walmart
Dover Nh Power Outage
Webcentral Cuny
Clare Briggs Guzman
Form F-1 - Registration statement for certain foreign private issuers
SOGo Groupware - Rechenzentrum Universität Osnabrück
FAQ's - KidCheck
Democrat And Chronicle Obituaries For This Week
Bend Missed Connections
Downloahub
Wheeling Matinee Results
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Average weekly earnings in Great Britain
Shiftwizard Login Johnston
Green Bay Crime Reports Police Fire And Rescue
SF bay area cars & trucks "chevrolet 50" - craigslist
Leena Snoubar Net Worth
Sabrina Scharf Net Worth
888-822-3743
Isabella Duan Ahn Stanford
Cocaine Bear Showtimes Near Cinemark Hollywood Movies 20
Parent Portal Pat Med
Copd Active Learning Template
20 Mr. Miyagi Inspirational Quotes For Wisdom
What is a lifetime maximum benefit? | healthinsurance.org
N33.Ultipro
La Qua Brothers Funeral Home
Mlb Hitting Streak Record Holder Crossword Clue
Evil Dead Rise - Everything You Need To Know
Tenichtop
211475039
Intuitive Astrology with Molly McCord
Latest Posts
Article information

Author: Greg O'Connell

Last Updated:

Views: 5717

Rating: 4.1 / 5 (62 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Greg O'Connell

Birthday: 1992-01-10

Address: Suite 517 2436 Jefferey Pass, Shanitaside, UT 27519

Phone: +2614651609714

Job: Education Developer

Hobby: Cooking, Gambling, Pottery, Shooting, Baseball, Singing, Snowboarding

Introduction: My name is Greg O'Connell, I am a delightful, colorful, talented, kind, lively, modern, tender person who loves writing and wants to share my knowledge and understanding with you.