locked
EWS接続での匿名認証について RRS feed

  • 質問

  • 環境1 Active Directoryサーバ
           Windors  Server 2008 R2
    環境2 Exchange server 2010 CASサーバ
           Windors  Server 2008 R2
           IIS7.5
    環境3 Exchange server 2010 MBサーバ
           Windors  Server 2008 R2

    現在、
    Exchange2010環境にてJavaを使用してexchange web serviceにダイジェスト認証で接続を行っています。

    この時Casサーバー側のIIS設定で、ダイジェスト認証を利用するために、Exchange Web Service(EWS)部分を
    ダイジェスト認証を有効にして、匿名認証を無効状態にしました。
    この状態で接続を実施するとエラーが発生し、接続に失敗しました。

    その時、発生したイベントログには以下のようなメッセージが出力されていました。
    --------------------------------------------------------------------------------------------------------------------------------------
    WebHost で要求の処理に失敗しました。
     送信者の情報: System.ServiceModel.ServiceHostingEnvironment+HostingManager/24230272
     例外: System.ServiceModel.ServiceActivationException: コンパイル中に例外が発生したためサービス '/EWS/exchange.asmx' をアクティブにできませんでした。例外メッセージ: このサービスのセキュリティ設定では 'Anonymous' 認証を必要としていますが、このサービスをホストする IIS アプリケーションではその認証方法が有効になっていません。。 ---> System.NotSupportedException: このサービスのセキュリティ設定では 'Anonymous' 認証を必要としていますが、このサービスをホストする IIS アプリケーションではその認証方法が有効になっていません。
     
       場所 System.ServiceModel.Channels.HttpChannelListener.ApplyHostedContext(VirtualPathExtension virtualPathExtension, Boolean isMetadataListener)
       場所 System.ServiceModel.Channels.HttpsChannelListener.ApplyHostedContext(VirtualPathExtension virtualPathExtension, Boolean isMetadataListener)
       場所 System.ServiceModel.Channels.HttpsTransportBindingElement.BuildChannelListener[TChannel](BindingContext context)
       場所 System.ServiceModel.Channels.BindingContext.BuildInnerChannelListener[TChannel]()
       場所 Microsoft.Exchange.Services.Wcf.MessageEncoderWithXmlDeclarationBindingElement.BuildChannelListener[TChannel](BindingContext context)
       場所 System.ServiceModel.Channels.BindingContext.BuildInnerChannelListener[TChannel]()
       場所 System.ServiceModel.Channels.Binding.BuildChannelListener[TChannel](Uri listenUriBaseAddress, String listenUriRelativeAddress, ListenUriMode listenUriMode, BindingParameterCollection parameters)
       場所 System.ServiceModel.Description.DispatcherBuilder.MaybeCreateListener(Boolean actuallyCreate, Type[] supportedChannels, Binding binding, BindingParameterCollection parameters, Uri listenUriBaseAddress, String listenUriRelativeAddress, ListenUriMode listenUriMode, ServiceThrottle throttle, IChannelListener& result, Boolean supportContextSession)
       場所 System.ServiceModel.Description.DispatcherBuilder.BuildChannelListener(StuffPerListenUriInfo stuff, ServiceHostBase serviceHost, Uri listenUri, ListenUriMode listenUriMode, Boolean supportContextSession, IChannelListener& result)
       場所 System.ServiceModel.Description.DispatcherBuilder.InitializeServiceHost(ServiceDescription description, ServiceHostBase serviceHost)
       場所 System.ServiceModel.ServiceHostBase.InitializeRuntime()
       場所 System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
       場所 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       場所 System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath)
       場所 System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
       --- 内部例外スタック トレースの終わり ---
       場所 System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
       場所 System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath)
     プロセス名: w3wp
     プロセス ID: 940
    --------------------------------------------------------------------------------------------------------------------------------------

    エラーの内容から、匿名認証が原因と思い、匿名認証を有効にしたところ、問題なく接続を行うことが出来ました。

    しかし、匿名認証を有効化していては、ダイジェスト認証での接続が行われていないのではないかと思われるため、
    Exchange上で認証方式を設定する方法がないか探した所、管理シェルのSet-WebServicesVirtualDirectoryで
    ダイジェスト認証を変更する方法を発見しました。

    そこで、その方法を用いて、設定を行った所、接続は出来るようになったのですが、IIS7.5上の認証を確認した所、
    匿名認証が有効になっていました。

    そこで質問なのですが、
    1.Exchange Web Serviceにダイジェスト認証を用いて接続を行う場合、匿名認証は有効するものなのでしょうか。
      公開されているマニュアルや検索にて探してみたのですが発見する事が出来ませんでした。
     
    2.Exchange Web Serviceの匿名認証を有効とした場合、セキュリティ的な問題はないのでしょうか。

    よろしくお願いします。

    2011年2月16日 6:00

回答

  • 返信ありがとうございます。

    本件につきましては、有償サポートにて回答を頂きました。

    結論としましては、
    EWSに関する認証処理は、EWSに対するIISの「匿名認証」の有効を前提とした機能が実装されています。そのため、EWSに対するIISの「匿名認証」を有効する必要があります。
    なお、実際の認証処理は、WCFにて実施しているため、セキュリティ的な問題は報告されていないそうです。

    • 回答としてマーク 関白 2011年3月9日 2:52
    2011年3月9日 2:52

すべての返信

  • 関白さん
    こんにちは、フォーラム オペレーターの星 睦美です。

    私のほうでも探してみたところ、英語のサイトですが関連した情報がありましたのでご紹介します。

    ・iis.net :Home > Configuration Reference > system.webServer > security > authentication > digestAuthentication:(英語)
    http://www.iis.net/ConfigReference/system.webServer/security/authentication/digestAuthentication

    (抜粋)
    Setup
    The default installation of IIS 7 does not include the Digest authentication role service. To use Digest authentication on IIS 7, you must install the role service, disable Anonymous authentication for your Web site or application, and then enable Digest authentication for the site or application.

    ダイジェスト認証を使用する際には匿名認証を無効にして、それからダイジェスト認証を有効にする必要があるようです。

    参考までに、Exchange Server 2010 の既定の認証についてのTechNet ライブラリの説明もご紹介します。

    Default Authentication Settings for Exchange-related Virtual Directories:(英語)
    http://technet.microsoft.com/en-us/library/gg247612.aspx

    お役にたちましたら幸いです。


    日本マイクロソフト株式会社 フォーラム オペレーター 星 睦美
    2011年2月22日 6:59
  • 返信ありがとうございます。

    本件につきましては、有償サポートにて回答を頂きました。

    結論としましては、
    EWSに関する認証処理は、EWSに対するIISの「匿名認証」の有効を前提とした機能が実装されています。そのため、EWSに対するIISの「匿名認証」を有効する必要があります。
    なお、実際の認証処理は、WCFにて実施しているため、セキュリティ的な問題は報告されていないそうです。

    • 回答としてマーク 関白 2011年3月9日 2:52
    2011年3月9日 2:52
  • 関白 さん、情報をお知らせいただきありがとうございます。

    大変参考になります。
    これからもTechNet フォーラムをよろしくお願いします。


    日本マイクロソフト株式会社 フォーラム オペレーター 星 睦美
    2011年3月9日 5:37