Quarkus Integration With Hashicorp Vault #26609
rhuamanile
started this conversation in
Community
Replies: 3 comments 9 replies
-
Beta Was this translation helpful? Give feedback.
1 reply
-
Beta Was this translation helpful? Give feedback.
8 replies
-
Thanks for help. I found the solution configuring this property |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone.
I am working in a poc for integration with hashicorp vault for get secrets but I have some questions:
In my Poc I am using Kubernetes authentication and I configure all properties required according to official documentation.
For example:
quarkus.vault.url=http://localhost:8200 quarkus.vault.secret-config-kv-path=kv/poc/hashicorp quarkus.vault.authentication.kubernetes.role=poc-hashicorp quarkus.vault.enterprise.namespace=namespacetest quarkus.log.category."io.quarkus.vault".level=DEBUG
After that I created Service Account, Cluster role in kubernetes. In hashicorp I create Access group for Kubernetes Auth, Policies and Role where I associated to my Service Account in Kubernetes.
I test all this configuration from my pod using a curl and it's works well.
But, when I deployed my app in kubernetes I have an error:
`ERROR: Failed to start application (with profile desa)
io.quarkus.vault.runtime.client.VaultClientException code=400 body={"errors":["invalid role name "poc-hashicorp""]}
I was searching the cause and I found that Kubernetes is trying to login with this url:
http://localhost:8200/v1/auth/**kubernetes**/login
In hashicorp I have two Access group kubernetes and pocforhasdhicorp. I created in this Access group, this is where you can configure your ca.crt, issuer, jwt verifier that I got from Kubernetes.
So my role poc-hashicorp, I create in pocforhasdhicorp with the next command:
vault write auth/pocforhasdhicorp/role/poc-hashicorp bound_service_account_names=poc-hashicorp-sa
...My pod is trying to login with default http://localhost:8200/v1/auth/**kubernetes**/login , but I need specified this login url: http://localhost:8200/v1/auth/**pocforhasdhicorp**/login, because my role is created here.
In other projects Like Spring boot: I use this environment SPRING_CLOUD_VAULT_KUBERNETES_KUBERNETES-PATH, but in Quarkus I can´t found any documentation for set this path authentication(Access group in Hashicorp) value to login with Hashicorp Vault.
I can´t any properties for set this value or probably override this value in Kubernetes or application.
Any suggestion or help or help will be well received.
Thanks a lot
Beta Was this translation helpful? Give feedback.
All reactions