AuthBackendRole

class AuthBackendRole : KotlinCustomResource

Manages Token auth backend role in a Vault server. See the [Vault

  • documentation](https://www.vaultproject.io/docs/auth/token.html) for more information.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const example = new vault.tokenauth.AuthBackendRole("example", {
roleName: "my-role",
allowedPolicies: [
"dev",
"test",
],
disallowedPolicies: ["default"],
allowedEntityAliases: ["test_entity"],
orphan: true,
tokenPeriod: 86400,
renewable: true,
tokenExplicitMaxTtl: 115200,
pathSuffix: "path-suffix",
});
import pulumi
import pulumi_vault as vault
example = vault.tokenauth.AuthBackendRole("example",
role_name="my-role",
allowed_policies=[
"dev",
"test",
],
disallowed_policies=["default"],
allowed_entity_aliases=["test_entity"],
orphan=True,
token_period=86400,
renewable=True,
token_explicit_max_ttl=115200,
path_suffix="path-suffix")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var example = new Vault.TokenAuth.AuthBackendRole("example", new()
{
RoleName = "my-role",
AllowedPolicies = new[]
{
"dev",
"test",
},
DisallowedPolicies = new[]
{
"default",
},
AllowedEntityAliases = new[]
{
"test_entity",
},
Orphan = true,
TokenPeriod = 86400,
Renewable = true,
TokenExplicitMaxTtl = 115200,
PathSuffix = "path-suffix",
});
});
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/tokenauth"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tokenauth.NewAuthBackendRole(ctx, "example", &tokenauth.AuthBackendRoleArgs{
RoleName: pulumi.String("my-role"),
AllowedPolicies: pulumi.StringArray{
pulumi.String("dev"),
pulumi.String("test"),
},
DisallowedPolicies: pulumi.StringArray{
pulumi.String("default"),
},
AllowedEntityAliases: pulumi.StringArray{
pulumi.String("test_entity"),
},
Orphan: pulumi.Bool(true),
TokenPeriod: pulumi.Int(86400),
Renewable: pulumi.Bool(true),
TokenExplicitMaxTtl: pulumi.Int(115200),
PathSuffix: pulumi.String("path-suffix"),
})
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.tokenauth.AuthBackendRole;
import com.pulumi.vault.tokenauth.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 example = new AuthBackendRole("example", AuthBackendRoleArgs.builder()
.roleName("my-role")
.allowedPolicies(
"dev",
"test")
.disallowedPolicies("default")
.allowedEntityAliases("test_entity")
.orphan(true)
.tokenPeriod("86400")
.renewable(true)
.tokenExplicitMaxTtl("115200")
.pathSuffix("path-suffix")
.build());
}
}
resources:
example:
type: vault:tokenauth:AuthBackendRole
properties:
roleName: my-role
allowedPolicies:
- dev
- test
disallowedPolicies:
- default
allowedEntityAliases:
- test_entity
orphan: true
tokenPeriod: '86400'
renewable: true
tokenExplicitMaxTtl: '115200'
pathSuffix: path-suffix

Import

Token auth backend roles can be imported with auth/token/roles/ followed by the role_name, e.g.

$ pulumi import vault:tokenauth/authBackendRole:AuthBackendRole example auth/token/roles/my-role

Properties

Link copied to clipboard

List of allowed entity aliases.

Link copied to clipboard
val allowedPolicies: Output<List<String>>?

List of allowed policies for given role.

Link copied to clipboard

Set of allowed policies with glob match for given role.

Link copied to clipboard

List of disallowed policies for given role.

Link copied to clipboard

Set of disallowed policies with glob match for given role.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val namespace: Output<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.

Link copied to clipboard
val orphan: Output<Boolean>?

If true, tokens created against this policy will be orphan tokens.

Link copied to clipboard
val pathSuffix: Output<String>?

Tokens created against this role will have the given suffix as part of their path in addition to the role name.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val renewable: Output<Boolean>?

Whether to disable the ability of the token to be renewed past its initial TTL.

Link copied to clipboard
val roleName: Output<String>

The name of the role.

Link copied to clipboard
val tokenBoundCidrs: Output<List<String>>?

Specifies the blocks of IP addresses which are allowed to use the generated token

Link copied to clipboard
val tokenExplicitMaxTtl: Output<Int>?

Generated Token's Explicit Maximum TTL in seconds

Link copied to clipboard
val tokenMaxTtl: Output<Int>?

The maximum lifetime of the generated token

Link copied to clipboard

If true, the 'default' policy will not automatically be added to generated tokens

Link copied to clipboard
val tokenNumUses: Output<Int>?

The maximum number of times a token may be used, a value of zero means unlimited

Link copied to clipboard
val tokenPeriod: Output<Int>?

Generated Token's Period

Link copied to clipboard
val tokenPolicies: Output<List<String>>?

Generated Token's Policies

Link copied to clipboard
val tokenTtl: Output<Int>?

The initial ttl of the token to generate in seconds

Link copied to clipboard
val tokenType: Output<String>?

The type of token to generate, service or batch

Link copied to clipboard
val urn: Output<String>