From db9dbdeb86d700bf499132c4ab3e0215f3903937 Mon Sep 17 00:00:00 2001 From: Daniel Somerfield Date: Fri, 11 Nov 2016 05:59:26 -0800 Subject: [PATCH] Added document to github auth backend covering user-specific policies. (#2084) --- website/source/docs/auth/github.html.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/website/source/docs/auth/github.html.md b/website/source/docs/auth/github.html.md index 44eb2c951..eb678fd43 100644 --- a/website/source/docs/auth/github.html.md +++ b/website/source/docs/auth/github.html.md @@ -122,6 +122,18 @@ The above would make anyone in the `dev` team receive tokens with the policy You can then auth with a user that is a member of the `dev` team using a Personal Access Token with the `read:org` scope. +You can also create mappings for specific users in a similar fashion with the +`map/users/` endpoint. +Example: + +``` +$ vault write auth/github/map/users/user1 value=user1-policy +Success! Data written to: auth/github/map/teams/user1 +``` + +Now a user with GitHub username `user1` will be assigned the `user1-policy` on authentication, +in addition to any team policies. + GitHub token can also be supplied from the env variable `VAULT_AUTH_GITHUB_TOKEN`. ```