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

SAML 認証の問題:メッセージコンテキストが認証されない

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からの署名されていない応答はセキュリティの問題につながる可能性があるため、LiferayはIDPからの応答が署名されている場合にのみ認証を許可します。
    • 例えば、MiM(Middle Men)であれば、簡単にIdPからのレスポンスを改ざんしてSP(Liferay)に送信することができます。
  • 例: レスポンスが署名されていない場合、SPはレスポンスがそれぞれ設定されたIdPから来ているのか、どこか他の場所から来ているのかを認識することができないため、(個々のアサーションが署名されていても)レスポンスに署名するようにIdPを設定する必要があります。

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base