---
schema_version: "1"
id: 3a731855fa9dabffdd56588f469ee60725b4e72a2c8bd368578bc5830702d111
title: "基本認証: 簡易ポリシー"
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/mule-gateway/policies-included-basic-auth-simple.md
canonical_url: https://docs.mulesoft.com/jp/mule-gateway/policies-included-basic-auth-simple
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 12d3591ab475d5c989473c2c1d940f19225182720e7eb75bd883e5dc627d33c1
description: MuleSoft Documentation Site
latest: true
---
# 基本認証: 簡易ポリシー

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 25%;">
<col style="width: 75%;">
</colgroup>
<tbody>
<tr>
<td class="tableblock halign-right valign-top"><p class="tableblock"><strong>ポリシー名</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">基本認証: シンプル</p></td>
</tr>
<tr>
<td class="tableblock halign-right valign-top"><p class="tableblock"><strong>概要</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">1 つのユーザー-パスワードを使用して基本認証メカニズムに基づいてアクセスを許可する</p></td>
</tr>
<tr>
<td class="tableblock halign-right valign-top"><p class="tableblock"><strong>カテゴリ</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">セキュリティ</p></td>
</tr>
<tr>
<td class="tableblock halign-right valign-top"><p class="tableblock"><strong>使用可能な最小 Mule バージョン</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">v4.0.0</p></td>
</tr>
<tr>
<td class="tableblock halign-right valign-middle"><p class="tableblock"><strong>返される状況コード</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">400 - SOAP 1.2 を使用した WSDL API での未承認または無効なクライアントアプリケーションのログイン情報</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">401 - HTTP または RAML API での未承認または無効なクライアントアプリケーションのログイン情報</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">500 - SOAP 1.1 を使用した WSDL API での未承認または無効なクライアントアプリケーションのログイン情報</p></td>
</tr>
</tbody>
</table>

## [](#概要)概要

基本認証: 簡易ポリシーは、要求を出すアプリケーションに対してユーザー名とパスワードを強制的に提供させることで API を保護します。

このポリシーは、 [基本 HTTP 認証標準](https://tools.ietf.org/html/rfc7617)​に準拠します。

エラーに遭遇すると、このポリシーは「WWW-Authenticate」 HTTP ヘッダー項目を返します。

## [](#ポリシーのパラメーターの設定)ポリシーのパラメーターの設定

### [](#mule-ゲートウェイ)Mule ゲートウェイ

基本認証: 簡易ポリシーを API に適用した後は、その API への要求に次のヘッダーを含める必要があります。

Authorization: Basic <username:password>

`username:password`​ の値は Base64 でエンコードされた文字列である必要があります。たとえば、Mac OS X や Linux システムでは、ユーザー名とパスワードの要件は次のように実装されます。

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