Springframework vault authentication 400 error

org.springframework.vault.authentication.VaultLoginException: Cannot retrieve VaultToken from authentication chain; nested exception is org.springframework.web.reactive.function.client.WebClientResponseException$BadRequest: 400 Bad Request from POST (https://vault.dugongstore.co.kr:443/v1/auth/aws/login)

using by this site Example 3.12

spring.cloud.vault:
    authentication: AWS_IAM
    aws-iam:
        role: my-dev-role
        aws-path: aws
        server-id: some.server.name

What should I do?

Bear in mind that this is a Vault users forum - lots of people here will know about Vault, but a substantially smaller proportion will know about Spring Framework.

Therefore it will be to your advantage to eliminate as much of the client-specific abstractions as possible, and ask a question purely in terms of Vault APIs, to maximise potential responses.

An HTTP 400 Bad Request means in general that the server thinks the client sent it bad input, so I would guess Vault believes the client is sending it an incorrect request. You’d have to look at the response body and relevant logs to find out more.

1 Like