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
4 Ways to Calculate Precision - wikiHow
How can you write Twitter posts that grab your audience's attention?
English Bulldog Puppies For Sale Under 1000 In Florida
Katie Pavlich Bikini Photos
Gamevault Agent
Pieology Nutrition Calculator Mobile
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Compare the Samsung Galaxy S24 - 256GB - Cobalt Violet vs Apple iPhone 16 Pro - 128GB - Desert Titanium | AT&T
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Craigslist Dog Kennels For Sale
Things To Do In Atlanta Tomorrow Night
Non Sequitur
Crossword Nexus Solver
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Shasta County Most Wanted 2022
Energy Healing Conference Utah
Aaa Saugus Ma Appointment
Geometry Review Quiz 5 Answer Key
Hobby Stores Near Me Now
Icivics The Electoral Process Answer Key
Allybearloves
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Marquette Gas Prices
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Vera Bradley Factory Outlet Sunbury Products
Pixel Combat Unblocked
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Mia Malkova Bio, Net Worth, Age & More - Magzica
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Where Can I Cash A Huntington National Bank Check
Topos De Bolos Engraçados
Sand Castle Parents Guide
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hello – Cornerstone Chapel
Stoughton Commuter Rail Schedule
Selly Medaline
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.