You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When creating or updating an approle role with the token_type parameter set to either default-service or default-batch, the server (Vault) returns an empty reply and the role is not created/updated.
To Reproduce
Setup Vault is dev mode: docker run -d --name vault -p 8200:8200 -e SKIP_SETCAP=1 vault:1.7.2 vault server -dev -dev-root-token-id=root -dev-listen-address=0.0.0.0:8200
Any of the following commands will reproduce the behavior:
Run vault write auth/approle/role/new token_type=default-service
Run vault write auth/approle/role/new token_type=default-batch
Run vault write auth/approle/role/new ; vault write auth/approle/role/new token_type=default-service
Run vault write auth/approle/role/new2 ; vault write auth/approle/role/new2 token_type=default-batch
Effects
For any of the above commands, the final vault command exits with a status code of 2 with the following message written to stderr: Error writing data to auth/approle/role/new: Put http://localhost:8200/v1/auth/approle/role/new: EOF
In addition, the following stack trace is written to the Vault logs (docker logs vault):
Expected behavior
I am aware that those values (default-service and default-batch) are only applicable to the Token Store, however there is code in the approle backend to handle these cases (to change the token_type to service or batch) and add a warning to the response.
Environment:
Vault Server Version (retrieve with vault status): 1.7.2
Vault CLI Version (retrieve with vault version): Vault v1.3.3
Server Operating System/Architecture: Docker Engine version 20.10.6 linux/amd64 (running on darwin/amd64)
Vault server configuration file(s): N/A
Additional context
I discovered this issue while studying the approle code and I will be submitting a PR to address this issue.
The text was updated successfully, but these errors were encountered:
Describe the bug
When creating or updating an approle role with the token_type parameter set to either
default-service
ordefault-batch
, the server (Vault) returns an empty reply and the role is not created/updated.To Reproduce
Setup Vault is dev mode:
docker run -d --name vault -p 8200:8200 -e SKIP_SETCAP=1 vault:1.7.2 vault server -dev -dev-root-token-id=root -dev-listen-address=0.0.0.0:8200
Any of the following commands will reproduce the behavior:
vault write auth/approle/role/new token_type=default-service
vault write auth/approle/role/new token_type=default-batch
vault write auth/approle/role/new ; vault write auth/approle/role/new token_type=default-service
vault write auth/approle/role/new2 ; vault write auth/approle/role/new2 token_type=default-batch
Effects
For any of the above commands, the final vault command exits with a status code of 2 with the following message written to stderr:
Error writing data to auth/approle/role/new: Put http://localhost:8200/v1/auth/approle/role/new: EOF
In addition, the following stack trace is written to the Vault logs (
docker logs vault
):Expected behavior
I am aware that those values (
default-service
anddefault-batch
) are only applicable to the Token Store, however there is code in the approle backend to handle these cases (to change the token_type to service or batch) and add a warning to the response.Environment:
vault status
): 1.7.2vault version
): Vault v1.3.3Vault server configuration file(s): N/A
Additional context
I discovered this issue while studying the approle code and I will be submitting a PR to address this issue.
The text was updated successfully, but these errors were encountered: