Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read GCP role returns different value than described in documentation #56

Closed
Phylu opened this issue Nov 14, 2018 · 2 comments
Closed

Comments

@Phylu
Copy link

Phylu commented Nov 14, 2018

Describe the bug
The type of a gcp role when running a read operation is named "role" instead of "role_type" as described in the documentation.

To Reproduce

  1. Get a defined gcp role:
$ curl \
    --header "X-Vault-Token: ..." \
    http://127.0.0.1:8200/v1/auth/gcp/role/my-role
  1. The answer looks like this:
{
  "data": {
    ...
    "project_id": "project-123456",
    "role": "iam",
    "ttl": 1800
  }
}

Please note the "role" attribute set to gce here.

Expected behavior
As described in the documentation the "role" attribute should be named "role_type".

Environment:

  • Vault Server Version (retrieve with vault status): 0.11.4
  • Vault CLI Version (retrieve with vault version): 0.11.4
  • Server Operating System/Architecture: MacOS

Additional context
This breaks functionality in the terraform-provider-vault. Which is the expected value here? "role_type" as in the documentation (then it is a bug), or "role" as in the current implementation (then the documentation should be updated (and I will take care of the terraform provider), or a totally different name such as "type" which is used when creating a gcp role initially.

@kalafut
Copy link
Contributor

kalafut commented Nov 14, 2018

Thanks for highlighting this. This was changed recently in #52

I will review/update the Vault docs.

@emilymye
Copy link
Contributor

Thanks for fixing this @kalafut!

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

No branches or pull requests

3 participants