AuthBackendRole
Manages Token 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 example = new Vault.TokenAuth.AuthBackendRole("example", new Vault.TokenAuth.AuthBackendRoleArgs
{
AllowedPolicies =
{
"dev",
"test",
},
DisallowedPolicies =
{
"default",
},
ExplicitMaxTtl = "115200",
Orphan = true,
PathSuffix = "path-suffix",
Period = "86400",
Renewable = true,
RoleName = "my-role",
});
}
}
Coming soon!
import pulumi
import pulumi_vault as vault
example = vault.tokenauth.AuthBackendRole("example",
allowed_policies=[
"dev",
"test",
],
disallowed_policies=["default"],
explicit_max_ttl="115200",
orphan=True,
path_suffix="path-suffix",
period="86400",
renewable=True,
role_name="my-role")import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const example = new vault.tokenauth.AuthBackendRole("example", {
allowedPolicies: [
"dev",
"test",
],
disallowedPolicies: ["default"],
explicitMaxTtl: "115200",
orphan: true,
pathSuffix: "path-suffix",
period: "86400",
renewable: true,
roleName: "my-role",
});Create a AuthBackendRole Resource
new AuthBackendRole(name: string, args: AuthBackendRoleArgs, opts?: CustomResourceOptions);def AuthBackendRole(resource_name, opts=None, allowed_policies=None, bound_cidrs=None, disallowed_policies=None, explicit_max_ttl=None, orphan=None, path_suffix=None, period=None, renewable=None, role_name=None, token_bound_cidrs=None, token_explicit_max_ttl=None, token_max_ttl=None, token_no_default_policy=None, token_num_uses=None, token_period=None, token_policies=None, token_ttl=None, token_type=None, __props__=None);func NewAuthBackendRole(ctx *Context, name string, args AuthBackendRoleArgs, opts ...ResourceOption) (*AuthBackendRole, error)public AuthBackendRole(string name, AuthBackendRoleArgs args, CustomResourceOptions? opts = null)- 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.
- opts ResourceOptions
- A bag of options that control this 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.
AuthBackendRole Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The AuthBackendRole resource accepts the following input properties:
- Role
Name string The name of the role.
- Allowed
Policies List<string> List of allowed policies for given role.
- Bound
Cidrs List<string> If set, a list of CIDRs valid as the source address for login requests. This value is also encoded into any resulting token.
- Disallowed
Policies List<string> List of disallowed policies for given role.
- Explicit
Max stringTtl If set, the token will have an explicit max TTL set upon it.
- Orphan bool
If true, tokens created against this policy will be orphan tokens.
- Path
Suffix string Tokens created against this role will have the given suffix as part of their path in addition to the role name.
- Period string
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.
- Renewable bool
Wether to disable the ability of the token to be renewed past its initial TTL.
- 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_ttlandtoken_max_ttlwould 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 period, if any, in number of seconds to set on the token.
- 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> Generated Token’s Policies
- 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, ordefaultto use the mount’s tuned default (which unless changed will beservicetokens). For token store roles, there are two additional possibilities:default-serviceanddefault-batchwhich specify the type to return unless the client requests a different type at generation time.
- Role
Name string The name of the role.
- Allowed
Policies []string List of allowed policies for given role.
- Bound
Cidrs []string If set, a list of CIDRs valid as the source address for login requests. This value is also encoded into any resulting token.
- Disallowed
Policies []string List of disallowed policies for given role.
- Explicit
Max stringTtl If set, the token will have an explicit max TTL set upon it.
- Orphan bool
If true, tokens created against this policy will be orphan tokens.
- Path
Suffix string Tokens created against this role will have the given suffix as part of their path in addition to the role name.
- Period string
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.
- Renewable bool
Wether to disable the ability of the token to be renewed past its initial TTL.
- 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_ttlandtoken_max_ttlwould 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 period, if any, in number of seconds to set on the token.
- 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 Generated Token’s Policies
- 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, ordefaultto use the mount’s tuned default (which unless changed will beservicetokens). For token store roles, there are two additional possibilities:default-serviceanddefault-batchwhich specify the type to return unless the client requests a different type at generation time.
- role
Name string The name of the role.
- allowed
Policies string[] List of allowed policies for given role.
- bound
Cidrs string[] If set, a list of CIDRs valid as the source address for login requests. This value is also encoded into any resulting token.
- disallowed
Policies string[] List of disallowed policies for given role.
- explicit
Max stringTtl If set, the token will have an explicit max TTL set upon it.
- orphan boolean
If true, tokens created against this policy will be orphan tokens.
- path
Suffix string Tokens created against this role will have the given suffix as part of their path in addition to the role name.
- period string
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.
- renewable boolean
Wether to disable the ability of the token to be renewed past its initial TTL.
- 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_ttlandtoken_max_ttlwould 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 period, if any, in number of seconds to set on the token.
- 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[] Generated Token’s Policies
- 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, ordefaultto use the mount’s tuned default (which unless changed will beservicetokens). For token store roles, there are two additional possibilities:default-serviceanddefault-batchwhich specify the type to return unless the client requests a different type at generation time.
- role_
name str The name of the role.
- allowed_
policies List[str] List of allowed policies for given role.
- bound_
cidrs List[str] If set, a list of CIDRs valid as the source address for login requests. This value is also encoded into any resulting token.
- disallowed_
policies List[str] List of disallowed policies for given role.
- explicit_
max_ strttl If set, the token will have an explicit max TTL set upon it.
- orphan bool
If true, tokens created against this policy will be orphan tokens.
- path_
suffix str Tokens created against this role will have the given suffix as part of their path in addition to the role name.
- period str
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.
- renewable bool
Wether to disable the ability of the token to be renewed past its initial TTL.
- token_
bound_ List[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_ floatmax_ ttl If set, will encode an explicit max TTL onto the token in number of seconds. This is a hard cap even if
token_ttlandtoken_max_ttlwould otherwise allow a renewal.- token_
max_ floatttl 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_ floatuses The period, if any, in number of seconds to set on the token.
- token_
period float 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[str] Generated Token’s Policies
- token_
ttl float 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, ordefaultto use the mount’s tuned default (which unless changed will beservicetokens). For token store roles, there are two additional possibilities:default-serviceanddefault-batchwhich specify the type to return unless the client requests a different type at generation time.
Outputs
All input properties are implicitly available as output properties. Additionally, the AuthBackendRole resource produces the following output properties:
Look up an 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): AuthBackendRolestatic get(resource_name, id, opts=None, allowed_policies=None, bound_cidrs=None, disallowed_policies=None, explicit_max_ttl=None, orphan=None, path_suffix=None, period=None, renewable=None, role_name=None, token_bound_cidrs=None, token_explicit_max_ttl=None, token_max_ttl=None, token_no_default_policy=None, token_num_uses=None, token_period=None, token_policies=None, token_ttl=None, token_type=None, __props__=None);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)- 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.
The following state arguments are supported:
- Allowed
Policies List<string> List of allowed policies for given role.
- Bound
Cidrs List<string> If set, a list of CIDRs valid as the source address for login requests. This value is also encoded into any resulting token.
- Disallowed
Policies List<string> List of disallowed policies for given role.
- Explicit
Max stringTtl If set, the token will have an explicit max TTL set upon it.
- Orphan bool
If true, tokens created against this policy will be orphan tokens.
- Path
Suffix string Tokens created against this role will have the given suffix as part of their path in addition to the role name.
- Period string
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.
- Renewable bool
Wether to disable the ability of the token to be renewed past its initial TTL.
- Role
Name string The name of the role.
- 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_ttlandtoken_max_ttlwould 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 period, if any, in number of seconds to set on the token.
- 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> Generated Token’s Policies
- 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, ordefaultto use the mount’s tuned default (which unless changed will beservicetokens). For token store roles, there are two additional possibilities:default-serviceanddefault-batchwhich specify the type to return unless the client requests a different type at generation time.
- Allowed
Policies []string List of allowed policies for given role.
- Bound
Cidrs []string If set, a list of CIDRs valid as the source address for login requests. This value is also encoded into any resulting token.
- Disallowed
Policies []string List of disallowed policies for given role.
- Explicit
Max stringTtl If set, the token will have an explicit max TTL set upon it.
- Orphan bool
If true, tokens created against this policy will be orphan tokens.
- Path
Suffix string Tokens created against this role will have the given suffix as part of their path in addition to the role name.
- Period string
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.
- Renewable bool
Wether to disable the ability of the token to be renewed past its initial TTL.
- Role
Name string The name of the role.
- 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_ttlandtoken_max_ttlwould 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 period, if any, in number of seconds to set on the token.
- 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 Generated Token’s Policies
- 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, ordefaultto use the mount’s tuned default (which unless changed will beservicetokens). For token store roles, there are two additional possibilities:default-serviceanddefault-batchwhich specify the type to return unless the client requests a different type at generation time.
- allowed
Policies string[] List of allowed policies for given role.
- bound
Cidrs string[] If set, a list of CIDRs valid as the source address for login requests. This value is also encoded into any resulting token.
- disallowed
Policies string[] List of disallowed policies for given role.
- explicit
Max stringTtl If set, the token will have an explicit max TTL set upon it.
- orphan boolean
If true, tokens created against this policy will be orphan tokens.
- path
Suffix string Tokens created against this role will have the given suffix as part of their path in addition to the role name.
- period string
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.
- renewable boolean
Wether to disable the ability of the token to be renewed past its initial TTL.
- role
Name string The name of the role.
- 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_ttlandtoken_max_ttlwould 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 period, if any, in number of seconds to set on the token.
- 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[] Generated Token’s Policies
- 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, ordefaultto use the mount’s tuned default (which unless changed will beservicetokens). For token store roles, there are two additional possibilities:default-serviceanddefault-batchwhich specify the type to return unless the client requests a different type at generation time.
- allowed_
policies List[str] List of allowed policies for given role.
- bound_
cidrs List[str] If set, a list of CIDRs valid as the source address for login requests. This value is also encoded into any resulting token.
- disallowed_
policies List[str] List of disallowed policies for given role.
- explicit_
max_ strttl If set, the token will have an explicit max TTL set upon it.
- orphan bool
If true, tokens created against this policy will be orphan tokens.
- path_
suffix str Tokens created against this role will have the given suffix as part of their path in addition to the role name.
- period str
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.
- renewable bool
Wether to disable the ability of the token to be renewed past its initial TTL.
- role_
name str The name of the role.
- token_
bound_ List[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_ floatmax_ ttl If set, will encode an explicit max TTL onto the token in number of seconds. This is a hard cap even if
token_ttlandtoken_max_ttlwould otherwise allow a renewal.- token_
max_ floatttl 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_ floatuses The period, if any, in number of seconds to set on the token.
- token_
period float 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[str] Generated Token’s Policies
- token_
ttl float 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, ordefaultto use the mount’s tuned default (which unless changed will beservicetokens). For token store roles, there are two additional possibilities:default-serviceanddefault-batchwhich specify the type to return unless the client requests a different type at generation time.
Package Details
- Repository
- https://github.com/pulumi/pulumi-vault
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vaultTerraform Provider.