title: DestinationAccessException on keystore location for SuccessFactors destination
body: <p>I am having a problem accessing a SuccessFactors destination in my application. I am trying to access the destination like:</p>
  
  <pre><code> final HttpDestination destination = DestinationAccessor.getDestination(DESTINATION_NAME).asHttp();
  </code></pre>
  
  <p>where DESTINATION_NAME is "sfapi_dest". 
  This destination is generated automatically using an instance of the SCP SuccessFactors Extensibility Service (Extension Factory) which creates an OAuth2SAMLBearerAssertion protected destination. The application is secured in the usual way using approuter and xsuaa service. 
  However, when I run my application I get a DestinationAccessException on the keystore location. I am using version 3.10.0 of the SDK.</p>
  
  <p>Here is the destination: </p>
  
  <p><a href="https://i.stack.imgur.com/EcMkd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EcMkd.png" alt="enter image description here"></a></p>
  
  <p>Earlier in the logs I can see:</p>
  
  <blockquote>
    <p>"level":"DEBUG","categories":[],"msg":"Instantiated
    com.sap.cloud.sdk.cloudplatform.connectivity.DefaultDestination based
    on the following property keys:
    apiKey,audience,Authentication,authnContextClassRef,authTokens,certificates,clientKey,companyId,KeyStoreLocation,KeyStorePassword,Name,nameIdFormat,ProxyType,tokenServiceURL,Type,URL,WebIDEEnabled,XFSystemName"
    }</p>
  </blockquote>
  
  <p>and then:</p>
  
  <blockquote>
    <p>"log","logger":"com.sap.cloud.sdk.cloudplatform.connectivity.DestinationLoaderChain","thread":"http-nio-0.0.0.0-8080-exec-3","level":"DEBUG","categories":[],"msg":"Destination
    loader ScpCfDestinationLoader successfully loaded destination
    sfapi_dest." }</p>
  </blockquote>
  
  <p>and finally:</p>
  
  <blockquote>
    <p>"msg":"Servlet.service() for servlet
    [com.sap.cloud.sdk.sfcrud.CandidatesServlet] in context with path []
    threw
    exception","stacktrace":["com.sap.cloud.sdk.cloudplatform.exception.ShouldNotHappenException:
    com.sap.cloud.sdk.cloudplatform.thread.exception.ThreadContextExecutionException:
    com.sap.cloud.sdk.cloudplatform.connectivity.exception.DestinationAccessException:
    Failed to find key store 'sfapi_dest.p12' in destination
    'sfapi_dest'.","\tat
    com.sap.cloud.sdk.cloudplatform.servlet.RequestAccessorFilter.doFilter(RequestAccessorFilter.java:74)","\tat
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)","\tat
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)","\tat
    com.sap.cloud.sdk.cloudplatform.security.servlet.HttpCachingHeaderFilter.doFilter(HttpCachingHeaderFilter.java:83)","\tat
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)","\tat
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)","\tat
    com.sap.cloud.sdk.cloudplatform.security.servlet.HttpSecurityHeadersFilter.doFilter(HttpSecurityHeadersFilter.java:41)","\tat
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)","\tat
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)","\tat
    org.apache.catalina.filters.RestCsrfPreventionFilter.doFilter(RestCsrfPreventionFilter.java:125)","\tat
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)","\tat
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)","\tat
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)","\tat
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)","\tat
    org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)","\tat
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:668)","\tat
    com.sap.xs.security.container.XSSecurityAuthenticator.invoke(XSSecurityAuthenticator.java:134)","\tat
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)","\tat
    org.apache.tomee.catalina.OpenEJBSecurityListener$RequestCapturer.invoke(OpenEJBSecurityListener.java:97)","\tat
    com.sap.xs.java.valves.ErrorReportValve.invoke(ErrorReportValve.java:66)","\tat
    ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:256)","\tat
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)","\tat
    com.sap.xs.security.TenantIdValve.invoke(TenantIdValve.java:33)","\tat
    com.sap.xs.security.UserInfoValve.invoke(UserInfoValve.java:19)","\tat
    com.sap.xs.statistics.tomcat.valve.RequestTracingValve.invoke(RequestTracingValve.java:43)","\tat
    com.sap.xs.logging.catalina.RuntimeInfoValve.invoke(RuntimeInfoValve.java:40)","\tat
    org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:747)","\tat
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)","\tat
    org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:609)","\tat
    org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)","\tat
    org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:818)","\tat
    org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1623)","\tat
    org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)","\tat
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)","\tat
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)","\tat
    org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)","\tat
    java.lang.Thread.run(Thread.java:836)","Caused by:
    com.sap.cloud.sdk.cloudplatform.thread.exception.ThreadContextExecutionException:
    com.sap.cloud.sdk.cloudplatform.connectivity.exception.DestinationAccessException:
    Failed to find key store 'sfapi_dest.p12' in destination
    'sfapi_dest'.","\tat
    com.sap.cloud.sdk.cloudplatform.thread.AbstractThreadContextExecutor.execute(AbstractThreadContextExecutor.java:325)","\tat
    com.sap.cloud.sdk.cloudplatform.servlet.RequestAccessorFilter.doFilter(RequestAccessorFilter.java:71)","\t...
    36 more","Caused by:
    com.sap.cloud.sdk.cloudplatform.connectivity.exception.DestinationAccessException:
    Failed to find key store 'sfapi_dest.p12' in destination
    'sfapi_dest'.","\tat
    com.sap.cloud.sdk.cloudplatform.connectivity.ScpCfHttpDestinationPropertyFactory.getKeyStore(ScpCfHttpDestinationPropertyFactory.java:432)","\tat
    com.sap.cloud.sdk.cloudplatform.connectivity.ScpCfHttpDestination.lambda$new$0(ScpCfHttpDestination.java:146)","\tat
    io.vavr.control.Option.orElse(Option.java:321)","\tat
    com.sap.cloud.sdk.cloudplatform.connectivity.ScpCfHttpDestination.(ScpCfHttpDestination.java:145)","\tat
    com.sap.cloud.sdk.cloudplatform.connectivity.ScpCfHttpDestination.(ScpCfHttpDestination.java:79)","\tat
    com.sap.cloud.sdk.cloudplatform.connectivity.ScpCfDestination.asHttp(ScpCfDestination.java:49)","\tat
    com.sap.cloud.sdk.sfcrud.CandidatesServlet.doGet(CandidatesServlet.java:38)","\tat
    javax.servlet.http.HttpServlet.service(HttpServlet.java:634)","\tat
    javax.servlet.http.HttpServlet.service(HttpServlet.java:741)","\tat
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)","\tat
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)","\tat
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)","\tat
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)","\tat
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)","\tat
    org.apache.openejb.server.httpd.EEFilter.doFilter(EEFilter.java:65)","\tat
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)","\tat
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)","\tat
    com.sap.cloud.sdk.cloudplatform.servlet.RequestAccessorFilter.lambda$doFilter$1(RequestAccessorFilter.java:71)","\tat
    com.sap.cloud.sdk.cloudplatform.thread.AbstractThreadContextExecutor.lambda$execute$0(AbstractThreadContextExecutor.java:317)","\tat
    com.sap.cloud.sdk.cloudplatform.thread.ThreadContextCallable.call(ThreadContextCallable.java:247)","\tat
    com.sap.cloud.sdk.cloudplatform.thread.AbstractThreadContextExecutor.execute(AbstractThreadContextExecutor.java:319)","\t...
    37 more"] }</p>
  </blockquote>
  
  <p>I can see the KeyStoreLocation in "sensitive information" of the instance of the SuccessFactors Extensibility Service but this information does not seem to be added to the automatically generated destination or at least it is not visible. Any idea why it fails to find the keystore location in the DestinationAccessor request?
  Thanks for your time.</p>
  
  <p>Adding image:
  <a href="https://i.stack.imgur.com/PtWY6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PtWY6.png" alt="enter image description here"></a></p>