GitHub auth method (API)
This is the API documentation for the Vault GitHub auth method. For general information about the usage and operation of the GitHub method, please see the Vault GitHub method documentation.
This documentation assumes the GitHub method is enabled at the /auth/github
path in Vault. Since it is possible to enable auth methods at any location, please update your API calls accordingly.
Configure method
Configures the connection parameters for GitHub. This path honors the distinction between the create
and update
capabilities inside ACL policies.
Method | Path |
---|---|
|
|
Parameters
organization
(string: <required>)
- The organization users must be part of.organization_id
(int: 0)
- The ID of the organization users must be part of. Vault will attempt to fetch and set this value if it is not provided.base_url
(string: "")
- The API endpoint to use. Useful if you are running GitHub Enterprise or an API-compatible authentication server.
Environment variables
VAULT_AUTH_CONFIG_GITHUB_TOKEN
(string: "")
- An optional GitHub token used to make authenticated GitHub API requests. This can be useful for bypassing GitHub's rate-limiting during automation flows when theorganization_id
is not provided. We encourage you to provide theorganization_id
instead of relying on this environment variable.
@include 'tokenfields.mdx'
Sample payload
Sample request
Read configuration
Reads the GitHub configuration.
Method | Path |
---|---|
|
|
Sample request
Sample response
Map GitHub teams
Map a list of policies to a team that exists in the configured GitHub organization.
Method | Path |
---|---|
|
|
Parameters
team_name
(string)
- GitHub team name in "slugified" formatvalue
(string)
- Comma separated list of policies to assign
Sample payload
Sample request
Read team mapping
Reads the GitHub team policy mapping.
Method | Path |
---|---|
|
|
Sample request
Sample response
Map GitHub users
Map a list of policies to a specific GitHub user exists in the configured organization.
Method | Path |
---|---|
|
|
Parameters
user_name
(string)
- GitHub user namevalue
(string)
- Comma separated list of policies to assign
Sample payload
Sample request
The user with username sethvargo
will be assigned the sethvargo-policy
policy in addition to any team policies.
Read user mapping
Reads the GitHub user policy mapping.
Method | Path |
---|---|
|
|
Sample request
Sample response
Login
Login using GitHub access token.
Method | Path |
---|---|
|
|
Parameters
token
(string: <required>)
- GitHub personal API token.
Sample payload
Sample request
Sample response
Last updated