legacy-knowledge-base
公開されました Jul. 2, 2025

SAML 認証の問題: Azure AD が IDP の場合、メッセージ コンテキストが認証されませんでした

written-by

Sivakumar Perumal

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • SAML を有効にした後、ユーザーがログインしようとすると、次のメッセージで認証が失敗しました。
    ERROR [http-nio-8080-exec-36][BaseSamlStrutsAction:59] org.opensaml.messaging.handler.MessageHandlerException: Message context was not authenticated
    Caused by: org.opensaml.messaging.handler.MessageHandlerException: Message context was not authenticated
    at org.opensaml.messaging.handler.impl.CheckMandatoryAuthentication.doInvoke(CheckMandatoryAuthentication.java:70)
    at org.opensaml.messaging.handler.AbstractMessageHandler.invoke(AbstractMessageHandler.java:95)
    at org.opensaml.messaging.handler.impl.BasicMessageHandlerChain.doInvoke(BasicMessageHandlerChain.java:87)
    at org.opensaml.messaging.handler.AbstractMessageHandler.invoke(AbstractMessageHandler.java:95)
    at com.liferay.saml.opensaml.integration.internal.servlet.profile.BaseProfile.decodeSamlMessage(BaseProfile.java:202)
    at com.liferay.saml.opensaml.integration.internal.servlet.profile.WebSsoProfileImpl.doProcessResponse(WebSsoProfileImpl.java:618)
    at com.liferay.saml.opensaml.integration.internal.servlet.profile.WebSsoProfileImpl.processResponse(WebSsoProfileImpl.java:198)

環境

  • サービスプロバイダーとしてのLiferay DXP 7.2
  • IDP としての Azure AD

解決

  • Liferay は、IDP からの応答が署名されている場合にのみ認証を許可します。これは、IDP からの署名されていない応答がセキュリティ上の問題につながる可能性があるためです。
    • たとえば、MiM (Middle Men) は、IdP からの応答を簡単に改ざんして SP (Liferay) に送信できます。
  • 例: 応答が署名されていない場合、SP は、応答がそれぞれの構成済み IdP からのものか、別の場所からのものかを認識できないため、(個々のアサーションが署名されている場合でも)応答に署名するように IdP を構成する必要があります。
  • ただし、Azure ADでは、署名オプションと署名アルゴリズムにより、署名付き応答の選択が容易になり、この方法で IDP からの応答が署名されます。
did-this-article-resolve-your-issue

legacy-knowledge-base