How to store keystores in profile and accessing it in Spring context ?

Solution Unverified - Updated -

Issue

  • We noticed that the mq-default profile has io.fabric8.mq.fabric.server-broker.properties file with property keystore.url=profile\:keystore.jks.
  • We would like to also place our keystores in our profiles and be able to access them from our Spring config.
  • We have defined the property in a property file in the profile like this:
keystore=profile\:keystore.jks
  • And this is propagated to the Spring context and used with the following:
<sec:keyManagers keyPassword="changeit">
    <sec:keyStore type="JKS" password="changeit" file="${keystore}"/>
</sec:keyManagers>
  • But we get
java.io.FileNotFoundException: profile:keystore.jks

Environment

  • Red Hat JBoss Fuse
    • 6.2.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content