クライアント証明書マッピング認証 <clientCertificateMappingAuthentication>

概要

<authentication> 要素の <clientCertificateMappingAuthentication> 要素は、Active Directory を使用したクライアント証明書マッピングがインターネット インフォメーション サービス (IIS) 7 に対して有効かどうかを指定します。

Note

Active Directory を使用したクライアント証明書マッピング認証は、次の点で IIS を使用したクライアント証明書マッピング認証とは異なります。

  • Active Directory を使用したクライアント証明書マッピング認証 - この認証方法では、IIS 7 サーバーが Active Directory ドメインのメンバーであり、ユーザー アカウントが Active Directory に格納されている必要があります。 この方法のクライアント証明書認証では、Active Directory サーバーへのラウンドトリップによりパフォーマンスが低下しました。
  • IIS クライアント証明書マッピング認証 - この認証方法では Active Directory は必要ないため、スタンドアロン サーバーで動作します。 この方法のクライアント証明書認証ではパフォーマンスが向上しましたが、マッピングを作成するには、より多くの構成が必要であり、クライアント証明書へのアクセスが必要です。

詳細については、Microsoft TechNet Web サイトの「IIS 7.0 での認証の構成」を参照してください。

互換性

バージョン メモ
IIS 10.0 <clientCertificateMappingAuthentication> 要素は、IIS 10.0 では変更されませんでした。
IIS 8.5 <clientCertificateMappingAuthentication> 要素は、IIS 8.5 では変更されませんでした。
IIS 8.0 <clientCertificateMappingAuthentication> 要素は IIS 8.0 では変更されませんでした。
IIS 7.5 <clientCertificateMappingAuthentication> 要素は IIS 7.5 では変更されませんでした。
IIS 7.0 <authentication> 要素の <clientCertificateMappingAuthentication> 要素は IIS 7.0 で導入されました。
IIS 6.0 該当なし

段取り

<clientCertificateMappingAuthentication> 要素は、IIS 7 以降の既定のインストールでは使用できません。 インストールするには、次の手順を使用します。

Windows Server 2012 または Windows Server 2012 R2

  1. タスク バーで [サーバー マネージャー]をクリックします。
  2. [サーバー マネージャー] で、[管理] メニューをクリックし、[役割と機能の追加] をクリックします。
  3. 役割と機能の追加ウィザードで、[次へ] をクリックします。 [インストールの種類] を選択し、[次へ] をクリックします。 対象サーバーを選択し、[次へ] をクリックします。
  4. [サーバー ロール] ページで、[Web サーバー (IIS)][Web サーバー] の順に展開し、[セキュリティ] を展開して、[クライアント証明書マッピング認証] を選択します。 次へ をクリックします。
    Image of Web Server and Security pane expanded with Client Certificate Mapping Authentication selected.
  5. [機能の選択] ページで、[次へ] をクリックします。
  6. [インストール オプションの確認] ページで、[インストール] をクリックします。
  7. [結果] ページで、 [閉じる]をクリックします。

Windows 8 または Windows 8.1

  1. [スタート] 画面で、ポインターを左下隅まで移動し、[スタート] ボタンを右クリックし、[コントロール パネル] をクリックします。
  2. [コントロール パネル][プログラムと機能] をクリックし、[Windows の機能の有効化または無効化] をクリックします。
  3. [インターネット インフォメーション サービス] を展開し、[World Wide Web サービス] を展開し、[セキュリティ] を展開して、[クライアント証明書マッピング認証] を選択します。
    Screenshot of World Wide Web Services pane expanded and Client Certificate Mapping Authentication selected.
  4. OK をクリックします。
  5. 閉じるをクリックします。

