CertAuthBackendRoleArgs

data class CertAuthBackendRoleArgs(val allowedCommonNames: Output<List<String>>? = null, val allowedDnsSans: Output<List<String>>? = null, val allowedEmailSans: Output<List<String>>? = null, val allowedNames: Output<List<String>>? = null, val allowedOrganizationalUnits: Output<List<String>>? = null, val allowedUriSans: Output<List<String>>? = null, val backend: Output<String>? = null, val certificate: Output<String>? = null, val displayName: Output<String>? = null, val name: Output<String>? = null, val namespace: Output<String>? = null, val ocspCaCertificates: Output<String>? = null, val ocspEnabled: Output<Boolean>? = null, val ocspFailOpen: Output<Boolean>? = null, val ocspQueryAllServers: Output<Boolean>? = null, val ocspServersOverrides: Output<List<String>>? = null, val requiredExtensions: Output<List<String>>? = null, val tokenBoundCidrs: Output<List<String>>? = null, val tokenExplicitMaxTtl: Output<Int>? = null, val tokenMaxTtl: Output<Int>? = null, val tokenNoDefaultPolicy: Output<Boolean>? = null, val tokenNumUses: Output<Int>? = null, val tokenPeriod: Output<Int>? = null, val tokenPolicies: Output<List<String>>? = null, val tokenTtl: Output<Int>? = null, val tokenType: Output<String>? = null) : ConvertibleToJava<CertAuthBackendRoleArgs>

Provides a resource to create a role in an Cert auth backend within Vault.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as std from "@pulumi/std";
import * as vault from "@pulumi/vault";
const cert = new vault.AuthBackend("cert", {
path: "cert",
type: "cert",
});
const certCertAuthBackendRole = new vault.CertAuthBackendRole("cert", {
name: "foo",
certificate: std.file({
input: "/path/to/certs/ca-cert.pem",
}).then(invoke => invoke.result),
backend: cert.path,
allowedNames: [
"foo.example.org",
"baz.example.org",
],
tokenTtl: 300,
tokenMaxTtl: 600,
tokenPolicies: ["foo"],
});
import pulumi
import pulumi_std as std
import pulumi_vault as vault
cert = vault.AuthBackend("cert",
path="cert",
type="cert")
cert_cert_auth_backend_role = vault.CertAuthBackendRole("cert",
name="foo",
certificate=std.file(input="/path/to/certs/ca-cert.pem").result,
backend=cert.path,
allowed_names=[
"foo.example.org",
"baz.example.org",
],
token_ttl=300,
token_max_ttl=600,
token_policies=["foo"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Std = Pulumi.Std;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var cert = new Vault.AuthBackend("cert", new()
{
Path = "cert",
Type = "cert",
});
var certCertAuthBackendRole = new Vault.CertAuthBackendRole("cert", new()
{
Name = "foo",
Certificate = Std.File.Invoke(new()
{
Input = "/path/to/certs/ca-cert.pem",
}).Apply(invoke => invoke.Result),
Backend = cert.Path,
AllowedNames = new[]
{
"foo.example.org",
"baz.example.org",
},
TokenTtl = 300,
TokenMaxTtl = 600,
TokenPolicies = new[]
{
"foo",
},
});
});
package main
import (
"github.com/pulumi/pulumi-std/sdk/go/std"
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cert, err := vault.NewAuthBackend(ctx, "cert", &vault.AuthBackendArgs{
Path: pulumi.String("cert"),
Type: pulumi.String("cert"),
})
if err != nil {
return err
}
invokeFile, err := std.File(ctx, &std.FileArgs{
Input: "/path/to/certs/ca-cert.pem",
}, nil)
if err != nil {
return err
}
_, err = vault.NewCertAuthBackendRole(ctx, "cert", &vault.CertAuthBackendRoleArgs{
Name: pulumi.String("foo"),
Certificate: pulumi.String(invokeFile.Result),
Backend: cert.Path,
AllowedNames: pulumi.StringArray{
pulumi.String("foo.example.org"),
pulumi.String("baz.example.org"),
},
TokenTtl: pulumi.Int(300),
TokenMaxTtl: pulumi.Int(600),
TokenPolicies: pulumi.StringArray{
pulumi.String("foo"),
},
})
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.AuthBackend;
import com.pulumi.vault.AuthBackendArgs;
import com.pulumi.vault.CertAuthBackendRole;
import com.pulumi.vault.CertAuthBackendRoleArgs;
import com.pulumi.std.StdFunctions;
import com.pulumi.std.inputs.FileArgs;
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 cert = new AuthBackend("cert", AuthBackendArgs.builder()
.path("cert")
.type("cert")
.build());
var certCertAuthBackendRole = new CertAuthBackendRole("certCertAuthBackendRole", CertAuthBackendRoleArgs.builder()
.name("foo")
.certificate(StdFunctions.file(FileArgs.builder()
.input("/path/to/certs/ca-cert.pem")
.build()).result())
.backend(cert.path())
.allowedNames(
"foo.example.org",
"baz.example.org")
.tokenTtl(300)
.tokenMaxTtl(600)
.tokenPolicies("foo")
.build());
}
}
resources:
cert:
type: vault:AuthBackend
properties:
path: cert
type: cert
certCertAuthBackendRole:
type: vault:CertAuthBackendRole
name: cert
properties:
name: foo
certificate:
fn::invoke:
function: std:file
arguments:
input: /path/to/certs/ca-cert.pem
return: result
backend: ${cert.path}
allowedNames:
- foo.example.org
- baz.example.org
tokenTtl: 300
tokenMaxTtl: 600
tokenPolicies:
- foo

Constructors

Link copied to clipboard
constructor(allowedCommonNames: Output<List<String>>? = null, allowedDnsSans: Output<List<String>>? = null, allowedEmailSans: Output<List<String>>? = null, allowedNames: Output<List<String>>? = null, allowedOrganizationalUnits: Output<List<String>>? = null, allowedUriSans: Output<List<String>>? = null, backend: Output<String>? = null, certificate: Output<String>? = null, displayName: Output<String>? = null, name: Output<String>? = null, namespace: Output<String>? = null, ocspCaCertificates: Output<String>? = null, ocspEnabled: Output<Boolean>? = null, ocspFailOpen: Output<Boolean>? = null, ocspQueryAllServers: Output<Boolean>? = null, ocspServersOverrides: Output<List<String>>? = null, requiredExtensions: Output<List<String>>? = null, tokenBoundCidrs: Output<List<String>>? = null, tokenExplicitMaxTtl: Output<Int>? = null, tokenMaxTtl: Output<Int>? = null, tokenNoDefaultPolicy: Output<Boolean>? = null, tokenNumUses: Output<Int>? = null, tokenPeriod: Output<Int>? = null, tokenPolicies: Output<List<String>>? = null, tokenTtl: Output<Int>? = null, tokenType: Output<String>? = null)

Properties

Link copied to clipboard
val allowedCommonNames: Output<List<String>>? = null

Allowed the common names for authenticated client certificates

Link copied to clipboard
val allowedDnsSans: Output<List<String>>? = null

Allowed alternative dns names for authenticated client certificates

Link copied to clipboard
val allowedEmailSans: Output<List<String>>? = null

Allowed emails for authenticated client certificates

Link copied to clipboard
val allowedNames: Output<List<String>>? = null

DEPRECATED: Please use the individual allowed_X_sans parameters instead. Allowed subject names for authenticated client certificates

Link copied to clipboard
val allowedOrganizationalUnits: Output<List<String>>? = null

Allowed organization units for authenticated client certificates.

Link copied to clipboard
val allowedUriSans: Output<List<String>>? = null

Allowed URIs for authenticated client certificates

Link copied to clipboard
val backend: Output<String>? = null

Path to the mounted Cert auth backend

Link copied to clipboard
val certificate: Output<String>? = null

CA certificate used to validate client certificates

Link copied to clipboard
val displayName: Output<String>? = null

The name to display on tokens issued under this role.

Link copied to clipboard
val name: Output<String>? = null

Name of the role

Link copied to clipboard
val namespace: Output<String>? = null

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 ocspCaCertificates: Output<String>? = null

Any additional CA certificates needed to verify OCSP responses. Provided as base64 encoded PEM data. Requires Vault version 1.13+.

Link copied to clipboard
val ocspEnabled: Output<Boolean>? = null

If enabled, validate certificates' revocation status using OCSP. Requires Vault version 1.13+.

Link copied to clipboard
val ocspFailOpen: Output<Boolean>? = null

If true and an OCSP response cannot be fetched or is of an unknown status, the login will proceed as if the certificate has not been revoked. Requires Vault version 1.13+.

Link copied to clipboard
val ocspQueryAllServers: Output<Boolean>? = null

If set to true, rather than accepting the first successful OCSP response, query all servers and consider the certificate valid only if all servers agree. Requires Vault version 1.13+.

Link copied to clipboard
val ocspServersOverrides: Output<List<String>>? = null

: A comma-separated list of OCSP server addresses. If unset, the OCSP server is determined from the AuthorityInformationAccess extension on the certificate being inspected. Requires Vault version 1.13+.

Link copied to clipboard
val requiredExtensions: Output<List<String>>? = null

TLS extensions required on client certificates

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

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

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

Generated Token's Explicit Maximum TTL in seconds

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

The maximum lifetime of the generated token

Link copied to clipboard
val tokenNoDefaultPolicy: Output<Boolean>? = null

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

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

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

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

Generated Token's Period

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

Generated Token's Policies

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

The initial ttl of the token to generate in seconds

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

The type of token to generate, service or batch

Functions

Link copied to clipboard
open override fun toJava(): CertAuthBackendRoleArgs