You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "samar-elsayed (via GitHub)" <gi...@apache.org> on 2024/08/05 08:18:17 UTC
[I] Hashicorp Vault component [camel-karavan]
samar-elsayed opened a new issue, #1348:
URL: https://github.com/apache/camel-karavan/issues/1348
### Describe the bug
I have tried to add a vault component as shown below :

but once I run Jbang run, it gives me the following error

### Steps to reproduce the behavior
as mentioned above
### Variant
Vs Code Extension
### Container Management (if applicable)
None
### Operating System (if applicable)
Windows
### Version
4.7.0
### Relevant log output
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2331719927
https://issues.apache.org/jira/browse/CAMEL-21179
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2326038643
well, the call seems to be done, I really have a no idea. The function is working in the local tests and even by testing through Kamelet. I cannot reproduce.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2309912548
I think we need to revisit this and check compatibility with v1 and v2
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "samar-elsayed (via GitHub)" <gi...@apache.org>.
samar-elsayed commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2282358761
Shouldn't these properties be set from the UI itself ?
I have set them except for secretPath but I faced that error:
`java.lang.IllegalArgumentException: Secret Path must be specified`
so I tried setting the below property:
camel.vault.hashicorp.secretPath
but it also failed with:
`Error binding property (camel.vault.hashicorp.secretPath=online) with name: secretPath on bean: org.apache.camel.vault.HashicorpVaultConfiguration@147e0734 `
@mgubaidullin so please let me know how to specify the secretPath
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2543068053
Try with an LTS version, like 4.8.x
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "jabhishek01 (via GitHub)" <gi...@apache.org>.
jabhishek01 commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2548511132
@davsclaus it didnt worked for me even i set it to false in properties file.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2311977710
It's impossible to say without knowing the configuration of the vault and how you configured the properties.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "jabhishek01 (via GitHub)" <gi...@apache.org>.
jabhishek01 commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2545732449
@oscerd Can you please suggest stable version for vault ? Because I am unable to use vault property in datasource. It gives error for vault properties. Also is there any way to use camel-jasypt for datasource bean password property.
-beans
name: LocalPostgres
type: com.zaxxer.hikari.HikariDataSource
properties:
driverClassName: org.postgresql.Driver
jdbcUrl: >-
jdbc:postgresql://dburl:dbport/database
username: dbuser
password: "{{hashicorp:secret:db/password}}"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2545740670
4.8.0 should already work. Please create a reproducer or something we could use to reproduce your problem
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2548251186
https://issues.apache.org/jira/browse/CAMEL-21553
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "jabhishek01 (via GitHub)" <gi...@apache.org>.
jabhishek01 commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2540582988
@oscerd Thanks for sharing this. This worked for me. But when i configure datasource as bean that time i am getting this issue.
- beans:
- name: LocalPostgres
type: com.zaxxer.hikari.HikariDataSource
properties:
driverClassName: org.postgresql.Driver
jdbcUrl: >-
jdbc:postgresql://dburl/smh
username: smh_user
password: "{{db.password}}"
connectionTimeout: "10000"
maximumPoolSize: "20"
leakDetectionThreshold: "20000"
maxLifetime: "300000"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2326102025
I'll try with v2 and see, maybe it's because of that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2325886983
It should be something like
{{hashicorp-vault:secret:onlineMidTakseet/test:<key_name>@1}}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2309739046
Do you have hashicorp vault component in your classpath?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2309891312
https://github.com/spring-projects/spring-vault/issues/738
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2331653501
I found the time to reproduce. Essentially the problem is with the secret path. The Hashicorp properties function is not able to distinguish between the slash for the subkey and the slash in your secret path. So if you something like onlineMidTakseet as path and not onlineMidTaskseet/test it will work.
This is because the last slash should represent the separator to dive into the secret value and get a key. So what is happening is that the function is looking for secret onlineMidTakseet with key apiKey while the secret is onlineMidTakseet/test.
We can work on improving this or add a note about this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "jabhishek01 (via GitHub)" <gi...@apache.org>.
jabhishek01 commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2546204700
@oscerd thanks for info.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "samar-elsayed (via GitHub)" <gi...@apache.org>.
samar-elsayed commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2307074868
@oscerd could you give me an example to log a value of a secret ?
for instance, I have a secret that is located in that path **main/test/apiKey**
I have tried to use the below but **it just prints main/test/apiKey literally**
```
- log:
id: log-a4d7
disabled: false
message: "{{hashicorp-vault:secret:main/test/apiKey}}"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "samar-elsayed (via GitHub)" <gi...@apache.org>.
samar-elsayed commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2307017917
@mgubaidullin
While trying with Karavan vscode **4.7.0,** I found that `camel.vault.hashicorp.engine `is not recognized and the below error happens although I didn't face this issue while using **4.6.0**
`org.apache.camel.PropertyBindingException: Error binding property (camel.vault.hashicorp.engine=secret) with name: engine on bean: org.apache.camel.vault.HashicorpVaultConfiguration@6ddd1c51 with value: secret `
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "samar-elsayed (via GitHub)" <gi...@apache.org>.
samar-elsayed commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2325861768
@oscerd well I was not able to simulate the last issue I shared here again but I am back to the first issue I faced which is not being able to get the value of the fields under /onlineMidTakseet/test?version=1 ( I have 2 fields (key=value) under this path and I want to at least get one of them )
I have enabled the debug mode and the last highlighted line is the log step where I used **{{hashicorp-vault:secret:onlineMidTakseet/test@1}}** but as you can see in the below screenshot it only logged **secret:onlineMidTakseet/test@1=** not the value itself

so can you please help me to just get the field value from the vault ?
thanks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2539526030
https://camel.apache.org/components/next/hashicorp-vault-component.html#_using_hashicorp_vault_property_function
You need the component for the vault of your choice on the classpath and add the configuration to the application properties
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "jabhishek01 (via GitHub)" <gi...@apache.org>.
jabhishek01 commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2539516924
@oscerd Do you know how to integrate vault for datasource bean in camel route yaml ? I am able to use in route but when i try to use vault property in datasource bean i get error as vault token, secret, scheme and port missing error. It looks like i am using it wrong way.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "samar-elsayed (via GitHub)" <gi...@apache.org>.
samar-elsayed commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2326096453
@oscerd I am using 4.7.0
I have shared here the vault config as a last resort


--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "samar-elsayed (via GitHub)" <gi...@apache.org>.
samar-elsayed commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2326058299
In this case, I will need to use k8 secrets the normal way and exclude hashicorp-vault for now until a further solution is available
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2331672536
No, it has nothing to do with engine version.
For sure this won't go in 4.8.0, the Camel release will be during the weekend and there is no time.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "samar-elsayed (via GitHub)" <gi...@apache.org>.
samar-elsayed commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2282781839
@oscerd can you share with me if is there a default name for the header that hashicorp component supports and uses to set the secretPath ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2307029310
There is no engine property in 4.7. it's now part of the syntax in the
expression {{hashicorp:engine:secretname}}
Il ven 23 ago 2024, 14:44 Samar Elsayed ***@***.***> ha
scritto:
> @mgubaidullin <https://github.com/mgubaidullin>
>
> While trying with Karavan vscode *4.7.0,* I found that camel.vault.hashicorp.engine
> is not recognized and the below error happens although I didn't face this
> issue while using *4.6.0*
>
> org.apache.camel.PropertyBindingException: Error binding property
> (camel.vault.hashicorp.engine=secret) with name: engine on bean:
> ***@***.*** with value:
> secret
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/apache/camel-karavan/issues/1348#issuecomment-2307017917>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABG6XVYBFB6AFDC5Z6OJ5A3ZS4VB3AVCNFSM6AAAAABL7ZECTGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBXGAYTOOJRG4>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "samar-elsayed (via GitHub)" <gi...@apache.org>.
samar-elsayed commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2309880562
@oscerd yes I have it already inside my karavan project
I noticed while apache camel was connecting to vault, I found hashicorp-vault component adds the following `https://host:port/v1/secret/data` to **my secret path**
but at my company we are using v2 secret engine so I think the issue may be related to the secret engine version
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "jabhishek01 (via GitHub)" <gi...@apache.org>.
jabhishek01 commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2543309658
@oscerd I am running using 4.8.0 version.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "jabhishek01 (via GitHub)" <gi...@apache.org>.
jabhishek01 commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2545828481
@oscerd
[testvault.zip](https://github.com/user-attachments/files/18152084/testvault.zip)
Please refer my project . I have created vault and db on local and trying to use vault to access db password.
Error when running using 4.8.0 .
... 27 more
Caused by: org.apache.camel.RuntimeCamelException: Using the Hashicorp Properties Function requires setting Token, Host, port and scheme properties
at org.apache.camel.component.hashicorp.vault.HashicorpVaultPropertiesFunction.doStart(HashicorpVaultPropertiesFunction.java:112)
at org.apache.camel.support.service.BaseService.start(BaseService.java:123)
at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:126)
at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:113)
at org.apache.camel.component.properties.DefaultPropertiesFunctionResolver.resolve(DefaultPropertiesFunctionResolver.java:107)
at org.apache.camel.component.properties.DefaultPropertiesFunctionResolver.resolvePropertiesFunction(DefaultPropertiesFunctionResolver.java:83)
at org.apache.camel.main.download.DependencyDownloaderPropertiesFunctionResolver.resolvePropertiesFunction(DependencyDownloaderPropertiesFunctionResolver.java:82)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "mgubaidullin (via GitHub)" <gi...@apache.org>.
mgubaidullin commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2275643590
I think you need to configure Hashicorp Vault Property Function
https://camel.apache.org/components/4.4.x/hashicorp-vault-component.html#_using_hashicorp_vault_property_function
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "mgubaidullin (via GitHub)" <gi...@apache.org>.
mgubaidullin commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2282800404
@samar-elsayed you can always find component headers in the property panel

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2331693150
Thinking about it, it's also hard to implement because if the slash is used to determine where the secret path ends and the after slash is the subkey, you'll never know if you are looking for a full key or a particular field of the secret. Even without investigating, this is not really possible, unless we change the syntax.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2316758203
Can you try to enable debug logging level and see what happens?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "samar-elsayed (via GitHub)" <gi...@apache.org>.
samar-elsayed commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2326024471
@oscerd still the same result I cant get its value

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2326067428
The solution is working in 4.7.0, there are no further solutions to be find, I cannot access your environment so I cannot really reproduce.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2307031710
https://camel.apache.org/components/next/hashicorp-vault-component.html#_using_hashicorp_vault_property_function
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2325662036
With the debug log level, you should be able to see a bit better what is happening.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2326090180
I can try to setup a route with pure Kamelets and an Hashicorp Vault docker image to show it will log the secret if you want.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2282759810
Secret properties function is a thing, the producer methods are a different thing. If you use secret path, you need to set an header. When you set camel.vault.hashicorp.* properties you're setting up the secret properties function. The function will resolve parameters for you inside a route with the following syntax {{hashicorp:engine:secretname}}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "samar-elsayed (via GitHub)" <gi...@apache.org>.
samar-elsayed commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2331669162
Hmm ok so it is not related the kv version right?
I hope you can improve it since in my team we need to use / to separate and organize multiple environments secret per application name
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "jabhishek01 (via GitHub)" <gi...@apache.org>.
jabhishek01 commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2542029890
@oscerd Thanks for info but while using this in my datasource bean i get following error. I suspect camel-karavan tried to configure datasource bean but by that time vault was not initialized. Am i missing anything ? I have added following porperties in my project application.properties in karavan ui. I am using camel-karavan-4.6.0.
camel.vault.hashicorp.enabled=true
camel.vault.hashicorp.host=vault
camel.vault.hashicorp.port=8200
camel.vault.hashicorp.scheme=http
camel.vault.hashicorp.token=testtoken
camel.vault.hashicorp.engine=secret
camel.vault.hashicorp.kv-version=1
Caused by: org.apache.camel.RuntimeCamelException: Using the Hashicorp Properties Function requires setting Token, Host, port and scheme properties
at org.apache.camel.component.hashicorp.vault.HashicorpVaultPropertiesFunction.doStart(HashicorpVaultPropertiesFunction.java:112)
at org.apache.camel.support.service.BaseService.start(BaseService.java:123)
at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:126)
at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:113)
at org.apache.camel.component.properties.DefaultPropertiesFunctionResolver.resolve(DefaultPropertiesFunctionResolver.java:107)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2545895050
as of today, it doesn't work for bean instantiation, just tested. It will need some work on Camel side, but later next year.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2548229102
try set `camel.main.autoConfigurationEnabled=false`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "samar-elsayed (via GitHub)" <gi...@apache.org>.
samar-elsayed commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2311914666
@oscerd I got a chance to try this with v1 but I faced the below error
```
org.apache.camel.FailedToCreateRouteException: Failed to create route Inquiry at: >>> step -> [[Log[Inquiry Req body from BE is ${exchangeProperty.InquiryReqBody}], SetHeader[CamelHashicorpVaultSecretPath, simple{onlineMidTakseet/test}], To[hashicorp-vault:secret?host=10.90.3.108&operation=getSecret&port=443&scheme=https&token=xxxxxx], Log[{{hashicorp:secret:onlineMidTakseet/test}}], process[ref:InquiryReq], Log[Inquiry Req to SP is === ${body}], To[https://check_app_properities/?bridgeEndpoint=false&httpMethod=POST&skipRequestHeaders=false], Log[Inquiry Res from SP is === ${body}], process[ref:InquiryRes], Log[Inquiry Res to BE === ${body}]]] <<< in route: Route(Inquiry)[From[direct:Inquiry?bridgeErrorHandler=false]... because of Something went wrong while recovering onlineMidTakseet from vault
at org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:235)
at org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:86)
at org.apache.camel.impl.DefaultModelReifierFactory.createRoute(DefaultModelReifierFactory.java:49)
at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:720)
at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:587)
at org.apache.camel.impl.engine.AbstractCamelContext.doInit(AbstractCamelContext.java:2390)
at org.apache.camel.support.service.BaseService.init(BaseService.java:78)
at org.apache.camel.impl.engine.AbstractCamelContext.init(AbstractCamelContext.java:2024)
at org.apache.camel.support.service.BaseService.start(BaseService.java:105)
at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2043)
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:211)
at org.apache.camel.main.KameletMain.doStart(KameletMain.java:364)
at org.apache.camel.support.service.BaseService.start(BaseService.java:113)
at org.apache.camel.dsl.jbang.core.commands.Run.runKameletMain(Run.java:1336)
at org.apache.camel.dsl.jbang.core.commands.Run.run(Run.java:873)
at org.apache.camel.dsl.jbang.core.commands.Run.doCall(Run.java:320)
at org.apache.camel.dsl.jbang.core.commands.CamelCommand.call(CamelCommand.java:71)
at org.apache.camel.dsl.jbang.core.commands.CamelCommand.call(CamelCommand.java:37)
at picocli.CommandLine.executeUserObject(CommandLine.java:2045)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2465)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2457)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2419)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2421)
at picocli.CommandLine.execute(CommandLine.java:2174)
at org.apache.camel.dsl.jbang.core.commands.CamelJBangMain.run(CamelJBangMain.java:168)
at org.apache.camel.dsl.jbang.core.commands.CamelJBangMain.run(CamelJBangMain.java:61)
at main.CamelJBang.main(CamelJBang.java:36)
Caused by: org.apache.camel.RuntimeCamelException: Something went wrong while recovering onlineMidTakseet from vault
at org.apache.camel.component.hashicorp.vault.HashicorpVaultPropertiesFunction.apply(HashicorpVaultPropertiesFunction.java:178)
at org.apache.camel.component.properties.DefaultPropertiesParser$ParsingContext.getPropertyValue(DefaultPropertiesParser.java:338)
at org.apache.camel.component.properties.DefaultPropertiesParser$ParsingContext.readProperty(DefaultPropertiesParser.java:232)
at org.apache.camel.component.properties.DefaultPropertiesParser$ParsingContext.doParseNested(DefaultPropertiesParser.java:169)
at org.apache.camel.component.properties.DefaultPropertiesParser$ParsingContext.parse(DefaultPropertiesParser.java:118)
at org.apache.camel.component.properties.DefaultPropertiesParser.parseUri(DefaultPropertiesParser.java:70)
at org.apache.camel.component.properties.PropertiesComponent.parseUri(PropertiesComponent.java:336)
at org.apache.camel.component.properties.PropertiesComponent.parseUri(PropertiesComponent.java:172)
at org.apache.camel.impl.engine.DefaultCamelContextExtension.resolvePropertyPlaceholders(DefaultCamelContextExtension.java:327)
at org.apache.camel.impl.engine.AbstractCamelContext.resolvePropertyPlaceholders(AbstractCamelContext.java:1584)
at org.apache.camel.support.CamelContextHelper.parseText(CamelContextHelper.java:388) at org.apache.camel.reifier.AbstractReifier.parseString(AbstractReifier.java:58)
at org.apache.camel.reifier.LogReifier.createProcessor(LogReifier.java:49)
at org.apache.camel.reifier.ProcessorReifier.createProcessor(ProcessorReifier.java:863)
at org.apache.camel.reifier.ProcessorReifier.createOutputsProcessor(ProcessorReifier.java:816)
at org.apache.camel.reifier.StepReifier.createOutputsProcessor(StepReifier.java:42)
at org.apache.camel.reifier.ProcessorReifier.createOutputsProcessor(ProcessorReifier.java:590)
at org.apache.camel.reifier.ProcessorReifier.createChildProcessor(ProcessorReifier.java:612)
at org.apache.camel.reifier.StepReifier.createProcessor(StepReifier.java:36)
at org.apache.camel.reifier.ProcessorReifier.makeProcessor(ProcessorReifier.java:886) at org.apache.camel.reifier.ProcessorReifier.addRoutes(ProcessorReifier.java:622)
at org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:231)
... 28 more
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "samar-elsayed (via GitHub)" <gi...@apache.org>.
samar-elsayed commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2314834515
@oscerd you mean the properties I have configured for vault component ? or the configuration we have for the vault instance itself? and if it is the latter then which part of the vault instance configuration is needed for troubleshooting?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "mgubaidullin (via GitHub)" <gi...@apache.org>.
mgubaidullin closed issue #1348: Hashicorp Vault component
URL: https://github.com/apache/camel-karavan/issues/1348
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2540612881
The syntax for the db password is wrong. Read the documentation
Il ven 13 dic 2024, 06:27 jabhishek01 ***@***.***> ha scritto:
> @oscerd <https://github.com/oscerd> Thanks for sharing this. This worked
> for me. But when i configure datasource as bean that time i am getting this
> issue.
>
> - beans:
> - name: LocalPostgres
> type: com.zaxxer.hikari.HikariDataSource
> properties:
> driverClassName: org.postgresql.Driver
> jdbcUrl: >-
> jdbc:postgresql://dburl/smh
> username: smh_user
> password: "{{db.password}}"
> connectionTimeout: "10000"
> maximumPoolSize: "20"
> leakDetectionThreshold: "20000"
> maxLifetime: "300000"
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/apache/camel-karavan/issues/1348#issuecomment-2540582988>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABG6XV7SBL7FQBFNHECARO32FJV3TAVCNFSM6AAAAABL7ZECTGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNBQGU4DEOJYHA>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2540847489
It should be
`{{hashicorp:secret:db#password}}`
Where secret is the hashicorp engine, db is the secret name and password is field.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2282782767
It is CamelHashicorpVaultSecretPath
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2340068941
This is now supported and it will be available in 4.9.0
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Hashicorp Vault component [camel-karavan]
Posted by "samar-elsayed (via GitHub)" <gi...@apache.org>.
samar-elsayed commented on issue #1348:
URL: https://github.com/apache/camel-karavan/issues/1348#issuecomment-2340105913
Many Thanks @oscerd for your support and effort!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org