Windows Server 2008 または Windows Server 2008 R2

  1. タスク バーで [スタート] をクリックし、[管理ツール] をポイントして、[サーバー マネージャー] をクリックします。
  2. [Server Manager] (サーバー マネージャー) 階層ウィンドウで [ロール] を展開し、[Web Server (IIS)] (Web サーバー (IIS)) をクリックします。
  3. [Web Server (IIS)] (Web サーバー (IIS)) ウィンドウで、[Role Services] (役割サービス) セクションまでスクロールし、[Add Role Services] (役割サービスの追加) をクリックします。
  4. 役割サービスの追加ウィザード[役割サービスの選択] ページで、[クライアント証明書マッピング認証] を選択し、[次へ] をクリックします。
    Image of Select Role Services page with Security pane expanded and Client Certificate Mapping Authentication selected.
  5. [インストール オプションの確認] ページで、[インストール] をクリックします。
  6. [結果] ページで、 [閉じる]をクリックします。

Windows Vista または Windows 7

  1. タスク バーで、[スタート][コントロール パネル] の順にクリックします。
  2. [コントロール パネル][プログラムと機能] をクリックし、[Turn Windows Features on or off] (Windows の機能の有効化または無効化) をクリックします。
  3. [インターネット インフォメーション サービス] を展開し、[クライアント証明書マッピング認証] を選択し、[OK] をクリックします。
    Screenshot of Internet Information Services pane expanded and Client Certificated Mapping Authentication highlighted.

操作方法

サーバーのクライアント証明書マッピング認証を有効にする方法

  1. インターネット インフォメーション サービス (IIS) マネージャーを開きます。

    • Windows Server 2012 または Windows Server 2012 R2 を使用している場合:

      • タスク バーで、[サーバー マネージャー] をクリックし、[ツール][インターネット インフォメーション サービス (IIS) マネージャー] の順にクリックします。
    • Windows 8 または Windows 8.1 を使用している場合:

      • Windows キーを押しながら文字 X を押し、[コントロール パネル] をクリックします。
      • [管理ツール] をクリックし、[インターネット インフォメーション サービス (IIS) マネージャー] をダブルクリックします。
    • Windows Server 2008 または Windows Server 2008 R2 を使用している場合:

      • タスク バーで、[スタート] ボタンをクリックし、[管理ツール][インターネット インフォメーション サービス (IIS) マネージャー] の順にクリックします。
    • Windows Vista または Windows 7 を使用している場合:

      • タスク バーで、[スタート][コントロール パネル] の順にクリックします。
      • [管理ツール] をダブルクリックし、[インターネット インフォメーション サービス (IIS) マネージャー] をダブルクリックします。
  2. [接続] ウィンドウで、サーバー名をクリックします。

  3. サーバーの [ホーム] ウィンドウで、[認証] をダブルクリックします。
    Screenshot of servers Home pane displaying Authentication highlighted.

  4. [認証] ページで、[操作] ウィンドウの [有効] をクリックします。
    Image of Actions pane in Authentication page displaying Active Directory Client Certificate Authentication option highlighted.

構成

属性

属性 説明
enabled 省略可能な Boolean 属性です。

Active Directory を使用したクライアント証明書マッピング認証を有効にするかどうかを指定します。 この設定を有効にするには、IIS マネージャーでこの属性を設定する必要があります。 他の方法を使用してこの属性を設定する場合は、設定を有効にするために Web サーバーを再起動する必要があります。

既定値は false です。

子要素

なし。

構成サンプル

次の構成サンプルでは、既定の Web サイトに対して Active Directory を使用したクライアント証明書マッピング認証を有効にし、SSL を要求してクライアント証明書をネゴシエートするようにサイトを構成します。

<location path="Default Web Site">
   <system.webServer>
      <security>
         <access sslFlags="Ssl, SslNegotiateCert" />
          <authentication>
            <windowsAuthentication enabled="false" />
            <anonymousAuthentication enabled="false" />
            <digestAuthentication enabled="false" />
            <basicAuthentication enabled="false" />
            <clientCertificateMappingAuthentication enabled="true" />
         </authentication>
     </security>
   </system.webServer>
