Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc Feedback: Missing steps in the hashicorp:vault-lookup configuration #914

Open
JanakaPushpakumara opened this issue Aug 17, 2021 · 1 comment

Comments

@JanakaPushpakumara
Copy link

Location : https://ei.docs.wso2.com/en/7.2.0/micro-integrator/setup/security/using-hashicorp-secrets/

The document does not specify about enabling the below synapse property in the conf/deployment.toml.

[synapse_properties]
"synapse.xpath.func.extensions"="org.wso2.micro.integrator.mediation.security.vault.xpath.SecureVaultLookupXPathFunctionProvider,org.wso2.micro.integrator.mediation.security.vault.external.hashicorp.HashiCorpVaultLookupXPathFunctionProvider" 

Ex: by default, it is not enabled in the MI server. We could observe the below exceptions in the logs if we haven't enabled them.

[2021-08-17 16:13:54,863] ERROR {SynapseXPath} - Evaluation of the XPath expression hashicorp:vault-lookup('path-name', 'field-name')  resulted in an error org.jaxen.UnresolvableException: No Such Function vault-lookup
	at org.jaxen.SimpleFunctionContext.getFunction(SimpleFunctionContext.java:127)
	at org.apache.synapse.util.xpath.SynapseXPathFunctionContext.getFunction(SynapseXPathFunctionContext.java:101)
	at org.jaxen.ContextSupport.getFunction(ContextSupport.java:242)
	at org.jaxen.Context.getFunction(Context.java:216)
	at org.jaxen.expr.DefaultFunctionCallExpr.evaluate(DefaultFunctionCallExpr.java:176)
	at org.jaxen.expr.DefaultXPathExpr.asList(DefaultXPathExpr.java:102)
	at org.jaxen.BaseXPath.selectNodesForContext(BaseXPath.java:675)
	at org.jaxen.BaseXPath.selectNodes(BaseXPath.java:215)
	at org.jaxen.BaseXPath.evaluate(BaseXPath.java:175)
	at org.apache.synapse.util.xpath.SynapseXPath.stringValueOf(SynapseXPath.java:408)
	at org.apache.synapse.mediators.builtin.PropertyMediator.getResultValue(PropertyMediator.java:392)
	at org.apache.synapse.mediators.builtin.PropertyMediator.mediate(PropertyMediator.java:125)
	at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:109)
	at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
	at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
	at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:226)
	at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
	at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:368)
	at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:427)
	at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:181)
	at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants