vault.jwt.AuthBackendRole
Explore with Pulumi AI
Manages an JWT/OIDC auth backend role in a Vault server. See the Vault documentation for more information.
Example Usage
Role for JWT backend
using System.Collections.Generic;
using Pulumi;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var jwt = new Vault.Jwt.AuthBackend("jwt", new()
{
Path = "jwt",
});
var example = new Vault.Jwt.AuthBackendRole("example", new()
{
Backend = jwt.Path,
RoleName = "test-role",
TokenPolicies = new[]
{
"default",
"dev",
"prod",
},
BoundAudiences = new[]
{
"https://myco.test",
},
BoundClaims =
{
{ "color", "red,green,blue" },
},
UserClaim = "https://vault/user",
RoleType = "jwt",
});
});
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v5/go/vault/jwt"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
jwt, err := jwt.NewAuthBackend(ctx, "jwt", &jwt.AuthBackendArgs{
Path: pulumi.String("jwt"),
})
if err != nil {
return err
}
_, err = jwt.NewAuthBackendRole(ctx, "example", &jwt.AuthBackendRoleArgs{
Backend: jwt.Path,
RoleName: pulumi.String("test-role"),
TokenPolicies: pulumi.StringArray{
pulumi.String("default"),
pulumi.String("dev"),
pulumi.String("prod"),
},
BoundAudiences: pulumi.StringArray{
pulumi.String("https://myco.test"),
},
BoundClaims: pulumi.AnyMap{
"color": pulumi.Any("red,green,blue"),
},
UserClaim: pulumi.String("https://vault/user"),
RoleType: pulumi.String("jwt"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vault.jwt.AuthBackend;
import com.pulumi.vault.jwt.AuthBackendArgs;
import com.pulumi.vault.jwt.AuthBackendRole;
import com.pulumi.vault.jwt.AuthBackendRoleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var jwt = new AuthBackend("jwt", AuthBackendArgs.builder()
.path("jwt")
.build());
var example = new AuthBackendRole("example", AuthBackendRoleArgs.builder()
.backend(jwt.path())
.roleName("test-role")
.tokenPolicies(
"default",
"dev",
"prod")
.boundAudiences("https://myco.test")
.boundClaims(Map.of("color", "red,green,blue"))
.userClaim("https://vault/user")
.roleType("jwt")
.build());
}
}
import pulumi
import pulumi_vault as vault
jwt = vault.jwt.AuthBackend("jwt", path="jwt")
example = vault.jwt.AuthBackendRole("example",
backend=jwt.path,
role_name="test-role",
token_policies=[
"default",
"dev",
"prod",
],
bound_audiences=["https://myco.test"],
bound_claims={
"color": "red,green,blue",
},
user_claim="https://vault/user",
role_type="jwt")
import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const jwt = new vault.jwt.AuthBackend("jwt", {path: "jwt"});
const example = new vault.jwt.AuthBackendRole("example", {
backend: jwt.path,
roleName: "test-role",
tokenPolicies: [
"default",
"dev",
"prod",
],
boundAudiences: ["https://myco.test"],
boundClaims: {
color: "red,green,blue",
},
userClaim: "https://vault/user",
roleType: "jwt",
});
resources:
jwt:
type: vault:jwt:AuthBackend
properties:
path: jwt
example:
type: vault:jwt:AuthBackendRole
properties:
backend: ${jwt.path}
roleName: test-role
tokenPolicies:
- default
- dev
- prod
boundAudiences:
- https://myco.test
boundClaims:
color: red,green,blue
userClaim: https://vault/user
roleType: jwt
Role for OIDC backend
using System.Collections.Generic;
using Pulumi;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var oidc = new Vault.Jwt.AuthBackend("oidc", new()
{
Path = "oidc",
DefaultRole = "test-role",
});
var example = new Vault.Jwt.AuthBackendRole("example", new()
{
Backend = oidc.Path,
RoleName = "test-role",
TokenPolicies = new[]
{
"default",
"dev",
"prod",
},
UserClaim = "https://vault/user",
RoleType = "oidc",
AllowedRedirectUris = new[]
{
"http://localhost:8200/ui/vault/auth/oidc/oidc/callback",
},
});
});
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v5/go/vault/jwt"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
oidc, err := jwt.NewAuthBackend(ctx, "oidc", &jwt.AuthBackendArgs{
Path: pulumi.String("oidc"),
DefaultRole: pulumi.String("test-role"),
})
if err != nil {
return err
}
_, err = jwt.NewAuthBackendRole(ctx, "example", &jwt.AuthBackendRoleArgs{
Backend: oidc.Path,
RoleName: pulumi.String("test-role"),
TokenPolicies: pulumi.StringArray{
pulumi.String("default"),
pulumi.String("dev"),
pulumi.String("prod"),
},
UserClaim: pulumi.String("https://vault/user"),
RoleType: pulumi.String("oidc"),
AllowedRedirectUris: pulumi.StringArray{
pulumi.String("http://localhost:8200/ui/vault/auth/oidc/oidc/callback"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vault.jwt.AuthBackend;
import com.pulumi.vault.jwt.AuthBackendArgs;
import com.pulumi.vault.jwt.AuthBackendRole;
import com.pulumi.vault.jwt.AuthBackendRoleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var oidc = new AuthBackend("oidc", AuthBackendArgs.builder()
.path("oidc")
.defaultRole("test-role")
.build());
var example = new AuthBackendRole("example", AuthBackendRoleArgs.builder()
.backend(oidc.path())
.roleName("test-role")
.tokenPolicies(
"default",
"dev",
"prod")
.userClaim("https://vault/user")
.roleType("oidc")
.allowedRedirectUris("http://localhost:8200/ui/vault/auth/oidc/oidc/callback")
.build());
}
}
import pulumi
import pulumi_vault as vault
oidc = vault.jwt.AuthBackend("oidc",
path="oidc",
default_role="test-role")
example = vault.jwt.AuthBackendRole("example",
backend=oidc.path,
role_name="test-role",
token_policies=[
"default",
"dev",
"prod",
],
user_claim="https://vault/user",
role_type="oidc",
allowed_redirect_uris=["http://localhost:8200/ui/vault/auth/oidc/oidc/callback"])
import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const oidc = new vault.jwt.AuthBackend("oidc", {
path: "oidc",
defaultRole: "test-role",
});
const example = new vault.jwt.AuthBackendRole("example", {
backend: oidc.path,
roleName: "test-role",
tokenPolicies: [
"default",
"dev",
"prod",
],
userClaim: "https://vault/user",
roleType: "oidc",
allowedRedirectUris: ["http://localhost:8200/ui/vault/auth/oidc/oidc/callback"],
});
resources:
oidc:
type: vault:jwt:AuthBackend
properties:
path: oidc
defaultRole: test-role
example:
type: vault:jwt:AuthBackendRole
properties:
backend: ${oidc.path}
roleName: test-role
tokenPolicies:
- default
- dev
- prod
userClaim: https://vault/user
roleType: oidc
allowedRedirectUris:
- http://localhost:8200/ui/vault/auth/oidc/oidc/callback
Create AuthBackendRole Resource
new AuthBackendRole(name: string, args: AuthBackendRoleArgs, opts?: CustomResourceOptions);
@overload
def AuthBackendRole(resource_name: str,
opts: Optional[ResourceOptions] = None,
allowed_redirect_uris: Optional[Sequence[str]] = None,
backend: Optional[str] = None,
bound_audiences: Optional[Sequence[str]] = None,
bound_claims: Optional[Mapping[str, Any]] = None,
bound_claims_type: Optional[str] = None,
bound_subject: Optional[str] = None,
claim_mappings: Optional[Mapping[str, Any]] = None,
clock_skew_leeway: Optional[int] = None,
disable_bound_claims_parsing: Optional[bool] = None,
expiration_leeway: Optional[int] = None,
groups_claim: Optional[str] = None,
max_age: Optional[int] = None,
namespace: Optional[str] = None,
not_before_leeway: Optional[int] = None,
oidc_scopes: Optional[Sequence[str]] = None,
role_name: Optional[str] = None,
role_type: Optional[str] = None,
token_bound_cidrs: Optional[Sequence[str]] = None,
token_explicit_max_ttl: Optional[int] = None,
token_max_ttl: Optional[int] = None,
token_no_default_policy: Optional[bool] = None,
token_num_uses: Optional[int] = None,
token_period: Optional[int] = None,
token_policies: Optional[Sequence[str]] = None,
token_ttl: Optional[int] = None,
token_type: Optional[str] = None,
user_claim: Optional[str] = None,
user_claim_json_pointer: Optional[bool] = None,
verbose_oidc_logging: Optional[bool] = None)
@overload
def AuthBackendRole(resource_name: str,
args: AuthBackendRoleArgs,
opts: Optional[ResourceOptions] = None)
func NewAuthBackendRole(ctx *Context, name string, args AuthBackendRoleArgs, opts ...ResourceOption) (*AuthBackendRole, error)
public AuthBackendRole(string name, AuthBackendRoleArgs args, CustomResourceOptions? opts = null)
public AuthBackendRole(String name, AuthBackendRoleArgs args)
public AuthBackendRole(String name, AuthBackendRoleArgs args, CustomResourceOptions options)
type: vault:jwt:AuthBackendRole
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AuthBackendRoleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AuthBackendRoleArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AuthBackendRoleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AuthBackendRoleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AuthBackendRoleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
AuthBackendRole Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The AuthBackendRole resource accepts the following input properties:
- Role
Name string The name of the role.
- User
Claim string The claim to use to uniquely identify the user; this will be used as the name for the Identity entity alias created due to a successful login.
- Allowed
Redirect List<string>Uris The list of allowed values for redirect_uri during OIDC logins. Required for OIDC roles
- Backend string
The unique name of the auth backend to configure. Defaults to
jwt
.- Bound
Audiences List<string> (For "jwt" roles, at least one of
bound_audiences
,bound_subject
,bound_claims
ortoken_bound_cidrs
is required. Optional for "oidc" roles.) List ofaud
claims to match against. Any match is sufficient.- Bound
Claims Dictionary<string, object> If set, a map of claims to values to match against. A claim's value must be a string, which may contain one value or multiple comma-separated values, e.g.
"red"
or"red,green,blue"
.- Bound
Claims stringType How to interpret values in the claims/values map (
bound_claims
): can be eitherstring
(exact match) orglob
(wildcard match). Requires Vault 1.4.0 or above.- Bound
Subject string If set, requires that the
sub
claim matches this value.- Claim
Mappings Dictionary<string, object> If set, a map of claims (keys) to be copied to specified metadata fields (values).
- Clock
Skew intLeeway The amount of leeway to add to all claims to account for clock skew, in seconds. Defaults to
60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- Disable
Bound boolClaims Parsing Disable bound claim value parsing. Useful when values contain commas.
- Expiration
Leeway int The amount of leeway to add to expiration (
exp
) claims to account for clock skew, in seconds. Defaults to60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- Groups
Claim string The claim to use to uniquely identify the set of groups to which the user belongs; this will be used as the names for the Identity group aliases created due to a successful login. The claim value must be a list of strings.
- Max
Age int Specifies the allowable elapsed time in seconds since the last time the user was actively authenticated with the OIDC provider.
- Namespace string
The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The
namespace
is always relative to the provider's configured namespace. Available only for Vault Enterprise.- Not
Before intLeeway The amount of leeway to add to not before (
nbf
) claims to account for clock skew, in seconds. Defaults to60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- Oidc
Scopes List<string> If set, a list of OIDC scopes to be used with an OIDC role. The standard scope "openid" is automatically included and need not be specified.
- Role
Type string Type of role, either "oidc" (default) or "jwt".
- Token
Bound List<string>Cidrs List of CIDR blocks; if set, specifies blocks of IP addresses which can authenticate successfully, and ties the resulting token to these blocks as well.
- Token
Explicit intMax Ttl If set, will encode an explicit max TTL onto the token in number of seconds. This is a hard cap even if
token_ttl
andtoken_max_ttl
would otherwise allow a renewal.- Token
Max intTtl The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- Token
No boolDefault Policy If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.
- Token
Num intUses The maximum number of times a generated token may be used (within its lifetime); 0 means unlimited.
- Token
Period int If set, indicates that the token generated using this role should never expire. The token should be renewed within the duration specified by this value. At each renewal, the token's TTL will be set to the value of this field. Specified in seconds.
- Token
Policies List<string> List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.
- Token
Ttl int The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- Token
Type string The type of token that should be generated. Can be
service
,batch
, ordefault
to use the mount's tuned default (which unless changed will beservice
tokens). For token store roles, there are two additional possibilities:default-service
anddefault-batch
which specify the type to return unless the client requests a different type at generation time.- User
Claim boolJson Pointer Specifies if the
user_claim
value uses JSON pointer syntax for referencing claims. By default, theuser_claim
value will not use JSON pointer. Requires Vault 1.11+.- Verbose
Oidc boolLogging Log received OIDC tokens and claims when debug-level logging is active. Not recommended in production since sensitive information may be present in OIDC responses.
- Role
Name string The name of the role.
- User
Claim string The claim to use to uniquely identify the user; this will be used as the name for the Identity entity alias created due to a successful login.
- Allowed
Redirect []stringUris The list of allowed values for redirect_uri during OIDC logins. Required for OIDC roles
- Backend string
The unique name of the auth backend to configure. Defaults to
jwt
.- Bound
Audiences []string (For "jwt" roles, at least one of
bound_audiences
,bound_subject
,bound_claims
ortoken_bound_cidrs
is required. Optional for "oidc" roles.) List ofaud
claims to match against. Any match is sufficient.- Bound
Claims map[string]interface{} If set, a map of claims to values to match against. A claim's value must be a string, which may contain one value or multiple comma-separated values, e.g.
"red"
or"red,green,blue"
.- Bound
Claims stringType How to interpret values in the claims/values map (
bound_claims
): can be eitherstring
(exact match) orglob
(wildcard match). Requires Vault 1.4.0 or above.- Bound
Subject string If set, requires that the
sub
claim matches this value.- Claim
Mappings map[string]interface{} If set, a map of claims (keys) to be copied to specified metadata fields (values).
- Clock
Skew intLeeway The amount of leeway to add to all claims to account for clock skew, in seconds. Defaults to
60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- Disable
Bound boolClaims Parsing Disable bound claim value parsing. Useful when values contain commas.
- Expiration
Leeway int The amount of leeway to add to expiration (
exp
) claims to account for clock skew, in seconds. Defaults to60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- Groups
Claim string The claim to use to uniquely identify the set of groups to which the user belongs; this will be used as the names for the Identity group aliases created due to a successful login. The claim value must be a list of strings.
- Max
Age int Specifies the allowable elapsed time in seconds since the last time the user was actively authenticated with the OIDC provider.
- Namespace string
The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The
namespace
is always relative to the provider's configured namespace. Available only for Vault Enterprise.- Not
Before intLeeway The amount of leeway to add to not before (
nbf
) claims to account for clock skew, in seconds. Defaults to60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- Oidc
Scopes []string If set, a list of OIDC scopes to be used with an OIDC role. The standard scope "openid" is automatically included and need not be specified.
- Role
Type string Type of role, either "oidc" (default) or "jwt".
- Token
Bound []stringCidrs List of CIDR blocks; if set, specifies blocks of IP addresses which can authenticate successfully, and ties the resulting token to these blocks as well.
- Token
Explicit intMax Ttl If set, will encode an explicit max TTL onto the token in number of seconds. This is a hard cap even if
token_ttl
andtoken_max_ttl
would otherwise allow a renewal.- Token
Max intTtl The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- Token
No boolDefault Policy If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.
- Token
Num intUses The maximum number of times a generated token may be used (within its lifetime); 0 means unlimited.
- Token
Period int If set, indicates that the token generated using this role should never expire. The token should be renewed within the duration specified by this value. At each renewal, the token's TTL will be set to the value of this field. Specified in seconds.
- Token
Policies []string List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.
- Token
Ttl int The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- Token
Type string The type of token that should be generated. Can be
service
,batch
, ordefault
to use the mount's tuned default (which unless changed will beservice
tokens). For token store roles, there are two additional possibilities:default-service
anddefault-batch
which specify the type to return unless the client requests a different type at generation time.- User
Claim boolJson Pointer Specifies if the
user_claim
value uses JSON pointer syntax for referencing claims. By default, theuser_claim
value will not use JSON pointer. Requires Vault 1.11+.- Verbose
Oidc boolLogging Log received OIDC tokens and claims when debug-level logging is active. Not recommended in production since sensitive information may be present in OIDC responses.
- role
Name String The name of the role.
- user
Claim String The claim to use to uniquely identify the user; this will be used as the name for the Identity entity alias created due to a successful login.
- allowed
Redirect List<String>Uris The list of allowed values for redirect_uri during OIDC logins. Required for OIDC roles
- backend String
The unique name of the auth backend to configure. Defaults to
jwt
.- bound
Audiences List<String> (For "jwt" roles, at least one of
bound_audiences
,bound_subject
,bound_claims
ortoken_bound_cidrs
is required. Optional for "oidc" roles.) List ofaud
claims to match against. Any match is sufficient.- bound
Claims Map<String,Object> If set, a map of claims to values to match against. A claim's value must be a string, which may contain one value or multiple comma-separated values, e.g.
"red"
or"red,green,blue"
.- bound
Claims StringType How to interpret values in the claims/values map (
bound_claims
): can be eitherstring
(exact match) orglob
(wildcard match). Requires Vault 1.4.0 or above.- bound
Subject String If set, requires that the
sub
claim matches this value.- claim
Mappings Map<String,Object> If set, a map of claims (keys) to be copied to specified metadata fields (values).
- clock
Skew IntegerLeeway The amount of leeway to add to all claims to account for clock skew, in seconds. Defaults to
60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- disable
Bound BooleanClaims Parsing Disable bound claim value parsing. Useful when values contain commas.
- expiration
Leeway Integer The amount of leeway to add to expiration (
exp
) claims to account for clock skew, in seconds. Defaults to60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- groups
Claim String The claim to use to uniquely identify the set of groups to which the user belongs; this will be used as the names for the Identity group aliases created due to a successful login. The claim value must be a list of strings.
- max
Age Integer Specifies the allowable elapsed time in seconds since the last time the user was actively authenticated with the OIDC provider.
- namespace String
The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The
namespace
is always relative to the provider's configured namespace. Available only for Vault Enterprise.- not
Before IntegerLeeway The amount of leeway to add to not before (
nbf
) claims to account for clock skew, in seconds. Defaults to60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- oidc
Scopes List<String> If set, a list of OIDC scopes to be used with an OIDC role. The standard scope "openid" is automatically included and need not be specified.
- role
Type String Type of role, either "oidc" (default) or "jwt".
- token
Bound List<String>Cidrs List of CIDR blocks; if set, specifies blocks of IP addresses which can authenticate successfully, and ties the resulting token to these blocks as well.
- token
Explicit IntegerMax Ttl If set, will encode an explicit max TTL onto the token in number of seconds. This is a hard cap even if
token_ttl
andtoken_max_ttl
would otherwise allow a renewal.- token
Max IntegerTtl The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token
No BooleanDefault Policy If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.
- token
Num IntegerUses The maximum number of times a generated token may be used (within its lifetime); 0 means unlimited.
- token
Period Integer If set, indicates that the token generated using this role should never expire. The token should be renewed within the duration specified by this value. At each renewal, the token's TTL will be set to the value of this field. Specified in seconds.
- token
Policies List<String> List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.
- token
Ttl Integer The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token
Type String The type of token that should be generated. Can be
service
,batch
, ordefault
to use the mount's tuned default (which unless changed will beservice
tokens). For token store roles, there are two additional possibilities:default-service
anddefault-batch
which specify the type to return unless the client requests a different type at generation time.- user
Claim BooleanJson Pointer Specifies if the
user_claim
value uses JSON pointer syntax for referencing claims. By default, theuser_claim
value will not use JSON pointer. Requires Vault 1.11+.- verbose
Oidc BooleanLogging Log received OIDC tokens and claims when debug-level logging is active. Not recommended in production since sensitive information may be present in OIDC responses.
- role
Name string The name of the role.
- user
Claim string The claim to use to uniquely identify the user; this will be used as the name for the Identity entity alias created due to a successful login.
- allowed
Redirect string[]Uris The list of allowed values for redirect_uri during OIDC logins. Required for OIDC roles
- backend string
The unique name of the auth backend to configure. Defaults to
jwt
.- bound
Audiences string[] (For "jwt" roles, at least one of
bound_audiences
,bound_subject
,bound_claims
ortoken_bound_cidrs
is required. Optional for "oidc" roles.) List ofaud
claims to match against. Any match is sufficient.- bound
Claims {[key: string]: any} If set, a map of claims to values to match against. A claim's value must be a string, which may contain one value or multiple comma-separated values, e.g.
"red"
or"red,green,blue"
.- bound
Claims stringType How to interpret values in the claims/values map (
bound_claims
): can be eitherstring
(exact match) orglob
(wildcard match). Requires Vault 1.4.0 or above.- bound
Subject string If set, requires that the
sub
claim matches this value.- claim
Mappings {[key: string]: any} If set, a map of claims (keys) to be copied to specified metadata fields (values).
- clock
Skew numberLeeway The amount of leeway to add to all claims to account for clock skew, in seconds. Defaults to
60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- disable
Bound booleanClaims Parsing Disable bound claim value parsing. Useful when values contain commas.
- expiration
Leeway number The amount of leeway to add to expiration (
exp
) claims to account for clock skew, in seconds. Defaults to60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- groups
Claim string The claim to use to uniquely identify the set of groups to which the user belongs; this will be used as the names for the Identity group aliases created due to a successful login. The claim value must be a list of strings.
- max
Age number Specifies the allowable elapsed time in seconds since the last time the user was actively authenticated with the OIDC provider.
- namespace string
The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The
namespace
is always relative to the provider's configured namespace. Available only for Vault Enterprise.- not
Before numberLeeway The amount of leeway to add to not before (
nbf
) claims to account for clock skew, in seconds. Defaults to60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- oidc
Scopes string[] If set, a list of OIDC scopes to be used with an OIDC role. The standard scope "openid" is automatically included and need not be specified.
- role
Type string Type of role, either "oidc" (default) or "jwt".
- token
Bound string[]Cidrs List of CIDR blocks; if set, specifies blocks of IP addresses which can authenticate successfully, and ties the resulting token to these blocks as well.
- token
Explicit numberMax Ttl If set, will encode an explicit max TTL onto the token in number of seconds. This is a hard cap even if
token_ttl
andtoken_max_ttl
would otherwise allow a renewal.- token
Max numberTtl The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token
No booleanDefault Policy If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.
- token
Num numberUses The maximum number of times a generated token may be used (within its lifetime); 0 means unlimited.
- token
Period number If set, indicates that the token generated using this role should never expire. The token should be renewed within the duration specified by this value. At each renewal, the token's TTL will be set to the value of this field. Specified in seconds.
- token
Policies string[] List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.
- token
Ttl number The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token
Type string The type of token that should be generated. Can be
service
,batch
, ordefault
to use the mount's tuned default (which unless changed will beservice
tokens). For token store roles, there are two additional possibilities:default-service
anddefault-batch
which specify the type to return unless the client requests a different type at generation time.- user
Claim booleanJson Pointer Specifies if the
user_claim
value uses JSON pointer syntax for referencing claims. By default, theuser_claim
value will not use JSON pointer. Requires Vault 1.11+.- verbose
Oidc booleanLogging Log received OIDC tokens and claims when debug-level logging is active. Not recommended in production since sensitive information may be present in OIDC responses.
- role_
name str The name of the role.
- user_
claim str The claim to use to uniquely identify the user; this will be used as the name for the Identity entity alias created due to a successful login.
- allowed_
redirect_ Sequence[str]uris The list of allowed values for redirect_uri during OIDC logins. Required for OIDC roles
- backend str
The unique name of the auth backend to configure. Defaults to
jwt
.- bound_
audiences Sequence[str] (For "jwt" roles, at least one of
bound_audiences
,bound_subject
,bound_claims
ortoken_bound_cidrs
is required. Optional for "oidc" roles.) List ofaud
claims to match against. Any match is sufficient.- bound_
claims Mapping[str, Any] If set, a map of claims to values to match against. A claim's value must be a string, which may contain one value or multiple comma-separated values, e.g.
"red"
or"red,green,blue"
.- bound_
claims_ strtype How to interpret values in the claims/values map (
bound_claims
): can be eitherstring
(exact match) orglob
(wildcard match). Requires Vault 1.4.0 or above.- bound_
subject str If set, requires that the
sub
claim matches this value.- claim_
mappings Mapping[str, Any] If set, a map of claims (keys) to be copied to specified metadata fields (values).
- clock_
skew_ intleeway The amount of leeway to add to all claims to account for clock skew, in seconds. Defaults to
60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- disable_
bound_ boolclaims_ parsing Disable bound claim value parsing. Useful when values contain commas.
- expiration_
leeway int The amount of leeway to add to expiration (
exp
) claims to account for clock skew, in seconds. Defaults to60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- groups_
claim str The claim to use to uniquely identify the set of groups to which the user belongs; this will be used as the names for the Identity group aliases created due to a successful login. The claim value must be a list of strings.
- max_
age int Specifies the allowable elapsed time in seconds since the last time the user was actively authenticated with the OIDC provider.
- namespace str
The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The
namespace
is always relative to the provider's configured namespace. Available only for Vault Enterprise.- not_
before_ intleeway The amount of leeway to add to not before (
nbf
) claims to account for clock skew, in seconds. Defaults to60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- oidc_
scopes Sequence[str] If set, a list of OIDC scopes to be used with an OIDC role. The standard scope "openid" is automatically included and need not be specified.
- role_
type str Type of role, either "oidc" (default) or "jwt".
- token_
bound_ Sequence[str]cidrs List of CIDR blocks; if set, specifies blocks of IP addresses which can authenticate successfully, and ties the resulting token to these blocks as well.
- token_
explicit_ intmax_ ttl If set, will encode an explicit max TTL onto the token in number of seconds. This is a hard cap even if
token_ttl
andtoken_max_ttl
would otherwise allow a renewal.- token_
max_ intttl The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token_
no_ booldefault_ policy If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.
- token_
num_ intuses The maximum number of times a generated token may be used (within its lifetime); 0 means unlimited.
- token_
period int If set, indicates that the token generated using this role should never expire. The token should be renewed within the duration specified by this value. At each renewal, the token's TTL will be set to the value of this field. Specified in seconds.
- token_
policies Sequence[str] List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.
- token_
ttl int The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token_
type str The type of token that should be generated. Can be
service
,batch
, ordefault
to use the mount's tuned default (which unless changed will beservice
tokens). For token store roles, there are two additional possibilities:default-service
anddefault-batch
which specify the type to return unless the client requests a different type at generation time.- user_
claim_ booljson_ pointer Specifies if the
user_claim
value uses JSON pointer syntax for referencing claims. By default, theuser_claim
value will not use JSON pointer. Requires Vault 1.11+.- verbose_
oidc_ boollogging Log received OIDC tokens and claims when debug-level logging is active. Not recommended in production since sensitive information may be present in OIDC responses.
- role
Name String The name of the role.
- user
Claim String The claim to use to uniquely identify the user; this will be used as the name for the Identity entity alias created due to a successful login.
- allowed
Redirect List<String>Uris The list of allowed values for redirect_uri during OIDC logins. Required for OIDC roles
- backend String
The unique name of the auth backend to configure. Defaults to
jwt
.- bound
Audiences List<String> (For "jwt" roles, at least one of
bound_audiences
,bound_subject
,bound_claims
ortoken_bound_cidrs
is required. Optional for "oidc" roles.) List ofaud
claims to match against. Any match is sufficient.- bound
Claims Map<Any> If set, a map of claims to values to match against. A claim's value must be a string, which may contain one value or multiple comma-separated values, e.g.
"red"
or"red,green,blue"
.- bound
Claims StringType How to interpret values in the claims/values map (
bound_claims
): can be eitherstring
(exact match) orglob
(wildcard match). Requires Vault 1.4.0 or above.- bound
Subject String If set, requires that the
sub
claim matches this value.- claim
Mappings Map<Any> If set, a map of claims (keys) to be copied to specified metadata fields (values).
- clock
Skew NumberLeeway The amount of leeway to add to all claims to account for clock skew, in seconds. Defaults to
60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- disable
Bound BooleanClaims Parsing Disable bound claim value parsing. Useful when values contain commas.
- expiration
Leeway Number The amount of leeway to add to expiration (
exp
) claims to account for clock skew, in seconds. Defaults to60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- groups
Claim String The claim to use to uniquely identify the set of groups to which the user belongs; this will be used as the names for the Identity group aliases created due to a successful login. The claim value must be a list of strings.
- max
Age Number Specifies the allowable elapsed time in seconds since the last time the user was actively authenticated with the OIDC provider.
- namespace String
The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The
namespace
is always relative to the provider's configured namespace. Available only for Vault Enterprise.- not
Before NumberLeeway The amount of leeway to add to not before (
nbf
) claims to account for clock skew, in seconds. Defaults to60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- oidc
Scopes List<String> If set, a list of OIDC scopes to be used with an OIDC role. The standard scope "openid" is automatically included and need not be specified.
- role
Type String Type of role, either "oidc" (default) or "jwt".
- token
Bound List<String>Cidrs List of CIDR blocks; if set, specifies blocks of IP addresses which can authenticate successfully, and ties the resulting token to these blocks as well.
- token
Explicit NumberMax Ttl If set, will encode an explicit max TTL onto the token in number of seconds. This is a hard cap even if
token_ttl
andtoken_max_ttl
would otherwise allow a renewal.- token
Max NumberTtl The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token
No BooleanDefault Policy If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.
- token
Num NumberUses The maximum number of times a generated token may be used (within its lifetime); 0 means unlimited.
- token
Period Number If set, indicates that the token generated using this role should never expire. The token should be renewed within the duration specified by this value. At each renewal, the token's TTL will be set to the value of this field. Specified in seconds.
- token
Policies List<String> List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.
- token
Ttl Number The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token
Type String The type of token that should be generated. Can be
service
,batch
, ordefault
to use the mount's tuned default (which unless changed will beservice
tokens). For token store roles, there are two additional possibilities:default-service
anddefault-batch
which specify the type to return unless the client requests a different type at generation time.- user
Claim BooleanJson Pointer Specifies if the
user_claim
value uses JSON pointer syntax for referencing claims. By default, theuser_claim
value will not use JSON pointer. Requires Vault 1.11+.- verbose
Oidc BooleanLogging Log received OIDC tokens and claims when debug-level logging is active. Not recommended in production since sensitive information may be present in OIDC responses.
Outputs
All input properties are implicitly available as output properties. Additionally, the AuthBackendRole resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing AuthBackendRole Resource
Get an existing AuthBackendRole resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AuthBackendRoleState, opts?: CustomResourceOptions): AuthBackendRole
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
allowed_redirect_uris: Optional[Sequence[str]] = None,
backend: Optional[str] = None,
bound_audiences: Optional[Sequence[str]] = None,
bound_claims: Optional[Mapping[str, Any]] = None,
bound_claims_type: Optional[str] = None,
bound_subject: Optional[str] = None,
claim_mappings: Optional[Mapping[str, Any]] = None,
clock_skew_leeway: Optional[int] = None,
disable_bound_claims_parsing: Optional[bool] = None,
expiration_leeway: Optional[int] = None,
groups_claim: Optional[str] = None,
max_age: Optional[int] = None,
namespace: Optional[str] = None,
not_before_leeway: Optional[int] = None,
oidc_scopes: Optional[Sequence[str]] = None,
role_name: Optional[str] = None,
role_type: Optional[str] = None,
token_bound_cidrs: Optional[Sequence[str]] = None,
token_explicit_max_ttl: Optional[int] = None,
token_max_ttl: Optional[int] = None,
token_no_default_policy: Optional[bool] = None,
token_num_uses: Optional[int] = None,
token_period: Optional[int] = None,
token_policies: Optional[Sequence[str]] = None,
token_ttl: Optional[int] = None,
token_type: Optional[str] = None,
user_claim: Optional[str] = None,
user_claim_json_pointer: Optional[bool] = None,
verbose_oidc_logging: Optional[bool] = None) -> AuthBackendRole
func GetAuthBackendRole(ctx *Context, name string, id IDInput, state *AuthBackendRoleState, opts ...ResourceOption) (*AuthBackendRole, error)
public static AuthBackendRole Get(string name, Input<string> id, AuthBackendRoleState? state, CustomResourceOptions? opts = null)
public static AuthBackendRole get(String name, Output<String> id, AuthBackendRoleState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Allowed
Redirect List<string>Uris The list of allowed values for redirect_uri during OIDC logins. Required for OIDC roles
- Backend string
The unique name of the auth backend to configure. Defaults to
jwt
.- Bound
Audiences List<string> (For "jwt" roles, at least one of
bound_audiences
,bound_subject
,bound_claims
ortoken_bound_cidrs
is required. Optional for "oidc" roles.) List ofaud
claims to match against. Any match is sufficient.- Bound
Claims Dictionary<string, object> If set, a map of claims to values to match against. A claim's value must be a string, which may contain one value or multiple comma-separated values, e.g.
"red"
or"red,green,blue"
.- Bound
Claims stringType How to interpret values in the claims/values map (
bound_claims
): can be eitherstring
(exact match) orglob
(wildcard match). Requires Vault 1.4.0 or above.- Bound
Subject string If set, requires that the
sub
claim matches this value.- Claim
Mappings Dictionary<string, object> If set, a map of claims (keys) to be copied to specified metadata fields (values).
- Clock
Skew intLeeway The amount of leeway to add to all claims to account for clock skew, in seconds. Defaults to
60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- Disable
Bound boolClaims Parsing Disable bound claim value parsing. Useful when values contain commas.
- Expiration
Leeway int The amount of leeway to add to expiration (
exp
) claims to account for clock skew, in seconds. Defaults to60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- Groups
Claim string The claim to use to uniquely identify the set of groups to which the user belongs; this will be used as the names for the Identity group aliases created due to a successful login. The claim value must be a list of strings.
- Max
Age int Specifies the allowable elapsed time in seconds since the last time the user was actively authenticated with the OIDC provider.
- Namespace string
The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The
namespace
is always relative to the provider's configured namespace. Available only for Vault Enterprise.- Not
Before intLeeway The amount of leeway to add to not before (
nbf
) claims to account for clock skew, in seconds. Defaults to60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- Oidc
Scopes List<string> If set, a list of OIDC scopes to be used with an OIDC role. The standard scope "openid" is automatically included and need not be specified.
- Role
Name string The name of the role.
- Role
Type string Type of role, either "oidc" (default) or "jwt".
- Token
Bound List<string>Cidrs List of CIDR blocks; if set, specifies blocks of IP addresses which can authenticate successfully, and ties the resulting token to these blocks as well.
- Token
Explicit intMax Ttl If set, will encode an explicit max TTL onto the token in number of seconds. This is a hard cap even if
token_ttl
andtoken_max_ttl
would otherwise allow a renewal.- Token
Max intTtl The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- Token
No boolDefault Policy If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.
- Token
Num intUses The maximum number of times a generated token may be used (within its lifetime); 0 means unlimited.
- Token
Period int If set, indicates that the token generated using this role should never expire. The token should be renewed within the duration specified by this value. At each renewal, the token's TTL will be set to the value of this field. Specified in seconds.
- Token
Policies List<string> List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.
- Token
Ttl int The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- Token
Type string The type of token that should be generated. Can be
service
,batch
, ordefault
to use the mount's tuned default (which unless changed will beservice
tokens). For token store roles, there are two additional possibilities:default-service
anddefault-batch
which specify the type to return unless the client requests a different type at generation time.- User
Claim string The claim to use to uniquely identify the user; this will be used as the name for the Identity entity alias created due to a successful login.
- User
Claim boolJson Pointer Specifies if the
user_claim
value uses JSON pointer syntax for referencing claims. By default, theuser_claim
value will not use JSON pointer. Requires Vault 1.11+.- Verbose
Oidc boolLogging Log received OIDC tokens and claims when debug-level logging is active. Not recommended in production since sensitive information may be present in OIDC responses.
- Allowed
Redirect []stringUris The list of allowed values for redirect_uri during OIDC logins. Required for OIDC roles
- Backend string
The unique name of the auth backend to configure. Defaults to
jwt
.- Bound
Audiences []string (For "jwt" roles, at least one of
bound_audiences
,bound_subject
,bound_claims
ortoken_bound_cidrs
is required. Optional for "oidc" roles.) List ofaud
claims to match against. Any match is sufficient.- Bound
Claims map[string]interface{} If set, a map of claims to values to match against. A claim's value must be a string, which may contain one value or multiple comma-separated values, e.g.
"red"
or"red,green,blue"
.- Bound
Claims stringType How to interpret values in the claims/values map (
bound_claims
): can be eitherstring
(exact match) orglob
(wildcard match). Requires Vault 1.4.0 or above.- Bound
Subject string If set, requires that the
sub
claim matches this value.- Claim
Mappings map[string]interface{} If set, a map of claims (keys) to be copied to specified metadata fields (values).
- Clock
Skew intLeeway The amount of leeway to add to all claims to account for clock skew, in seconds. Defaults to
60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- Disable
Bound boolClaims Parsing Disable bound claim value parsing. Useful when values contain commas.
- Expiration
Leeway int The amount of leeway to add to expiration (
exp
) claims to account for clock skew, in seconds. Defaults to60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- Groups
Claim string The claim to use to uniquely identify the set of groups to which the user belongs; this will be used as the names for the Identity group aliases created due to a successful login. The claim value must be a list of strings.
- Max
Age int Specifies the allowable elapsed time in seconds since the last time the user was actively authenticated with the OIDC provider.
- Namespace string
The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The
namespace
is always relative to the provider's configured namespace. Available only for Vault Enterprise.- Not
Before intLeeway The amount of leeway to add to not before (
nbf
) claims to account for clock skew, in seconds. Defaults to60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- Oidc
Scopes []string If set, a list of OIDC scopes to be used with an OIDC role. The standard scope "openid" is automatically included and need not be specified.
- Role
Name string The name of the role.
- Role
Type string Type of role, either "oidc" (default) or "jwt".
- Token
Bound []stringCidrs List of CIDR blocks; if set, specifies blocks of IP addresses which can authenticate successfully, and ties the resulting token to these blocks as well.
- Token
Explicit intMax Ttl If set, will encode an explicit max TTL onto the token in number of seconds. This is a hard cap even if
token_ttl
andtoken_max_ttl
would otherwise allow a renewal.- Token
Max intTtl The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- Token
No boolDefault Policy If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.
- Token
Num intUses The maximum number of times a generated token may be used (within its lifetime); 0 means unlimited.
- Token
Period int If set, indicates that the token generated using this role should never expire. The token should be renewed within the duration specified by this value. At each renewal, the token's TTL will be set to the value of this field. Specified in seconds.
- Token
Policies []string List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.
- Token
Ttl int The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- Token
Type string The type of token that should be generated. Can be
service
,batch
, ordefault
to use the mount's tuned default (which unless changed will beservice
tokens). For token store roles, there are two additional possibilities:default-service
anddefault-batch
which specify the type to return unless the client requests a different type at generation time.- User
Claim string The claim to use to uniquely identify the user; this will be used as the name for the Identity entity alias created due to a successful login.
- User
Claim boolJson Pointer Specifies if the
user_claim
value uses JSON pointer syntax for referencing claims. By default, theuser_claim
value will not use JSON pointer. Requires Vault 1.11+.- Verbose
Oidc boolLogging Log received OIDC tokens and claims when debug-level logging is active. Not recommended in production since sensitive information may be present in OIDC responses.
- allowed
Redirect List<String>Uris The list of allowed values for redirect_uri during OIDC logins. Required for OIDC roles
- backend String
The unique name of the auth backend to configure. Defaults to
jwt
.- bound
Audiences List<String> (For "jwt" roles, at least one of
bound_audiences
,bound_subject
,bound_claims
ortoken_bound_cidrs
is required. Optional for "oidc" roles.) List ofaud
claims to match against. Any match is sufficient.- bound
Claims Map<String,Object> If set, a map of claims to values to match against. A claim's value must be a string, which may contain one value or multiple comma-separated values, e.g.
"red"
or"red,green,blue"
.- bound
Claims StringType How to interpret values in the claims/values map (
bound_claims
): can be eitherstring
(exact match) orglob
(wildcard match). Requires Vault 1.4.0 or above.- bound
Subject String If set, requires that the
sub
claim matches this value.- claim
Mappings Map<String,Object> If set, a map of claims (keys) to be copied to specified metadata fields (values).
- clock
Skew IntegerLeeway The amount of leeway to add to all claims to account for clock skew, in seconds. Defaults to
60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- disable
Bound BooleanClaims Parsing Disable bound claim value parsing. Useful when values contain commas.
- expiration
Leeway Integer The amount of leeway to add to expiration (
exp
) claims to account for clock skew, in seconds. Defaults to60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- groups
Claim String The claim to use to uniquely identify the set of groups to which the user belongs; this will be used as the names for the Identity group aliases created due to a successful login. The claim value must be a list of strings.
- max
Age Integer Specifies the allowable elapsed time in seconds since the last time the user was actively authenticated with the OIDC provider.
- namespace String
The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The
namespace
is always relative to the provider's configured namespace. Available only for Vault Enterprise.- not
Before IntegerLeeway The amount of leeway to add to not before (
nbf
) claims to account for clock skew, in seconds. Defaults to60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- oidc
Scopes List<String> If set, a list of OIDC scopes to be used with an OIDC role. The standard scope "openid" is automatically included and need not be specified.
- role
Name String The name of the role.
- role
Type String Type of role, either "oidc" (default) or "jwt".
- token
Bound List<String>Cidrs List of CIDR blocks; if set, specifies blocks of IP addresses which can authenticate successfully, and ties the resulting token to these blocks as well.
- token
Explicit IntegerMax Ttl If set, will encode an explicit max TTL onto the token in number of seconds. This is a hard cap even if
token_ttl
andtoken_max_ttl
would otherwise allow a renewal.- token
Max IntegerTtl The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token
No BooleanDefault Policy If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.
- token
Num IntegerUses The maximum number of times a generated token may be used (within its lifetime); 0 means unlimited.
- token
Period Integer If set, indicates that the token generated using this role should never expire. The token should be renewed within the duration specified by this value. At each renewal, the token's TTL will be set to the value of this field. Specified in seconds.
- token
Policies List<String> List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.
- token
Ttl Integer The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token
Type String The type of token that should be generated. Can be
service
,batch
, ordefault
to use the mount's tuned default (which unless changed will beservice
tokens). For token store roles, there are two additional possibilities:default-service
anddefault-batch
which specify the type to return unless the client requests a different type at generation time.- user
Claim String The claim to use to uniquely identify the user; this will be used as the name for the Identity entity alias created due to a successful login.
- user
Claim BooleanJson Pointer Specifies if the
user_claim
value uses JSON pointer syntax for referencing claims. By default, theuser_claim
value will not use JSON pointer. Requires Vault 1.11+.- verbose
Oidc BooleanLogging Log received OIDC tokens and claims when debug-level logging is active. Not recommended in production since sensitive information may be present in OIDC responses.
- allowed
Redirect string[]Uris The list of allowed values for redirect_uri during OIDC logins. Required for OIDC roles
- backend string
The unique name of the auth backend to configure. Defaults to
jwt
.- bound
Audiences string[] (For "jwt" roles, at least one of
bound_audiences
,bound_subject
,bound_claims
ortoken_bound_cidrs
is required. Optional for "oidc" roles.) List ofaud
claims to match against. Any match is sufficient.- bound
Claims {[key: string]: any} If set, a map of claims to values to match against. A claim's value must be a string, which may contain one value or multiple comma-separated values, e.g.
"red"
or"red,green,blue"
.- bound
Claims stringType How to interpret values in the claims/values map (
bound_claims
): can be eitherstring
(exact match) orglob
(wildcard match). Requires Vault 1.4.0 or above.- bound
Subject string If set, requires that the
sub
claim matches this value.- claim
Mappings {[key: string]: any} If set, a map of claims (keys) to be copied to specified metadata fields (values).
- clock
Skew numberLeeway The amount of leeway to add to all claims to account for clock skew, in seconds. Defaults to
60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- disable
Bound booleanClaims Parsing Disable bound claim value parsing. Useful when values contain commas.
- expiration
Leeway number The amount of leeway to add to expiration (
exp
) claims to account for clock skew, in seconds. Defaults to60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- groups
Claim string The claim to use to uniquely identify the set of groups to which the user belongs; this will be used as the names for the Identity group aliases created due to a successful login. The claim value must be a list of strings.
- max
Age number Specifies the allowable elapsed time in seconds since the last time the user was actively authenticated with the OIDC provider.
- namespace string
The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The
namespace
is always relative to the provider's configured namespace. Available only for Vault Enterprise.- not
Before numberLeeway The amount of leeway to add to not before (
nbf
) claims to account for clock skew, in seconds. Defaults to60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- oidc
Scopes string[] If set, a list of OIDC scopes to be used with an OIDC role. The standard scope "openid" is automatically included and need not be specified.
- role
Name string The name of the role.
- role
Type string Type of role, either "oidc" (default) or "jwt".
- token
Bound string[]Cidrs List of CIDR blocks; if set, specifies blocks of IP addresses which can authenticate successfully, and ties the resulting token to these blocks as well.
- token
Explicit numberMax Ttl If set, will encode an explicit max TTL onto the token in number of seconds. This is a hard cap even if
token_ttl
andtoken_max_ttl
would otherwise allow a renewal.- token
Max numberTtl The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token
No booleanDefault Policy If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.
- token
Num numberUses The maximum number of times a generated token may be used (within its lifetime); 0 means unlimited.
- token
Period number If set, indicates that the token generated using this role should never expire. The token should be renewed within the duration specified by this value. At each renewal, the token's TTL will be set to the value of this field. Specified in seconds.
- token
Policies string[] List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.
- token
Ttl number The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token
Type string The type of token that should be generated. Can be
service
,batch
, ordefault
to use the mount's tuned default (which unless changed will beservice
tokens). For token store roles, there are two additional possibilities:default-service
anddefault-batch
which specify the type to return unless the client requests a different type at generation time.- user
Claim string The claim to use to uniquely identify the user; this will be used as the name for the Identity entity alias created due to a successful login.
- user
Claim booleanJson Pointer Specifies if the
user_claim
value uses JSON pointer syntax for referencing claims. By default, theuser_claim
value will not use JSON pointer. Requires Vault 1.11+.- verbose
Oidc booleanLogging Log received OIDC tokens and claims when debug-level logging is active. Not recommended in production since sensitive information may be present in OIDC responses.
- allowed_
redirect_ Sequence[str]uris The list of allowed values for redirect_uri during OIDC logins. Required for OIDC roles
- backend str
The unique name of the auth backend to configure. Defaults to
jwt
.- bound_
audiences Sequence[str] (For "jwt" roles, at least one of
bound_audiences
,bound_subject
,bound_claims
ortoken_bound_cidrs
is required. Optional for "oidc" roles.) List ofaud
claims to match against. Any match is sufficient.- bound_
claims Mapping[str, Any] If set, a map of claims to values to match against. A claim's value must be a string, which may contain one value or multiple comma-separated values, e.g.
"red"
or"red,green,blue"
.- bound_
claims_ strtype How to interpret values in the claims/values map (
bound_claims
): can be eitherstring
(exact match) orglob
(wildcard match). Requires Vault 1.4.0 or above.- bound_
subject str If set, requires that the
sub
claim matches this value.- claim_
mappings Mapping[str, Any] If set, a map of claims (keys) to be copied to specified metadata fields (values).
- clock_
skew_ intleeway The amount of leeway to add to all claims to account for clock skew, in seconds. Defaults to
60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- disable_
bound_ boolclaims_ parsing Disable bound claim value parsing. Useful when values contain commas.
- expiration_
leeway int The amount of leeway to add to expiration (
exp
) claims to account for clock skew, in seconds. Defaults to60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- groups_
claim str The claim to use to uniquely identify the set of groups to which the user belongs; this will be used as the names for the Identity group aliases created due to a successful login. The claim value must be a list of strings.
- max_
age int Specifies the allowable elapsed time in seconds since the last time the user was actively authenticated with the OIDC provider.
- namespace str
The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The
namespace
is always relative to the provider's configured namespace. Available only for Vault Enterprise.- not_
before_ intleeway The amount of leeway to add to not before (
nbf
) claims to account for clock skew, in seconds. Defaults to60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- oidc_
scopes Sequence[str] If set, a list of OIDC scopes to be used with an OIDC role. The standard scope "openid" is automatically included and need not be specified.
- role_
name str The name of the role.
- role_
type str Type of role, either "oidc" (default) or "jwt".
- token_
bound_ Sequence[str]cidrs List of CIDR blocks; if set, specifies blocks of IP addresses which can authenticate successfully, and ties the resulting token to these blocks as well.
- token_
explicit_ intmax_ ttl If set, will encode an explicit max TTL onto the token in number of seconds. This is a hard cap even if
token_ttl
andtoken_max_ttl
would otherwise allow a renewal.- token_
max_ intttl The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token_
no_ booldefault_ policy If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.
- token_
num_ intuses The maximum number of times a generated token may be used (within its lifetime); 0 means unlimited.
- token_
period int If set, indicates that the token generated using this role should never expire. The token should be renewed within the duration specified by this value. At each renewal, the token's TTL will be set to the value of this field. Specified in seconds.
- token_
policies Sequence[str] List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.
- token_
ttl int The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token_
type str The type of token that should be generated. Can be
service
,batch
, ordefault
to use the mount's tuned default (which unless changed will beservice
tokens). For token store roles, there are two additional possibilities:default-service
anddefault-batch
which specify the type to return unless the client requests a different type at generation time.- user_
claim str The claim to use to uniquely identify the user; this will be used as the name for the Identity entity alias created due to a successful login.
- user_
claim_ booljson_ pointer Specifies if the
user_claim
value uses JSON pointer syntax for referencing claims. By default, theuser_claim
value will not use JSON pointer. Requires Vault 1.11+.- verbose_
oidc_ boollogging Log received OIDC tokens and claims when debug-level logging is active. Not recommended in production since sensitive information may be present in OIDC responses.
- allowed
Redirect List<String>Uris The list of allowed values for redirect_uri during OIDC logins. Required for OIDC roles
- backend String
The unique name of the auth backend to configure. Defaults to
jwt
.- bound
Audiences List<String> (For "jwt" roles, at least one of
bound_audiences
,bound_subject
,bound_claims
ortoken_bound_cidrs
is required. Optional for "oidc" roles.) List ofaud
claims to match against. Any match is sufficient.- bound
Claims Map<Any> If set, a map of claims to values to match against. A claim's value must be a string, which may contain one value or multiple comma-separated values, e.g.
"red"
or"red,green,blue"
.- bound
Claims StringType How to interpret values in the claims/values map (
bound_claims
): can be eitherstring
(exact match) orglob
(wildcard match). Requires Vault 1.4.0 or above.- bound
Subject String If set, requires that the
sub
claim matches this value.- claim
Mappings Map<Any> If set, a map of claims (keys) to be copied to specified metadata fields (values).
- clock
Skew NumberLeeway The amount of leeway to add to all claims to account for clock skew, in seconds. Defaults to
60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- disable
Bound BooleanClaims Parsing Disable bound claim value parsing. Useful when values contain commas.
- expiration
Leeway Number The amount of leeway to add to expiration (
exp
) claims to account for clock skew, in seconds. Defaults to60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- groups
Claim String The claim to use to uniquely identify the set of groups to which the user belongs; this will be used as the names for the Identity group aliases created due to a successful login. The claim value must be a list of strings.
- max
Age Number Specifies the allowable elapsed time in seconds since the last time the user was actively authenticated with the OIDC provider.
- namespace String
The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The
namespace
is always relative to the provider's configured namespace. Available only for Vault Enterprise.- not
Before NumberLeeway The amount of leeway to add to not before (
nbf
) claims to account for clock skew, in seconds. Defaults to60
seconds if set to0
and can be disabled if set to-1
. Only applicable with "jwt" roles.- oidc
Scopes List<String> If set, a list of OIDC scopes to be used with an OIDC role. The standard scope "openid" is automatically included and need not be specified.
- role
Name String The name of the role.
- role
Type String Type of role, either "oidc" (default) or "jwt".
- token
Bound List<String>Cidrs List of CIDR blocks; if set, specifies blocks of IP addresses which can authenticate successfully, and ties the resulting token to these blocks as well.
- token
Explicit NumberMax Ttl If set, will encode an explicit max TTL onto the token in number of seconds. This is a hard cap even if
token_ttl
andtoken_max_ttl
would otherwise allow a renewal.- token
Max NumberTtl The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token
No BooleanDefault Policy If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.
- token
Num NumberUses The maximum number of times a generated token may be used (within its lifetime); 0 means unlimited.
- token
Period Number If set, indicates that the token generated using this role should never expire. The token should be renewed within the duration specified by this value. At each renewal, the token's TTL will be set to the value of this field. Specified in seconds.
- token
Policies List<String> List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.
- token
Ttl Number The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token
Type String The type of token that should be generated. Can be
service
,batch
, ordefault
to use the mount's tuned default (which unless changed will beservice
tokens). For token store roles, there are two additional possibilities:default-service
anddefault-batch
which specify the type to return unless the client requests a different type at generation time.- user
Claim String The claim to use to uniquely identify the user; this will be used as the name for the Identity entity alias created due to a successful login.
- user
Claim BooleanJson Pointer Specifies if the
user_claim
value uses JSON pointer syntax for referencing claims. By default, theuser_claim
value will not use JSON pointer. Requires Vault 1.11+.- verbose
Oidc BooleanLogging Log received OIDC tokens and claims when debug-level logging is active. Not recommended in production since sensitive information may be present in OIDC responses.
Import
JWT authentication backend roles can be imported using the path
, e.g.
$ pulumi import vault:jwt/authBackendRole:AuthBackendRole example auth/jwt/role/test-role
Package Details
- Repository
- Vault pulumi/pulumi-vault
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
vault
Terraform Provider.