</location>

サンプル コード

次のコードサンプルでは、既定の Web サイトに対して Active Directory を使用したクライアント証明書マッピング認証を有効にし、SSL を要求してクライアント証明書をネゴシエートするようにサイトを構成します。

AppCmd.exe

appcmd.exe set config "Default Web Site" -section:system.webServer/security/authentication/clientCertificateMappingAuthentication /enabled:"True" /commit:apphost

appcmd.exe set config "Default Web Site" -section:system.webServer/security/access /sslFlags:"Ssl, SslNegotiateCert" /commit:apphost

Note

AppCmd.exe を使用してこれらの設定を構成する場合は、commit パラメーターを必ず apphost に設定する必要があります。 これにより、ApplicationHost.config ファイルの適切な場所セクションに構成設定がコミットされます。

C#

using System;
using System.Text;
using Microsoft.Web.Administration;

internal static class Sample
{
   private static void Main()
   {
      using (ServerManager serverManager = new ServerManager())
      {
         Configuration config = serverManager.GetApplicationHostConfiguration();

         ConfigurationSection clientCertificateMappingAuthenticationSection = config.GetSection("system.webServer/security/authentication/clientCertificateMappingAuthentication", "Default Web Site");
         clientCertificateMappingAuthenticationSection["enabled"] = true;

         ConfigurationSection accessSection = config.GetSection("system.webServer/security/access", "Default Web Site");
         accessSection["sslFlags"] = @"Ssl, SslNegotiateCert";

         serverManager.CommitChanges();
      }
   }
}

VB.NET

Imports System
Imports System.Text
Imports Microsoft.Web.Administration

Module Sample

   Sub Main()
      Dim serverManager As ServerManager = New ServerManager
      Dim config As Configuration = serverManager.GetApplicationHostConfiguration

      Dim clientCertificateMappingAuthenticationSection As ConfigurationSection = config.GetSection("system.webServer/security/authentication/clientCertificateMappingAuthentication", "Default Web Site")
      clientCertificateMappingAuthenticationSection("enabled") = True

      Dim accessSection As ConfigurationSection = config.GetSection("system.webServer/security/access", "Default Web Site")
      accessSection("sslFlags") = "Ssl, SslNegotiateCert"

      serverManager.CommitChanges()
   End Sub

End Module

JavaScript

var adminManager = new ActiveXObject('Microsoft.ApplicationHost.WritableAdminManager');
adminManager.CommitPath = "MACHINE/WEBROOT/APPHOST";

var clientCertificateMappingAuthenticationSection = adminManager.GetAdminSection("system.webServer/security/authentication/clientCertificateMappingAuthentication", "MACHINE/WEBROOT/APPHOST/Default Web Site");
clientCertificateMappingAuthenticationSection.Properties.Item("enabled").Value = true;

var accessSection = adminManager.GetAdminSection("system.webServer/security/access", "MACHINE/WEBROOT/APPHOST/Default Web Site");
accessSection.Properties.Item("sslFlags").Value = "Ssl, SslNegotiateCert";

adminManager.CommitChanges();

VBScript

Set adminManager = WScript.CreateObject("Microsoft.ApplicationHost.WritableAdminManager")
adminManager.CommitPath = "MACHINE/WEBROOT/APPHOST"

Set clientCertificateMappingAuthenticationSection = adminManager.GetAdminSection("system.webServer/security/authentication/clientCertificateMappingAuthentication", "MACHINE/WEBROOT/APPHOST/Default Web Site")
clientCertificateMappingAuthenticationSection.Properties.Item("enabled").Value = True

Set accessSection = adminManager.GetAdminSection("system.webServer/security/access", "MACHINE/WEBROOT/APPHOST/Default Web Site")
accessSection.Properties.Item("sslFlags").Value = "Ssl, SslNegotiateCert"

adminManager.CommitChanges()