主体传播在最新版本的 SAP Cloud SDK 中不起作用
Principal Propagation is not working in the latest version of SAP Cloud SDK
它在 SAP Cloud SDK 版本 3.7.0 到 3.10.0 中有效,但在 3.11.0 到 3.13.0 的最新版本中失败。
我在 SAP Cloud Platform 上部署了两个应用程序。一个是基于 SAP Cloud SDK 的云 java 应用程序,使用使用主体传播配置的目标。另一个是应用路由器。
Principal Propagation的所有相关配置均在Cloud Connector和后端on-premise系统中完成。我们还在 SAP Cloud Platform 中设置了自己的身份提供者。
让我介绍一下我们想要实现的目标。
用户使用我们自己的 IDP 从应用程序路由器登录到云应用程序,然后使用在目标中配置的相同用户(不同于基本身份验证中的技术用户)从 S4 本地系统获取一些数据。
我在 java 应用程序中做了什么来从 S4 系统调用开票凭证。
public List<BillingDocument> getAllBillingdocuments() throws BusinessException {
ResilienceConfiguration resilienceConfig = ResilienceConfiguration.of(MyBillingDocumentService.class)
.cacheConfiguration(CacheConfiguration.of(Duration.ofSeconds(10))
.withoutParameters()); // Cache key
List<BillingDocument> billingDocuments;
try {
billingDocuments = ResilienceDecorator.executeCallable(() -> bdService.getAllBillingDocument()
.execute(DestinationUtil.getHttpDestinationS4XSSO()),
resilienceConfig);
} catch (Exception e) {
e.printStackTrace();
throw BusinessException.convert(e);
}
return billingDocuments;
}
我会省略应用路由器的配置。我保证是正确的。
问题是用户可以使用我们自己的 IDP 通过应用程序路由器登录到云 java 应用程序,但是当 he/she 想通过以下 [=47] 从 S4 预置系统获取数据时=], 总是出现这个错误。
https://****.cfapps.***.hana.ondemand.com/test311/billingdocument
来自 java 应用程序的详细错误日志:
2020-02-17T06:01:22.948+0000 [APP/PROC/WEB/0] OUT { "written_at":"2020-02-17T06:01:22.945Z","written_ts":277856327935563,"tenant_id":"-","component_type":"application","component_id":"***","space_name":"***","component_name":"TestVer3.11_service","component_instance":"0","organization_id":"-","correlation_id":"-","organization_name":"-","space_id":"240338f7-479a-402f-bb31-f3aaf5c90406","container_id":"10.0.137.28","type":"log","logger":"com.sap.cloud.sdk.odatav2.connectivity.cache.metadata.GuavaMetadataCache","thread":"cloudsdk-resilience-0","level":"ERROR","categories":[],"msg":"Error occurred while populating metadata: ","stacktrace":["com.sap.cloud.sdk.datamodel.odata.helper.ODataVdmErrorResultHandler$ErpODataException: The endpoint responded with HTTP error code 401.nnFull error message: nSSO token validation failed. Make sure trust is configured correctly in the cloud connector to enable principal propagation, if token has not expired yet.","tat com.sap.cloud.sdk.datamodel.odata.helper.ODataVdmErrorResultHandler.createException(ODataVdmErrorResultHandler.java:117)","tat com.sap.cloud.sdk.datamodel.odata.helper.ODataVdmErrorResultHandler.createError(ODataVdmErrorResultHandler.java:97)","tat com.sap.cloud.sdk.datamodel.odata.helper.ODataVdmErrorResultHandler.createError(ODataVdmErrorResultHandler.java:33)","tat com.sap.cloud.sdk.odatav2.connectivity.internal.ODataConnectivityUtil.checkHttpStatus(ODataConnectivityUtil.java:219)","tat com.sap.cloud.sdk.odatav2.connectivity.cache.metadata.GuavaMetadataCache.getEdm(GuavaMetadataCache.java:239)","tat com.sap.cloud.sdk.odatav2.connectivity.cache.metadata.GuavaMetadataCache.getEdm(GuavaMetadataCache.java:156)","tat com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.loadMetadata(ODataQuery.java:379)","tat com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.loadEntriesFromDestination(ODataQuery.java:310)","tat com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.internalExecute(ODataQuery.java:253)","tat com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.execute(ODataQuery.java:151)","tat com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.execute(ODataQuery.java:135)","tat com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperRead.execute(FluentHelperRead.java:250)","tat com.bosch.test.service.MyBillingDocumentService.lambda$getAllBillingdocuments[=11=](MyBillingDocumentService.java:55)","tat com.sap.cloud.sdk.cloudplatform.thread.ThreadContextCallable.call(ThreadContextCallable.java:247)","tat com.sap.cloud.sdk.cloudplatform.thread.AbstractThreadContextExecutor.execute(AbstractThreadContextExecutor.java:293)","tat com.sap.cloud.sdk.frameworks.resilience4j.Resilience4jDecorationStrategy.lambda$decorateCallable(Resilience4jDecorationStrategy.java:107)","tat java.util.concurrent.FutureTask.run(FutureTask.java:266)","tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)","tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)","tat java.lang.Thread.run(Thread.java:836)"] }
2020-02-17T06:01:23.168+0000 [APP/PROC/WEB/0] OUT { "written_at":"2020-02-17T06:01:23.167Z","written_ts":277856550010598,"tenant_id":"-","component_type":"application","component_id":"***","space_name":"***","component_name":"TestVer3.11_service","component_instance":"0","organization_id":"-","correlation_id":"-","organization_name":"-","space_id":"240338f7-479a-402f-bb31-f3aaf5c90406","container_id":"10.0.137.28","type":"log","logger":"com.sap.cloud.sdk.odatav2.connectivity.cache.metadata.GuavaMetadataCache","thread":"cloudsdk-resilience-0","level":"ERROR","categories":[],"msg":"Error occurred while populating metadata: ","stacktrace":["com.sap.cloud.sdk.datamodel.odata.helper.ODataVdmErrorResultHandler$ErpODataException: The endpoint responded with HTTP error code 401.nnFull error message: nSSO token validation failed. Make sure trust is configured correctly in the cloud connector to enable principal propagation, if token has not expired yet.","tat com.sap.cloud.sdk.datamodel.odata.helper.ODataVdmErrorResultHandler.createException(ODataVdmErrorResultHandler.java:117)","tat com.sap.cloud.sdk.datamodel.odata.helper.ODataVdmErrorResultHandler.createError(ODataVdmErrorResultHandler.java:97)","tat com.sap.cloud.sdk.datamodel.odata.helper.ODataVdmErrorResultHandler.createError(ODataVdmErrorResultHandler.java:33)","tat com.sap.cloud.sdk.odatav2.connectivity.internal.ODataConnectivityUtil.checkHttpStatus(ODataConnectivityUtil.java:219)","tat com.sap.cloud.sdk.odatav2.connectivity.cache.metadata.GuavaMetadataCache.getEdm(GuavaMetadataCache.java:239)","tat com.sap.cloud.sdk.odatav2.connectivity.cache.metadata.GuavaMetadataCache.getEdm(GuavaMetadataCache.java:156)","tat com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.loadMetadata(ODataQuery.java:379)","tat com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.loadEntriesFromDestination(ODataQuery.java:310)","tat com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.internalExecute(ODataQuery.java:253)","tat com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.retryExecuteWithCompleteUrl(ODataQuery.java:172)","tat com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.execute(ODataQuery.java:157)","tat com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.execute(ODataQuery.java:135)","tat com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperRead.execute(FluentHelperRead.java:250)","tat com.bosch.test.service.MyBillingDocumentService.lambda$getAllBillingdocuments[=11=](MyBillingDocumentService.java:55)","tat com.sap.cloud.sdk.cloudplatform.thread.ThreadContextCallable.call(ThreadContextCallable.java:247)","tat com.sap.cloud.sdk.cloudplatform.thread.AbstractThreadContextExecutor.execute(AbstractThreadContextExecutor.java:293)","tat com.sap.cloud.sdk.frameworks.resilience4j.Resilience4jDecorationStrategy.lambda$decorateCallable(Resilience4jDecorationStrategy.java:107)","tat java.util.concurrent.FutureTask.run(FutureTask.java:266)","tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)","tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)","tat java.lang.Thread.run(Thread.java:836)"] }
2020-02-17T06:01:23.171+0000 [APP/PROC/WEB/0] ERR com.sap.cloud.sdk.cloudplatform.resilience.ResilienceRuntimeException: com.sap.cloud.sdk.cloudplatform.resilience.ResilienceRuntimeException: com.sap.cloud.sdk.cloudplatform.thread.exception.ThreadContextExecutionException: com.sap.cloud.sdk.odatav2.connectivity.ODataException: Unable to fetch the metadata : Failed to execute OData Metadata request.
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.frameworks.resilience4j.Resilience4jDecorationStrategy.lambda$null(Resilience4jDecorationStrategy.java:123)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at io.vavr.control.Try.onFailure(Try.java:659)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.frameworks.resilience4j.Resilience4jDecorationStrategy.lambda$decorateCallable(Resilience4jDecorationStrategy.java:122)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.cloudplatform.resilience.ResilienceDecorationStrategy.executeCallable(ResilienceDecorationStrategy.java:184)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.cloudplatform.resilience.ResilienceDecorator.executeCallable(ResilienceDecorator.java:197)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at com.bosch.test.service.MyBillingDocumentService.getAllBillingdocuments(MyBillingDocumentService.java:54)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at com.bosch.test.controllers.MyBillingDocumentController.getAllBillingDocuments(MyBillingDocumentController.java:32)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at java.lang.reflect.Method.invoke(Method.java:498)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:888)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.cloudplatform.servlet.RequestAccessorFilter.lambda$doFilter(RequestAccessorFilter.java:71)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.cloudplatform.thread.AbstractThreadContextExecutor.lambda$execute[=11=](AbstractThreadContextExecutor.java:317)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.cloudplatform.thread.ThreadContextCallable.call(ThreadContextCallable.java:247)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.cloudplatform.thread.AbstractThreadContextExecutor.execute(AbstractThreadContextExecutor.java:319)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.cloudplatform.servlet.RequestAccessorFilter.doFilter(RequestAccessorFilter.java:71)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:118)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:158)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter.doFilter(OAuth2AuthenticationProcessingFilter.java:180)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:92)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:77)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:526)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:747)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1579)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at java.lang.Thread.run(Thread.java:836)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR Caused by: com.sap.cloud.sdk.cloudplatform.resilience.ResilienceRuntimeException: com.sap.cloud.sdk.cloudplatform.thread.exception.ThreadContextExecutionException: com.sap.cloud.sdk.odatav2.connectivity.ODataException: Unable to fetch the metadata : Failed to execute OData Metadata request.
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.frameworks.resilience4j.DefaultCachingDecorator.lambda$decorateCallable[=11=](DefaultCachingDecorator.java:124)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at io.vavr.control.Try.of(Try.java:75)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at io.vavr.control.Try.ofCallable(Try.java:105)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.frameworks.resilience4j.Resilience4jDecorationStrategy.lambda$decorateCallable(Resilience4jDecorationStrategy.java:118)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR ... 95 more
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR Caused by: com.sap.cloud.sdk.cloudplatform.thread.exception.ThreadContextExecutionException: com.sap.cloud.sdk.odatav2.connectivity.ODataException: Unable to fetch the metadata : Failed to execute OData Metadata request.
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.cloudplatform.thread.AbstractThreadContextExecutor.execute(AbstractThreadContextExecutor.java:299)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.frameworks.resilience4j.Resilience4jDecorationStrategy.lambda$decorateCallable(Resilience4jDecorationStrategy.java:107)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at java.util.concurrent.FutureTask.run(FutureTask.java:266)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR ... 1 more
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR Caused by: com.sap.cloud.sdk.odatav2.connectivity.ODataException: Unable to fetch the metadata : Failed to execute OData Metadata request.
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.loadEntriesFromDestination(ODataQuery.java:312)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.internalExecute(ODataQuery.java:253)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.retryExecuteWithCompleteUrl(ODataQuery.java:172)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.execute(ODataQuery.java:157)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.execute(ODataQuery.java:135)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperRead.execute(FluentHelperRead.java:250)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at com.bosch.test.service.MyBillingDocumentService.lambda$getAllBillingdocuments[=11=](MyBillingDocumentService.java:55)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.cloudplatform.thread.ThreadContextCallable.call(ThreadContextCallable.java:247)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.cloudplatform.thread.AbstractThreadContextExecutor.execute(AbstractThreadContextExecutor.java:293)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR ... 5 more
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR Caused by: com.sap.cloud.sdk.datamodel.odata.helper.ODataVdmErrorResultHandler$ErpODataException: The endpoint responded with HTTP error code 401.
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR Full error message:
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR SSO token validation failed. Make sure trust is configured correctly in the cloud connector to enable principal propagation, if token has not expired yet.
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.datamodel.odata.helper.ODataVdmErrorResultHandler.createException(ODataVdmErrorResultHandler.java:117)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.datamodel.odata.helper.ODataVdmErrorResultHandler.createError(ODataVdmErrorResultHandler.java:97)
2020-02-17T06:01:23.178+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.datamodel.odata.helper.ODataVdmErrorResultHandler.createError(ODataVdmErrorResultHandler.java:33)
2020-02-17T06:01:23.178+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.odatav2.connectivity.internal.ODataConnectivityUtil.checkHttpStatus(ODataConnectivityUtil.java:219)
2020-02-17T06:01:23.178+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.odatav2.connectivity.cache.metadata.GuavaMetadataCache.getEdm(GuavaMetadataCache.java:239)
2020-02-17T06:01:23.178+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.odatav2.connectivity.cache.metadata.GuavaMetadataCache.getEdm(GuavaMetadataCache.java:156)
设置默认的 PrincipalPropagationStrategy
public static HttpDestination getHttpDestinationS4XSSO() {
PrincipalPropagationStrategy.setDefaultStrategy(PrincipalPropagationStrategy.COMPATIBILITY);
Destination destination = DestinationAccessor.getDestination("S4X_HTTP_SSO");
return destination.asHttp().decorate(DefaultErpHttpDestination::new);
}
错误消息 SSO token validation failed. Make sure trust is configured correctly in the cloud connector to enable principal propagation, if token has not expired yet.
表示 Cloud Connector 和 Cloud Foundry 之间存在 outdated/wrong/lacking 信任配置。
请根据其 official documentation 重新考虑信任配置,特别是执行标题 'Configure Trusted Entities in the Cloud Connector' 下面的步骤
更新:
我们修复了报告的 SAP Cloud SDK 问题 3.16.1
如果可能,请相应地更新依赖项。
原回答:
SAP Cloud SDK采用了推荐的选项来实现用户传播,参见
SAP Cloud Platform Connectivity: Configure Principal Propagation via User Exchange Token
但是,如果推荐的选项不适合您,则可以改用旧做法:兼容性 选项。只需在您的应用程序代码中调用一次以下方法:
import com.sap.cloud.sdk.cloudplatform.connectivity.PrincipalPropagationStrategy;
PrincipalPropagationStrategy.setDefaultStrategy(PrincipalPropagationStrategy.COMPATIBILITY);
这将有效地还原您在版本 3.10.0
和 3.11.0
之间遇到的更改。
我们发现 3.11.0
及以后的实施存在潜在问题。在解决此问题之前,请尝试使用以下快速解决方法来解析 HttpDestination。与此同时,我们正在努力修复下一个版本:
private HttpDestination getHttpDestination( final String destinationName ) {
Destination destination = DestinationAccessor.tryGetDestination(destinationName).get();
String url = destination.get("URL", String.class).getOrNull();
ScpCfHttpDestination.Builder builder = ScpCfHttpDestination.builder(destinationName, url);
// set properties
for( String propertyName : destination.getPropertyNames() ) {
builder.property(propertyName, destination.get(propertyName).getOrNull());
}
// add missing token (a workaround as of Cloud SDK 3.11, until fixed)
String authToken = AuthTokenAccessor.getCurrentToken().getJwt().getToken();
builder.header("SAP-Connectivity-Authentication", "Bearer " + authToken);
// decorate optional S/4 destination properties, e.g. sap-client
return builder.build().decorate(DefaultErpHttpDestination::new);
}
它在 SAP Cloud SDK 版本 3.7.0 到 3.10.0 中有效,但在 3.11.0 到 3.13.0 的最新版本中失败。
我在 SAP Cloud Platform 上部署了两个应用程序。一个是基于 SAP Cloud SDK 的云 java 应用程序,使用使用主体传播配置的目标。另一个是应用路由器。
Principal Propagation的所有相关配置均在Cloud Connector和后端on-premise系统中完成。我们还在 SAP Cloud Platform 中设置了自己的身份提供者。
让我介绍一下我们想要实现的目标。
用户使用我们自己的 IDP 从应用程序路由器登录到云应用程序,然后使用在目标中配置的相同用户(不同于基本身份验证中的技术用户)从 S4 本地系统获取一些数据。
我在 java 应用程序中做了什么来从 S4 系统调用开票凭证。
public List<BillingDocument> getAllBillingdocuments() throws BusinessException {
ResilienceConfiguration resilienceConfig = ResilienceConfiguration.of(MyBillingDocumentService.class)
.cacheConfiguration(CacheConfiguration.of(Duration.ofSeconds(10))
.withoutParameters()); // Cache key
List<BillingDocument> billingDocuments;
try {
billingDocuments = ResilienceDecorator.executeCallable(() -> bdService.getAllBillingDocument()
.execute(DestinationUtil.getHttpDestinationS4XSSO()),
resilienceConfig);
} catch (Exception e) {
e.printStackTrace();
throw BusinessException.convert(e);
}
return billingDocuments;
}
我会省略应用路由器的配置。我保证是正确的。
问题是用户可以使用我们自己的 IDP 通过应用程序路由器登录到云 java 应用程序,但是当 he/she 想通过以下 [=47] 从 S4 预置系统获取数据时=], 总是出现这个错误。
https://****.cfapps.***.hana.ondemand.com/test311/billingdocument
来自 java 应用程序的详细错误日志:
2020-02-17T06:01:22.948+0000 [APP/PROC/WEB/0] OUT { "written_at":"2020-02-17T06:01:22.945Z","written_ts":277856327935563,"tenant_id":"-","component_type":"application","component_id":"***","space_name":"***","component_name":"TestVer3.11_service","component_instance":"0","organization_id":"-","correlation_id":"-","organization_name":"-","space_id":"240338f7-479a-402f-bb31-f3aaf5c90406","container_id":"10.0.137.28","type":"log","logger":"com.sap.cloud.sdk.odatav2.connectivity.cache.metadata.GuavaMetadataCache","thread":"cloudsdk-resilience-0","level":"ERROR","categories":[],"msg":"Error occurred while populating metadata: ","stacktrace":["com.sap.cloud.sdk.datamodel.odata.helper.ODataVdmErrorResultHandler$ErpODataException: The endpoint responded with HTTP error code 401.nnFull error message: nSSO token validation failed. Make sure trust is configured correctly in the cloud connector to enable principal propagation, if token has not expired yet.","tat com.sap.cloud.sdk.datamodel.odata.helper.ODataVdmErrorResultHandler.createException(ODataVdmErrorResultHandler.java:117)","tat com.sap.cloud.sdk.datamodel.odata.helper.ODataVdmErrorResultHandler.createError(ODataVdmErrorResultHandler.java:97)","tat com.sap.cloud.sdk.datamodel.odata.helper.ODataVdmErrorResultHandler.createError(ODataVdmErrorResultHandler.java:33)","tat com.sap.cloud.sdk.odatav2.connectivity.internal.ODataConnectivityUtil.checkHttpStatus(ODataConnectivityUtil.java:219)","tat com.sap.cloud.sdk.odatav2.connectivity.cache.metadata.GuavaMetadataCache.getEdm(GuavaMetadataCache.java:239)","tat com.sap.cloud.sdk.odatav2.connectivity.cache.metadata.GuavaMetadataCache.getEdm(GuavaMetadataCache.java:156)","tat com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.loadMetadata(ODataQuery.java:379)","tat com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.loadEntriesFromDestination(ODataQuery.java:310)","tat com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.internalExecute(ODataQuery.java:253)","tat com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.execute(ODataQuery.java:151)","tat com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.execute(ODataQuery.java:135)","tat com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperRead.execute(FluentHelperRead.java:250)","tat com.bosch.test.service.MyBillingDocumentService.lambda$getAllBillingdocuments[=11=](MyBillingDocumentService.java:55)","tat com.sap.cloud.sdk.cloudplatform.thread.ThreadContextCallable.call(ThreadContextCallable.java:247)","tat com.sap.cloud.sdk.cloudplatform.thread.AbstractThreadContextExecutor.execute(AbstractThreadContextExecutor.java:293)","tat com.sap.cloud.sdk.frameworks.resilience4j.Resilience4jDecorationStrategy.lambda$decorateCallable(Resilience4jDecorationStrategy.java:107)","tat java.util.concurrent.FutureTask.run(FutureTask.java:266)","tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)","tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)","tat java.lang.Thread.run(Thread.java:836)"] }
2020-02-17T06:01:23.168+0000 [APP/PROC/WEB/0] OUT { "written_at":"2020-02-17T06:01:23.167Z","written_ts":277856550010598,"tenant_id":"-","component_type":"application","component_id":"***","space_name":"***","component_name":"TestVer3.11_service","component_instance":"0","organization_id":"-","correlation_id":"-","organization_name":"-","space_id":"240338f7-479a-402f-bb31-f3aaf5c90406","container_id":"10.0.137.28","type":"log","logger":"com.sap.cloud.sdk.odatav2.connectivity.cache.metadata.GuavaMetadataCache","thread":"cloudsdk-resilience-0","level":"ERROR","categories":[],"msg":"Error occurred while populating metadata: ","stacktrace":["com.sap.cloud.sdk.datamodel.odata.helper.ODataVdmErrorResultHandler$ErpODataException: The endpoint responded with HTTP error code 401.nnFull error message: nSSO token validation failed. Make sure trust is configured correctly in the cloud connector to enable principal propagation, if token has not expired yet.","tat com.sap.cloud.sdk.datamodel.odata.helper.ODataVdmErrorResultHandler.createException(ODataVdmErrorResultHandler.java:117)","tat com.sap.cloud.sdk.datamodel.odata.helper.ODataVdmErrorResultHandler.createError(ODataVdmErrorResultHandler.java:97)","tat com.sap.cloud.sdk.datamodel.odata.helper.ODataVdmErrorResultHandler.createError(ODataVdmErrorResultHandler.java:33)","tat com.sap.cloud.sdk.odatav2.connectivity.internal.ODataConnectivityUtil.checkHttpStatus(ODataConnectivityUtil.java:219)","tat com.sap.cloud.sdk.odatav2.connectivity.cache.metadata.GuavaMetadataCache.getEdm(GuavaMetadataCache.java:239)","tat com.sap.cloud.sdk.odatav2.connectivity.cache.metadata.GuavaMetadataCache.getEdm(GuavaMetadataCache.java:156)","tat com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.loadMetadata(ODataQuery.java:379)","tat com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.loadEntriesFromDestination(ODataQuery.java:310)","tat com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.internalExecute(ODataQuery.java:253)","tat com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.retryExecuteWithCompleteUrl(ODataQuery.java:172)","tat com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.execute(ODataQuery.java:157)","tat com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.execute(ODataQuery.java:135)","tat com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperRead.execute(FluentHelperRead.java:250)","tat com.bosch.test.service.MyBillingDocumentService.lambda$getAllBillingdocuments[=11=](MyBillingDocumentService.java:55)","tat com.sap.cloud.sdk.cloudplatform.thread.ThreadContextCallable.call(ThreadContextCallable.java:247)","tat com.sap.cloud.sdk.cloudplatform.thread.AbstractThreadContextExecutor.execute(AbstractThreadContextExecutor.java:293)","tat com.sap.cloud.sdk.frameworks.resilience4j.Resilience4jDecorationStrategy.lambda$decorateCallable(Resilience4jDecorationStrategy.java:107)","tat java.util.concurrent.FutureTask.run(FutureTask.java:266)","tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)","tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)","tat java.lang.Thread.run(Thread.java:836)"] }
2020-02-17T06:01:23.171+0000 [APP/PROC/WEB/0] ERR com.sap.cloud.sdk.cloudplatform.resilience.ResilienceRuntimeException: com.sap.cloud.sdk.cloudplatform.resilience.ResilienceRuntimeException: com.sap.cloud.sdk.cloudplatform.thread.exception.ThreadContextExecutionException: com.sap.cloud.sdk.odatav2.connectivity.ODataException: Unable to fetch the metadata : Failed to execute OData Metadata request.
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.frameworks.resilience4j.Resilience4jDecorationStrategy.lambda$null(Resilience4jDecorationStrategy.java:123)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at io.vavr.control.Try.onFailure(Try.java:659)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.frameworks.resilience4j.Resilience4jDecorationStrategy.lambda$decorateCallable(Resilience4jDecorationStrategy.java:122)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.cloudplatform.resilience.ResilienceDecorationStrategy.executeCallable(ResilienceDecorationStrategy.java:184)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.cloudplatform.resilience.ResilienceDecorator.executeCallable(ResilienceDecorator.java:197)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at com.bosch.test.service.MyBillingDocumentService.getAllBillingdocuments(MyBillingDocumentService.java:54)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at com.bosch.test.controllers.MyBillingDocumentController.getAllBillingDocuments(MyBillingDocumentController.java:32)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at java.lang.reflect.Method.invoke(Method.java:498)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:888)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
2020-02-17T06:01:23.172+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.cloudplatform.servlet.RequestAccessorFilter.lambda$doFilter(RequestAccessorFilter.java:71)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.cloudplatform.thread.AbstractThreadContextExecutor.lambda$execute[=11=](AbstractThreadContextExecutor.java:317)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.cloudplatform.thread.ThreadContextCallable.call(ThreadContextCallable.java:247)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.cloudplatform.thread.AbstractThreadContextExecutor.execute(AbstractThreadContextExecutor.java:319)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.cloudplatform.servlet.RequestAccessorFilter.doFilter(RequestAccessorFilter.java:71)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
2020-02-17T06:01:23.173+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:118)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:158)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter.doFilter(OAuth2AuthenticationProcessingFilter.java:180)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:92)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:77)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
2020-02-17T06:01:23.174+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:526)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
2020-02-17T06:01:23.175+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:747)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1579)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at java.lang.Thread.run(Thread.java:836)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR Caused by: com.sap.cloud.sdk.cloudplatform.resilience.ResilienceRuntimeException: com.sap.cloud.sdk.cloudplatform.thread.exception.ThreadContextExecutionException: com.sap.cloud.sdk.odatav2.connectivity.ODataException: Unable to fetch the metadata : Failed to execute OData Metadata request.
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.frameworks.resilience4j.DefaultCachingDecorator.lambda$decorateCallable[=11=](DefaultCachingDecorator.java:124)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at io.vavr.control.Try.of(Try.java:75)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at io.vavr.control.Try.ofCallable(Try.java:105)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.frameworks.resilience4j.Resilience4jDecorationStrategy.lambda$decorateCallable(Resilience4jDecorationStrategy.java:118)
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR ... 95 more
2020-02-17T06:01:23.176+0000 [APP/PROC/WEB/0] ERR Caused by: com.sap.cloud.sdk.cloudplatform.thread.exception.ThreadContextExecutionException: com.sap.cloud.sdk.odatav2.connectivity.ODataException: Unable to fetch the metadata : Failed to execute OData Metadata request.
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.cloudplatform.thread.AbstractThreadContextExecutor.execute(AbstractThreadContextExecutor.java:299)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.frameworks.resilience4j.Resilience4jDecorationStrategy.lambda$decorateCallable(Resilience4jDecorationStrategy.java:107)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at java.util.concurrent.FutureTask.run(FutureTask.java:266)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR ... 1 more
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR Caused by: com.sap.cloud.sdk.odatav2.connectivity.ODataException: Unable to fetch the metadata : Failed to execute OData Metadata request.
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.loadEntriesFromDestination(ODataQuery.java:312)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.internalExecute(ODataQuery.java:253)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.retryExecuteWithCompleteUrl(ODataQuery.java:172)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.execute(ODataQuery.java:157)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.execute(ODataQuery.java:135)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperRead.execute(FluentHelperRead.java:250)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at com.bosch.test.service.MyBillingDocumentService.lambda$getAllBillingdocuments[=11=](MyBillingDocumentService.java:55)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.cloudplatform.thread.ThreadContextCallable.call(ThreadContextCallable.java:247)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.cloudplatform.thread.AbstractThreadContextExecutor.execute(AbstractThreadContextExecutor.java:293)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR ... 5 more
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR Caused by: com.sap.cloud.sdk.datamodel.odata.helper.ODataVdmErrorResultHandler$ErpODataException: The endpoint responded with HTTP error code 401.
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR Full error message:
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR SSO token validation failed. Make sure trust is configured correctly in the cloud connector to enable principal propagation, if token has not expired yet.
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.datamodel.odata.helper.ODataVdmErrorResultHandler.createException(ODataVdmErrorResultHandler.java:117)
2020-02-17T06:01:23.177+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.datamodel.odata.helper.ODataVdmErrorResultHandler.createError(ODataVdmErrorResultHandler.java:97)
2020-02-17T06:01:23.178+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.datamodel.odata.helper.ODataVdmErrorResultHandler.createError(ODataVdmErrorResultHandler.java:33)
2020-02-17T06:01:23.178+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.odatav2.connectivity.internal.ODataConnectivityUtil.checkHttpStatus(ODataConnectivityUtil.java:219)
2020-02-17T06:01:23.178+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.odatav2.connectivity.cache.metadata.GuavaMetadataCache.getEdm(GuavaMetadataCache.java:239)
2020-02-17T06:01:23.178+0000 [APP/PROC/WEB/0] ERR at com.sap.cloud.sdk.odatav2.connectivity.cache.metadata.GuavaMetadataCache.getEdm(GuavaMetadataCache.java:156)
设置默认的 PrincipalPropagationStrategy
public static HttpDestination getHttpDestinationS4XSSO() {
PrincipalPropagationStrategy.setDefaultStrategy(PrincipalPropagationStrategy.COMPATIBILITY);
Destination destination = DestinationAccessor.getDestination("S4X_HTTP_SSO");
return destination.asHttp().decorate(DefaultErpHttpDestination::new);
}
错误消息 SSO token validation failed. Make sure trust is configured correctly in the cloud connector to enable principal propagation, if token has not expired yet.
表示 Cloud Connector 和 Cloud Foundry 之间存在 outdated/wrong/lacking 信任配置。
请根据其 official documentation 重新考虑信任配置,特别是执行标题 'Configure Trusted Entities in the Cloud Connector' 下面的步骤
更新:
我们修复了报告的 SAP Cloud SDK 问题 3.16.1
如果可能,请相应地更新依赖项。
原回答:
SAP Cloud SDK采用了推荐的选项来实现用户传播,参见 SAP Cloud Platform Connectivity: Configure Principal Propagation via User Exchange Token
但是,如果推荐的选项不适合您,则可以改用旧做法:兼容性 选项。只需在您的应用程序代码中调用一次以下方法:
import com.sap.cloud.sdk.cloudplatform.connectivity.PrincipalPropagationStrategy;
PrincipalPropagationStrategy.setDefaultStrategy(PrincipalPropagationStrategy.COMPATIBILITY);
这将有效地还原您在版本 3.10.0
和 3.11.0
之间遇到的更改。
我们发现 3.11.0
及以后的实施存在潜在问题。在解决此问题之前,请尝试使用以下快速解决方法来解析 HttpDestination。与此同时,我们正在努力修复下一个版本:
private HttpDestination getHttpDestination( final String destinationName ) {
Destination destination = DestinationAccessor.tryGetDestination(destinationName).get();
String url = destination.get("URL", String.class).getOrNull();
ScpCfHttpDestination.Builder builder = ScpCfHttpDestination.builder(destinationName, url);
// set properties
for( String propertyName : destination.getPropertyNames() ) {
builder.property(propertyName, destination.get(propertyName).getOrNull());
}
// add missing token (a workaround as of Cloud SDK 3.11, until fixed)
String authToken = AuthTokenAccessor.getCurrentToken().getJwt().getToken();
builder.header("SAP-Connectivity-Authentication", "Bearer " + authToken);
// decorate optional S/4 destination properties, e.g. sap-client
return builder.build().decorate(DefaultErpHttpDestination::new);
}