Class AuthBackendRole
Manages an JWT/OIDC auth backend role in a Vault server. See the Vault documentation for more information.
Example Usage
using Pulumi;
using Vault = Pulumi.Vault;
class MyStack : Stack
{
public MyStack()
{
var jwt = new Vault.Jwt.AuthBackend("jwt", new Vault.Jwt.AuthBackendArgs
{
Path = "jwt",
});
var example = new Vault.Jwt.AuthBackendRole("example", new Vault.Jwt.AuthBackendRoleArgs
{
Backend = jwt.Path,
RoleName = "test-role",
TokenPolicies =
{
"default",
"dev",
"prod",
},
BoundAudiences =
{
"https://myco.test",
},
UserClaim = "https://vault/user",
RoleType = "jwt",
});
}
}
Inherited Members
Namespace: Pulumi.Vault.Jwt
Assembly: Pulumi.Vault.dll
Syntax
public class AuthBackendRole : CustomResource
Constructors
View SourceAuthBackendRole(String, AuthBackendRoleArgs, CustomResourceOptions)
Create a AuthBackendRole resource with the given unique name, arguments, and options.
Declaration
public AuthBackendRole(string name, AuthBackendRoleArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| AuthBackendRoleArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAllowedRedirectUris
The list of allowed values for redirect_uri during OIDC logins. Required for OIDC roles
Declaration
public Output<ImmutableArray<string>> AllowedRedirectUris { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Backend
The unique name of the auth backend to configure.
Defaults to jwt.
Declaration
public Output<string> Backend { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
BoundAudiences
(Required for roles of type jwt, optional for roles of
type oidc) List of aud claims to match against. Any match is sufficient.
Declaration
public Output<ImmutableArray<string>> BoundAudiences { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
BoundCidrs
If set, a list of CIDRs valid as the source address for login requests. This value is also encoded into any resulting token.
Declaration
public Output<ImmutableArray<string>> BoundCidrs { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
BoundClaims
If set, a map of claims/values to match against. The expected value may be a single string or a list of strings.
Declaration
public Output<ImmutableDictionary<string, object>> BoundClaims { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
BoundSubject
If set, requires that the sub claim matches
this value.
Declaration
public Output<string> BoundSubject { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ClaimMappings
If set, a map of claims (keys) to be copied to specified metadata fields (values).
Declaration
public Output<ImmutableDictionary<string, object>> ClaimMappings { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
ClockSkewLeeway
The amount of leeway to add to all claims to account for clock skew, in
seconds. Defaults to 60 seconds if set to 0 and can be disabled if set to -1.
Only applicable with "jwt" roles.
Declaration
public Output<int?> ClockSkewLeeway { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
ExpirationLeeway
The amount of leeway to add to expiration (exp) claims to account for
clock skew, in seconds. Defaults to 60 seconds if set to 0 and can be disabled if set to -1.
Only applicable with "jwt" roles.
Declaration
public Output<int?> ExpirationLeeway { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
GroupsClaim
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.
Declaration
public Output<string> GroupsClaim { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
GroupsClaimDelimiterPattern
(Optional; Deprecated. This field has been removed since Vault 1.1. If the groups claim is not at the top level, it can now be specified as a JSONPointer.) A pattern of delimiters used to allow the groups_claim to live outside of the top-level JWT structure. For instance, a groups_claim of meta/user.name/groups with this field set to // will expect nested structures named meta, user.name, and groups. If this field was set to /./ the groups information would expect to be via nested structures of meta, user, name, and groups.
Declaration
public Output<string> GroupsClaimDelimiterPattern { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
MaxTtl
The maximum allowed lifetime of tokens issued using this role, provided as a number of seconds.
Declaration
public Output<int?> MaxTtl { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
NotBeforeLeeway
The amount of leeway to add to not before (nbf) claims to account for
clock skew, in seconds. Defaults to 60 seconds if set to 0 and can be disabled if set to -1.
Only applicable with "jwt" roles.
Declaration
public Output<int?> NotBeforeLeeway { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
NumUses
If set, puts a use-count limitation on the issued token.
Declaration
public Output<int?> NumUses { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
OidcScopes
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.
Declaration
public Output<ImmutableArray<string>> OidcScopes { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Period
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.
Declaration
public Output<int?> Period { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
Policies
An array of strings specifying the policies to be set on tokens issued using this role.
Declaration
public Output<ImmutableArray<string>> Policies { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
RoleName
The name of the role.
Declaration
public Output<string> RoleName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
RoleType
Type of role, either "oidc" (default) or "jwt".
Declaration
public Output<string> RoleType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
TokenBoundCidrs
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.
Declaration
public Output<ImmutableArray<string>> TokenBoundCidrs { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
TokenExplicitMaxTtl
If set, will encode an
explicit max TTL
onto the token in number of seconds. This is a hard cap even if token_ttl and
token_max_ttl would otherwise allow a renewal.
Declaration
public Output<int?> TokenExplicitMaxTtl { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
TokenMaxTtl
The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
Declaration
public Output<int?> TokenMaxTtl { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
TokenNoDefaultPolicy
If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.
Declaration
public Output<bool?> TokenNoDefaultPolicy { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
TokenNumUses
The period, if any, in number of seconds to set on the token.
Declaration
public Output<int?> TokenNumUses { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
TokenPeriod
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.
Declaration
public Output<int?> TokenPeriod { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
TokenPolicies
List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.
Declaration
public Output<ImmutableArray<string>> TokenPolicies { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
TokenTtl
The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
Declaration
public Output<int?> TokenTtl { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
TokenType
The type of token that should be generated. Can be service,
batch, or default to use the mount's tuned default (which unless changed will be
service tokens). For token store roles, there are two additional possibilities:
default-service and default-batch which specify the type to return unless the client
requests a different type at generation time.
Declaration
public Output<string> TokenType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Ttl
The TTL period of tokens issued using this role, provided as a number of seconds.
Declaration
public Output<int?> Ttl { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
UserClaim
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.
Declaration
public Output<string> UserClaim { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
VerboseOidcLogging
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.
Declaration
public Output<bool?> VerboseOidcLogging { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Methods
View SourceGet(String, Input<String>, AuthBackendRoleState, CustomResourceOptions)
Get an existing AuthBackendRole resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static AuthBackendRole Get(string name, Input<string> id, AuthBackendRoleState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| AuthBackendRoleState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| AuthBackendRole |