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

Group lookup doesn't fill alias's mount_path, mount_type #5073

Closed
uepoch opened this issue Aug 8, 2018 · 1 comment
Closed

Group lookup doesn't fill alias's mount_path, mount_type #5073

uepoch opened this issue Aug 8, 2018 · 1 comment

Comments

@uepoch
Copy link
Contributor

uepoch commented Aug 8, 2018

Describe the bug
When using lookup for groups, vault doesn't enrich the group's alias with mount_path and mount_type

To Reproduce

#!/bin/bash

export VAULT_ADDR=http://localhost:8200
export VAULT_TOKEN=devtoken

function poison_pill
{
	pkill -P $$
}

function vault_up
{
	vault server -dev -dev-root-token-id="$VAULT_TOKEN" &
}

trap poison_pill EXIT



vault_up &

set -e

sleep 1

GROUP_ID=$(vault write -format=json identity/group type=external name=test-group | jq -r '.data.id' | tr -d '\n')

vault auth enable ldap

ACCESSOR=$(vault auth list -format=json | jq -r '.["ldap/"].accessor' | tr -d '\n')

ALIAS_ID=$(vault write -format=json identity/group-alias name=test-alias canonical_id=$GROUP_ID mount_accessor=$ACCESSOR | jq -r '.data.id' | tr -d '\n')

echo "--- LOOKUP GROUP NAME"
vault write -format=json identity/lookup/group name=test-group | jq '.data.alias'

echo "---------------------"
echo "--- LOOKUP ALIAS NAME"
vault write -format=json identity/lookup/group alias_name=test-alias alias_mount_accessor="$ACCESSOR" | jq '.data.alias'

echo "---------------"
echo "--- READ BY ID"
vault read -format=json identity/group-alias/id/$ALIAS_ID | jq '.data'


exit 1

Expected behavior
They should be filled with the correct data

Environment:

  • Vault Server Version (retrieve with vault status): Vault v0.10.4 ('f9aa073c048d7f17f64258ab3eea0a530973000c+CHANGES')

  • Vault CLI Version (retrieve with vault version): Vault v0.10.4 ('f9aa073c048d7f17f64258ab3eea0a530973000c+CHANGES')

  • Server Operating System/Architecture: Linux

Vault server configuration file(s):

Dev mode

Additional context

@uepoch
Copy link
Contributor Author

uepoch commented Aug 10, 2018

Review merged

@uepoch uepoch closed this as completed Aug 10, 2018
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

1 participant