ACL Auth Methods HTTP API
The /acl/auth-methods
and /acl/auth-method
endpoints are used to manage ACL Auth Methods.
Create Auth Method
This endpoint creates an ACL Auth Method. The request is always forwarded to the authoritative region.
Method | Path | Produces |
---|---|---|
POST | /acl/auth-method | application/json |
The table below shows this endpoint's support for blocking queries and required ACLs.
Blocking Queries | ACL Required |
---|---|
NO | management |
Parameters
Name
(string: <required>)
- Names is the identifier of the ACL Auth Method. The name can contain alphanumeric characters, dashes, and underscores. This name must be unique and must not exceed 128 characters.Type
(string: <required>)
- ACL Auth Role SSO identifier.TokenLocality
(string: <required>)
- Defines whether the ACL Auth Method creates a local or global token when performing SSO login. This field must be set to either "local" or "global"TokenNameFormat
(string <optional>)
- Defines the token name format for the generated tokens This can be lightly templated using HIL '${foo}' syntax. Defaults to '${auth_method_type}-${auth_method_name}'MaxTokenTTL
(duration: <required>)
- Defines the maximum life of a token created by this method. When set, it will initialize theExpirationTime
field on all tokens to a value ofToken.CreateTime + AuthMethod.MaxTokenTTL
. This field is not persisted beyond its initial use. Can be specified in the form of"60s"
or"5m"
(i.e., 60 seconds or 5 minutes, respectively).Default
(bool: false)
- Defines whether this ACL Auth Method is to be set as default when runningnomad login
command.Config
(ACLAuthMethodConfig: <required>)
- The raw configuration to use for the auth method. This parameter is part of the auth method configuration, not specific to Nomad.OIDCDiscoveryURL
(string: <required>)
- The OIDC Discovery URL, without any .well-known component (base path).OIDCClientID
(string: <required>)
- The OAuth Client ID configured with your OIDC provider.OIDCClientSecret
(string: <required>)
- The OAuth Client Secret configured with your OIDC provider.OIDCScopes
(array<string>)
- List of OIDC scopes.BoundAudiences
(array<string>)
- List of aud claims that are valid for login; any match is sufficient.AllowedRedirectURIs
(array<string>)
- A list of allowed values for redirect_uri. Must be non-empty.DiscoveryCaPem
(array<string>)
- PEM encoded CA certs for use by the TLS client used to talk with the OIDC Discovery URL. If not set, system certificates are used.SigningAlgs
(array<string>)
- A list of supported signing algorithms. Defaults toRS256
.ClaimMappings
(map[string]string)
- Mappings of claims (key) that will be copied to a metadata field (value). Use this if the claim you are capturing is singular (such as an attribute).When mapped, the values in each list can be any of a number, string, or boolean and will all be stringified when returned.
ListClaimMappings
(map[string]string)
- Mappings of claims (key) will be copied to a metadata field (value). Use this if the claim you are capturing is list-like (such as groups).
Sample Payload
Sample Request
Sample Response
Update Auth Method
This endpoint updates an existing ACL Auth Method. The request is always forwarded to the authoritative region.
Method | Path | Produces |
---|---|---|
POST | /acl/auth-method/:method_name | application/json |
The table below shows this endpoint's support for blocking queries and required ACLs.
Blocking Queries | ACL Required |
---|---|
NO | management |
Parameters
Name
(string: <required>)
- Names is the identifier of the ACL Auth Method. The name can contain alphanumeric characters, dashes, and underscores. This name must be unique and must not exceed 128 characters.Type
(string: <required>)
- ACL Auth Role SSO identifier. Currently, the only supported Type is "OIDC."TokenLocality
(string: "")
- Defines whether the ACL Auth Method creates a local or global token when performing SSO login. This field must be set to either "local" or "global"TokenNameFormat
(string <optional>)
- Defines the token name format for the generated tokens This can be lightly templated using HIL '${foo}' syntax. Defaults to '${auth_method_type}-${auth_method_name}'MaxTokenTTL
(duration: <required>)
- Defines the maximum life of a token created by this method. When set it will initialize theExpirationTime
field on all tokens to a value ofToken.CreateTime + AuthMethod.MaxTokenTTL
. This field is not persisted beyond its initial use. Can be specified in the form of"60s"
or"5m"
(i.e., 60 seconds or 5 minutes, respectively).Default
(bool: false)
- Defines whether this ACL Auth Method is to be set as default when runningnomad login
command.Config
(ACLAuthMethodConfig: nil)
- The raw configuration to use for the auth method. This parameter is part of the auth method configuration, not specific to Nomad.OIDCDiscoveryURL
(string: "")
- The OIDC Discovery URL, without any .well-known component (base path).OIDCClientID
(string: "")
- The OAuth Client ID configured with your OIDC provider.OIDCClientSecret
(string: "")
- The OAuth Client Secret configured with your OIDC provider.OIDCScopes
(array<string>)
- List of OIDC scopes.BoundAudiences
(array<string>)
- List of aud claims that are valid for login; any match is sufficient.AllowedRedirectURIs
(array<string>)
- A list of allowed values for redirect_uri. Must be non-empty.DiscoveryCaPem
(array<string>)
- PEM encoded CA certs for use by the TLS client used to talk with the OIDC Discovery URL. If not set, system certificates are used.SigningAlgs
(array<string>)
- A list of supported signing algorithms. Defaults toRS256
.ClaimMappings
(map[string]string)
- Mappings of claims (key) that will be copied to a metadata field (value). Use this if the claim you are capturing is singular (such as an attribute).When mapped, the values in each list can be any of a number, string, or boolean and will all be stringified when returned.
ListClaimMappings
(map[string]string)
- Mappings of claims (key) will be copied to a metadata field (value). Use this if the claim you are capturing is list-like (such as groups).
Sample Payload
Sample Request
Sample Response
List Auth Methods
This endpoint lists all ACL Auth Methods. This lists the auth methods that have been replicated to the region, and may lag behind the authoritative region.
Method | Path | Produces |
---|---|---|
GET | /acl/auth-methods | application/json |
The table below shows this endpoint's support for blocking queries, consistency modes and required ACLs.
Blocking Queries | Consistency Modes | ACL Required |
---|---|---|
YES | all | None |
Sample Request
Sample Response
Read Auth Method by Name
This endpoint reads an ACL Auth Method with the given name. This queries the auth method that has been replicated to the region, and may lag behind the authoritative region.
Method | Path | Produces |
---|---|---|
GET | /acl/auth-method/:method_name | application/json |
The table below shows this endpoint's support for blocking queries, consistency modes and required ACLs.
Blocking Queries | Consistency Modes | ACL Required |
---|---|---|
YES | all | management token |
Parameters
:method_name
(string: <required>)
- Specifies the name of the ACL Auth Method. This is specified as part of the path.
Sample Request
Sample Response
Delete Auth Method
This endpoint deletes the ACL Auth Method as identified by its name. This request is always forwarded to the authoritative region.
Method | Path | Produces |
---|---|---|
DELETE | /acl/auth-method/:method_name | (empty body) |
The table below shows this endpoint's support for blocking queries and required ACLs.
Blocking Queries | ACL Required |
---|---|
NO | management |
Parameters
method_name
(string: <required>)
- Specifies the name of auth method to delete and is specified as part of the path.
Sample Request