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
Image Resizing in React Native: How to Resize Images in React Native
How to Hash Passwords with bcrypt in Node.js
Artem The Gambler
Using GPT for translation: How to get the best outcomes
Cottonwood Vet Ottawa Ks
855-392-7812
Citibank Branch Locations In Orlando Florida
Midflorida Overnight Payoff Address
Sarah F. Tebbens | people.wright.edu
Richard Sambade Obituary
Clafi Arab
Indiana Immediate Care.webpay.md
Shuiby aslam - ForeverMissed.com Online Memorials
Keniakoop
2016 Ford Fusion Belt Diagram
Costco Gas Foster City
London Ups Store
Echat Fr Review Pc Retailer In Qatar Prestige Pc Providers – Alpha Marine Group
Navy Female Prt Standards 30 34
Yakimacraigslist
Raz-Plus Literacy Essentials for PreK-6
Https Paperlesspay Talx Com Boydgaming
Craigslist Roseburg Oregon Free Stuff
Valic Eremit
Select Truck Greensboro
4 Methods to Fix “Vortex Mods Cannot Be Deployed” Issue - MiniTool Partition Wizard
Harbor Freight Tax Exempt Portal
Jersey Shore Subreddit
Jackass Golf Cart Gif
Jeep Cherokee For Sale By Owner Craigslist
Minecraft Jar Google Drive
Greencastle Railcam
Ducky Mcshweeney's Reviews
Omnistorm Necro Diablo 4
Aveda Caramel Toner Formula
Craigslist List Albuquerque: Your Ultimate Guide to Buying, Selling, and Finding Everything - First Republic Craigslist
Qlima© Petroleumofen Elektronischer Laserofen SRE 9046 TC mit 4,7 KW CO2 Wächter • EUR 425,95
Reese Witherspoon Wiki
The Conners Season 5 Wiki
Disassemble Malm Bed Frame
Differential Diagnosis
Senior Houses For Sale Near Me
M&T Bank
Brown launches digital hub to expand community, career exploration for students, alumni
Quaally.shop
Scott Surratt Salary
Missed Connections Dayton Ohio
Makemkv Key April 2023
David Turner Evangelist Net Worth
Sdn Dds
Scholar Dollar Nmsu
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.