<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SSO with ThingWorx 9.3 and Azure Active Directory WITHOUT Ping Federate in ThingWorx Developers</title>
    <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/SSO-with-ThingWorx-9-3-and-Azure-Active-Directory-WITHOUT-Ping/m-p/781928#M57104</link>
    <description>&lt;P&gt;The parameter "&lt;SPAN&gt;authnContextAsPassword" was set to true in my sso-settings.json file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Removing the parameter resolved my issue.&lt;/P&gt;</description>
    <pubDate>Wed, 02 Mar 2022 16:22:30 GMT</pubDate>
    <dc:creator>pjahn</dc:creator>
    <dc:date>2022-03-02T16:22:30Z</dc:date>
    <item>
      <title>SSO with ThingWorx 9.3 and Azure Active Directory WITHOUT Ping Federate</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/SSO-with-ThingWorx-9-3-and-Azure-Active-Directory-WITHOUT-Ping/m-p/781811#M57099</link>
      <description>&lt;P&gt;I am currently trying to configure SSO with Azure AD in ThingWorx 9.3&amp;nbsp;&lt;STRONG&gt;without&lt;/STRONG&gt;&amp;nbsp;Ping Federate. Support for this was one of the new features introduced with version 9.2&lt;/P&gt;&lt;P&gt;I am following the guide provided by PTC here&amp;nbsp;&lt;A href="https://support.ptc.com/help/identity_and_access_management/en/index.html#page/iam/AzureADasCASandIdP.html" target="_blank" rel="noopener"&gt;https://support.ptc.com/help/identity_and_access_management/en/index.html#page/iam/AzureADasCASandIdP.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I was not successful. I am ending up with error messages in security log telling me that the SAML response is invalid.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This comes from AuthLog.log:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;2022-03-01 09:01:28.160+0100 [L: INFO] [O: o.s.s.s.l.SAMLDefaultLogger] [I: ] [U: ] [S: ] [P: ] [T: https-openssl-nio-443-exec-9] AuthNResponse;FAILURE;10.2.5.4;&lt;A href="https://twxdev06.techsoft.at/Thingworx;https://sts.windows.net/8c3fd900-8b7b-45cb-b2a0-aea95fa20530/;;;org.opensaml.common.SAMLException" target="_blank" rel="noopener"&gt;https://server.domain.com/Thingworx;https://sts.windows.net/8c3fd900-8b7b-45cb-b2a0-aea95fa20530/;;;org.opensaml.common.SAMLException&lt;/A&gt;: Response doesn't have any valid assertion which would pass subject validation__ at org.springframework.security.saml.websso.WebSSOProfileConsumerImpl.processAuthenticationResponse(WebSSOProfileConsumerImpl.java:265)__ at com.ptc.eauth.identity.saml2.PTCWebSSOProfileConsumerImpl.processAuthenticationResponse(PTCWebSSOProfileConsumerImpl.java:25)__ at org.springframework.security.saml.SAMLAuthenticationProvider.authenticate(SAMLAuthenticationProvider.java:88)__ at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:175)__ at org.springframework.security.saml.SAMLProcessingFilter.attemptAuthentication(SAMLProcessingFilter.java:92)__ at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:212)__ at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)__ at org.springframework.security.oauth2.client.filter.OAuth2ClientContextFilter.doFilter(OAuth2ClientContextFilter.java:60)__ at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)__ at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)__ at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)__ at org.springframework.security.saml.metadata.MetadataGeneratorFilter.doFilter(MetadataGeneratorFilter.java:87)__ at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)__ at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)__ at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)__ at com.thingworx.security.authentication.sso.ThingworxSSOAuthenticator.authenticate(ThingworxSSOAuthenticator.java:849)__ at com.thingworx.security.authentication.sso.ThingworxSSOAuthenticator.validateAuthenticationRequest(ThingworxSSOAuthenticator.java:1382)__ at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)__ at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)__ at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)__ at java.base/java.lang.reflect.Method.invoke(Method.java:566)__ at com.thingworx.security.authentication.AuthenticationUtilities.validateSSOAuthenticationRequest(AuthenticationUtilities.java:674)__ at com.thingworx.security.authentication.AuthenticationUtilities.validateAuthenticationRequest(AuthenticationUtilities.java:623)__ at com.thingworx.security.authentication.AuthenticationFilter.authenticate(AuthenticationFilter.java:488)__ at com.thingworx.security.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:260)__ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)__ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)__ at com.thingworx.security.contenttype.ContentTypeFilter.doFilter(ContentTypeFilter.java:143)__ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)__ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)__ at com.thingworx.security.filter.ValidationFilter.doFilter(ValidationFilter.java:22)__ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)__ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)__ at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)__ at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)__ at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)__ at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389)__ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)__ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)__ at com.thingworx.security.filter.ClickjackFilter.doFilter(ClickjackFilter.java:298)__ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)__ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)__ at com.thingworx.security.filter.HttpResponseHeadersFilter.doFilter(HttpResponseHeadersFilter.java:172)__ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)__ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)__ at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)__ at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)__ at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:667)__ at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)__ at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)__ at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)__ at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)__ at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)__ at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382)__ at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)__ at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)__ at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1726)__ at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)__ at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)__ at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)__ at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)__ at java.base/java.lang.Thread.run(Thread.java:829)__Caused by: org.springframework.security.authentication.InsufficientAuthenticationException: Response doesn't contain any of the requested authentication context class or declaration references__ at org.springframework.security.saml.websso.WebSSOProfileConsumerImpl.verifyAuthnContext(WebSSOProfileConsumerImpl.java:638)__ at org.springframework.security.saml.websso.WebSSOProfileConsumerImpl.verifyAuthenticationStatement(WebSSOProfileConsumerImpl.java:583)__ at org.springframework.security.saml.websso.WebSSOProfileConsumerImpl.verifyAssertion(WebSSOProfileConsumerImpl.java:342)__ at org.springframework.security.saml.websso.WebSSOProfileConsumerImpl.processAuthenticationResponse(WebSSOProfileConsumerImpl.java:250)__ ... 61 more__#&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I could not find out is how the regular expression in "validation.properties" mentioned &lt;A href="https://support.ptc.com/help/thingworx/platform/r9/en/index.html#page/ThingWorx/Help/Composer/Security/SSO/ConfigureValidationPropertiesFile.html" target="_blank" rel="noopener"&gt;here&lt;/A&gt; should look like for correctly validating the SAML response for Azure AD.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pjahn_0-1646213681694.png" style="width: 849px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/53748i11CA5166B975DDCF/image-dimensions/849x152?v=v2" width="849" height="152" role="button" title="pjahn_0-1646213681694.png" alt="pjahn_0-1646213681694.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The default REGEX is meant to work with Ping Federate:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Validator.HTTPParameterValue_SAMLResponse=^[a-zA-Z0-9+\/=]*$&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;Does anyone have a clue if this REGEX needs to be customized to fit for SAML responses from Azure AD? Maybe this helps me to get a working configuration.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 09:45:31 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/SSO-with-ThingWorx-9-3-and-Azure-Active-Directory-WITHOUT-Ping/m-p/781811#M57099</guid>
      <dc:creator>pjahn</dc:creator>
      <dc:date>2022-03-02T09:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: SSO with ThingWorx 9.3 and Azure Active Directory WITHOUT Ping Federate</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/SSO-with-ThingWorx-9-3-and-Azure-Active-Directory-WITHOUT-Ping/m-p/781846#M57102</link>
      <description>&lt;P&gt;I have the same regex in validation.properties&amp;nbsp;Validator.HTTPParameterValue_SAMLResponse=^[a-zA-Z0-9+\/=]*$ and it works fine for me with Azure AD( Without Ping). Seeing your exception, I don't think there is an issue with the validation file, I believe some settings are not correct (most likely on the Azure AD side). I would recommend you to use SAML traces and debug the issue in the SAML response.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 13:02:23 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/SSO-with-ThingWorx-9-3-and-Azure-Active-Directory-WITHOUT-Ping/m-p/781846#M57102</guid>
      <dc:creator>Mukul</dc:creator>
      <dc:date>2022-03-02T13:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: SSO with ThingWorx 9.3 and Azure Active Directory WITHOUT Ping Federate</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/SSO-with-ThingWorx-9-3-and-Azure-Active-Directory-WITHOUT-Ping/m-p/781871#M57103</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/467346"&gt;@Mukul&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;It is very helpful to know that you did not have to customize the regular expression.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 14:10:56 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/SSO-with-ThingWorx-9-3-and-Azure-Active-Directory-WITHOUT-Ping/m-p/781871#M57103</guid>
      <dc:creator>pjahn</dc:creator>
      <dc:date>2022-03-02T14:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: SSO with ThingWorx 9.3 and Azure Active Directory WITHOUT Ping Federate</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/SSO-with-ThingWorx-9-3-and-Azure-Active-Directory-WITHOUT-Ping/m-p/781928#M57104</link>
      <description>&lt;P&gt;The parameter "&lt;SPAN&gt;authnContextAsPassword" was set to true in my sso-settings.json file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Removing the parameter resolved my issue.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 16:22:30 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/SSO-with-ThingWorx-9-3-and-Azure-Active-Directory-WITHOUT-Ping/m-p/781928#M57104</guid>
      <dc:creator>pjahn</dc:creator>
      <dc:date>2022-03-02T16:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: SSO with ThingWorx 9.3 and Azure Active Directory WITHOUT Ping Federate</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/SSO-with-ThingWorx-9-3-and-Azure-Active-Directory-WITHOUT-Ping/m-p/782080#M57105</link>
      <description>&lt;P&gt;Glad to hear that you were able to resolve it.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2022 07:40:40 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/SSO-with-ThingWorx-9-3-and-Azure-Active-Directory-WITHOUT-Ping/m-p/782080#M57105</guid>
      <dc:creator>Mukul</dc:creator>
      <dc:date>2022-03-03T07:40:40Z</dc:date>
    </item>
  </channel>
</rss>

