Skip to content

Conversation

vsevel
Copy link
Contributor

@vsevel vsevel commented Nov 23, 2019

2 classes VaultAppRoleAuthBody and VaultAppRoleAuthAuthMetadata were missing implements VaultModel which is the marker when generating the ReflectiveClassBuildItem in VaultProcessor

@vsevel
Copy link
Contributor Author

vsevel commented Nov 23, 2019

complete reproducer:

docker run --ulimit memlock=-1:-1 --rm=true --memory-swappiness=0 --name postgres-quarkus-hibernate -e POSTGRES_USER=sarah -d -e POSTGRES_PASSWORD=connor -e POSTGRES_DB=mydatabase -p 5432:5432 postgres:10.5
docker run --rm --cap-add=IPC_LOCK -e VAULT_ADDR=http://localhost:8200 -p 8200:8200 -d --name=dev-vault vault:1.2.2

docker logs dev-vault
docker exec -it dev-vault sh
export VAULT_TOKEN=...

vault secrets disable secret
vault secrets enable -path=secret kv
vault kv put secret/myapps/vault-quickstart/config a-private-key=123456
vault kv put secret/myapps/vault-quickstart/db password=connor

cat <<EOF | vault policy write vault-quickstart-policy -
  path "secret/myapps/vault-quickstart/*" {
    capabilities = ["read"]
  }
EOF
vault auth enable approle
vault write auth/approle/role/myapprole policies=vault-quickstart-policy
vault read auth/approle/role/myapprole/role-id
vault write -f auth/approle/role/myapprole/secret-id

# change application.properties
quarkus.vault.authentication.app-role.role-id=...
quarkus.vault.authentication.app-role.secret-id=...

./mvnw clean install
java -jar target/vault-quickstart-1.0-SNAPSHOT-runner.jar
curl http://localhost:8080/hello/private-key
curl http://localhost:8080/hello/gift-count

export GRAALVM_HOME=/opt/graalvm
./mvnw package -Pnative
./target/vault-quickstart-1.0-SNAPSHOT-runner
curl http://localhost:8080/hello/private-key
curl http://localhost:8080/hello/gift-count

@vsevel
Copy link
Contributor Author

vsevel commented Nov 23, 2019

@sberyozkin @jaikiran @gsmet
this PR is fixing #5636 and has passed CI. can you review and consider it for a merge?
thanks

Copy link
Member

@machi1990 machi1990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks.

@jaikiran
Copy link
Member

Thank you @vsevel, this looks fine to me.

@gsmet gsmet added this to the 1.1.0 milestone Nov 24, 2019
@gsmet gsmet merged commit 2ea45ab into quarkusio:master Nov 24, 2019
@gsmet gsmet removed the backport? label Nov 24, 2019
@gsmet gsmet modified the milestones: 1.1.0, 1.0.0.Final Nov 24, 2019
@vsevel vsevel deleted the issue_5636 branch November 24, 2019 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants