I have couple of application password stored in Wildfly 17.x credential stores. How to programmatically accessing the stored passwords from credential store?
This is how the credential store is created and password is stored in it.
/subsystem=elytron/credential-store=test:add(relative-to=jboss.server.data.dir, location=test.jceks, create=true,credential-reference={clear-text=storepass})
/subsystem=elytron/credential-store=test:add-alias(alias=keystorepw,secret-value=secret)
I created the store in a different extension instead of jceks. Once that is fixed, I can able to read the password from the store. Took a while to figure that out because WildFly did not complain while creating the store and all worked fine except reading it programatically.