概要
<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
- タスク バーで [サーバー マネージャー]をクリックします。
- [サーバー マネージャー] で、[管理] メニューを選択し、[役割と機能の追加] を選択します。
- [役割と機能の追加] ウィザードで、[次へ] をクリックします。 インストールの種類を選択し、[次へ] をクリックします。 対象サーバーを選択し、[次へ] をクリックします。
- [サーバー ロール] ページで、[Web サーバー (IIS)]、[Web サーバー] の順に展開し、[セキュリティ] を展開して、[クライアント証明書マッピング認証] を選択します。 次へ をクリックします。
.
- [機能の選択] ページで、[次へ] をクリックします。
- [インストール オプションの確認] ページで、[インストール] をクリックします。
- [結果] ページで、 [閉じる]をクリックします。
Windows 8 または Windows 8.1
- [スタート] 画面で、ポインターを左下隅まで移動し、[スタート] ボタンを右クリックし、[コントロール パネル] をクリックします。
- [コントロール パネル]で [プログラムと機能] をクリックし、[Windows の機能の有効化または無効化] をクリックします。
- [インターネット インフォメーション サービス] を展開し、[World Wide Web サービス] を展開し、[セキュリティ] を展開して、[クライアント証明書マッピング認証] を選択します。
- OK をクリックします。
- 閉じるをクリックします。
Windows Server 2008 または Windows Server 2008 R2
- タスク バーで [スタート] をクリックし、[管理ツール] をポイントして、[サーバー マネージャ] をクリックします。
- [サーバー マネージャ] 階層ウィンドウで [役割] を展開し、[Web サーバー (IIS)] をクリックします。
- [Web Server (IIS)] (Web サーバー (IIS)) ウィンドウで、[Role Services] (役割サービス) セクションまでスクロールし、[Add Role Services] (役割サービスの追加) をクリックします。
- 役割サービスの追加ウィザードの [役割サービスの選択] ページで、[クライアント証明書マッピング認証] を選択し、[次へ] をクリックします。
- [インストール オプションの確認] ページで、[インストール] をクリックします。
- [結果] ページで、 [閉じる]をクリックします。
Windows Vista または Windows 7
- タスク バーで、[スタート]、[コントロール パネル] の順にクリックします。
- [コントロール パネル]で [プログラムと機能] をクリックし、[Turn Windows Features on or off] (Windows の機能の有効化または無効化) をクリックします。
- [インターネット インフォメーション サービス] を展開し、[クライアント証明書マッピング認証] を選択し、[OK] をクリックします。
操作方法
サーバーのクライアント証明書マッピング認証を有効にする方法
インターネット インフォメーション サービス (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) マネージャー] をダブルクリックします。
[接続] ウィンドウで、サーバー名をクリックします。
構成
属性
属性 | 説明 |
---|---|
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()