---
schema_version: "1"
id: 4e33961a55d9d910de8c06e4ae3236b6c0951c51174f3f3e1acd6756eeb84f8e
title: "Basic Authentication: Simple Policy"
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/mule-gateway/policies-included-basic-auth-simple.md
canonical_url: https://docs.mulesoft.com/mule-gateway/policies-included-basic-auth-simple
source_site: docs.mulesoft.com
content_type: documentation
content_hash: b7411f0c9467b5ca7a9b6dcdcfca16fac80bc6409d073747300fda0c170fb249
description: MuleSoft Documentation Site
latest: true
---
---
product: Mule Gateway
keywords: basic authentication, api gateway, mule gateway, gateway, policy
---

# Basic Authentication: Simple Policy

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

<table><colgroup><col> <col></colgroup><tbody><tr><td><p><strong>Policy Name</strong></p></td><td><p>Basic Authentication: Simple</p></td></tr><tr><td><p><strong>Summary</strong></p></td><td><p>Allows access based on the basic authorization mechanism, with a single user-password</p></td></tr><tr><td><p><strong>Category</strong></p></td><td><p>Security</p></td></tr><tr><td><p><strong>First Mule version available</strong></p></td><td><p>v4.0.0</p></td></tr><tr><td><p><strong>Returned Status Codes</strong></p></td><td><p>400 - Unauthorized or invalid client application credentials in WSDL API using SOAP 1.2</p></td></tr><tr><td></td><td><p>401 - Unauthorized or invalid client application credentials in HTTP or RAML APIs</p></td></tr><tr><td></td><td><p>500 - Unauthorized or invalid client application credentials in WSDL API using SOAP 1.1</p></td></tr></tbody></table>

## Summary

The Basic Authentication: Simple policy protects an API by forcing applications to provide a
username and password when making requests.

The policy follows
[basic HTTP authentication standards](https://datatracker.ietf.org/doc/html/rfc7617).

When an error is encountered, the policy returns an "WWW-Authenticate" HTTP header field.

## Configuring Policy Parameters

### Mule Gateway

When you apply the Basic Authentication: Simple policy to an API, a request to that API must contain
the following header:

Authorization: Basic <username:password>

The `username:password` value must be a base64-encoded string. For example on a Mac OS X or Linux
system, the username and password requirement is implemented as:

`echo -n '<Client Id>:<Client Secret>' | base64`
