SecretBackendRoleArgs

data class SecretBackendRoleArgs(val algorithmSigner: Output<String>? = null, val allowBareDomains: Output<Boolean>? = null, val allowEmptyPrincipals: Output<Boolean>? = null, val allowHostCertificates: Output<Boolean>? = null, val allowSubdomains: Output<Boolean>? = null, val allowUserCertificates: Output<Boolean>? = null, val allowUserKeyIds: Output<Boolean>? = null, val allowedCriticalOptions: Output<String>? = null, val allowedDomains: Output<String>? = null, val allowedDomainsTemplate: Output<Boolean>? = null, val allowedExtensions: Output<String>? = null, val allowedUserKeyConfigs: Output<List<SecretBackendRoleAllowedUserKeyConfigArgs>>? = null, val allowedUsers: Output<String>? = null, val allowedUsersTemplate: Output<Boolean>? = null, val backend: Output<String>? = null, val cidrList: Output<String>? = null, val defaultCriticalOptions: Output<Map<String, String>>? = null, val defaultExtensions: Output<Map<String, String>>? = null, val defaultUser: Output<String>? = null, val defaultUserTemplate: Output<Boolean>? = null, val keyIdFormat: Output<String>? = null, val keyType: Output<String>? = null, val maxTtl: Output<String>? = null, val name: Output<String>? = null, val namespace: Output<String>? = null, val notBeforeDuration: Output<String>? = null, val ttl: Output<String>? = null) : ConvertibleToJava<SecretBackendRoleArgs>

Provides a resource to manage roles in an SSH secret backend SSH secret backend within Vault.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const example = new vault.Mount("example", {type: "ssh"});
const foo = new vault.ssh.SecretBackendRole("foo", {
name: "my-role",
backend: example.path,
keyType: "ca",
allowUserCertificates: true,
});
const bar = new vault.ssh.SecretBackendRole("bar", {
name: "otp-role",
backend: example.path,
keyType: "otp",
defaultUser: "default",
allowedUsers: "default,baz",
cidrList: "0.0.0.0/0",
});
import pulumi
import pulumi_vault as vault
example = vault.Mount("example", type="ssh")
foo = vault.ssh.SecretBackendRole("foo",
name="my-role",
backend=example.path,
key_type="ca",
allow_user_certificates=True)
bar = vault.ssh.SecretBackendRole("bar",
name="otp-role",
backend=example.path,
key_type="otp",
default_user="default",
allowed_users="default,baz",
cidr_list="0.0.0.0/0")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var example = new Vault.Mount("example", new()
{
Type = "ssh",
});
var foo = new Vault.Ssh.SecretBackendRole("foo", new()
{
Name = "my-role",
Backend = example.Path,
KeyType = "ca",
AllowUserCertificates = true,
});
var bar = new Vault.Ssh.SecretBackendRole("bar", new()
{
Name = "otp-role",
Backend = example.Path,
KeyType = "otp",
DefaultUser = "default",
AllowedUsers = "default,baz",
CidrList = "0.0.0.0/0",
});
});
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/ssh"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := vault.NewMount(ctx, "example", &vault.MountArgs{
Type: pulumi.String("ssh"),
})
if err != nil {
return err
}
_, err = ssh.NewSecretBackendRole(ctx, "foo", &ssh.SecretBackendRoleArgs{
Name: pulumi.String("my-role"),
Backend: example.Path,
KeyType: pulumi.String("ca"),
AllowUserCertificates: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = ssh.NewSecretBackendRole(ctx, "bar", &ssh.SecretBackendRoleArgs{
Name: pulumi.String("otp-role"),
Backend: example.Path,
KeyType: pulumi.String("otp"),
DefaultUser: pulumi.String("default"),
AllowedUsers: pulumi.String("default,baz"),
CidrList: pulumi.String("0.0.0.0/0"),
})
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.Mount;
import com.pulumi.vault.MountArgs;
import com.pulumi.vault.ssh.SecretBackendRole;
import com.pulumi.vault.ssh.SecretBackendRoleArgs;
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 Mount("example", MountArgs.builder()
.type("ssh")
.build());
var foo = new SecretBackendRole("foo", SecretBackendRoleArgs.builder()
.name("my-role")
.backend(example.path())
.keyType("ca")
.allowUserCertificates(true)
.build());
var bar = new SecretBackendRole("bar", SecretBackendRoleArgs.builder()
.name("otp-role")
.backend(example.path())
.keyType("otp")
.defaultUser("default")
.allowedUsers("default,baz")
.cidrList("0.0.0.0/0")
.build());
}
}
resources:
example:
type: vault:Mount
properties:
type: ssh
foo:
type: vault:ssh:SecretBackendRole
properties:
name: my-role
backend: ${example.path}
keyType: ca
allowUserCertificates: true
bar:
type: vault:ssh:SecretBackendRole
properties:
name: otp-role
backend: ${example.path}
keyType: otp
defaultUser: default
allowedUsers: default,baz
cidrList: 0.0.0.0/0

Import

SSH secret backend roles can be imported using the path, e.g.

$ pulumi import vault:ssh/secretBackendRole:SecretBackendRole foo ssh/roles/my-role

Constructors

Link copied to clipboard
constructor(algorithmSigner: Output<String>? = null, allowBareDomains: Output<Boolean>? = null, allowEmptyPrincipals: Output<Boolean>? = null, allowHostCertificates: Output<Boolean>? = null, allowSubdomains: Output<Boolean>? = null, allowUserCertificates: Output<Boolean>? = null, allowUserKeyIds: Output<Boolean>? = null, allowedCriticalOptions: Output<String>? = null, allowedDomains: Output<String>? = null, allowedDomainsTemplate: Output<Boolean>? = null, allowedExtensions: Output<String>? = null, allowedUserKeyConfigs: Output<List<SecretBackendRoleAllowedUserKeyConfigArgs>>? = null, allowedUsers: Output<String>? = null, allowedUsersTemplate: Output<Boolean>? = null, backend: Output<String>? = null, cidrList: Output<String>? = null, defaultCriticalOptions: Output<Map<String, String>>? = null, defaultExtensions: Output<Map<String, String>>? = null, defaultUser: Output<String>? = null, defaultUserTemplate: Output<Boolean>? = null, keyIdFormat: Output<String>? = null, keyType: Output<String>? = null, maxTtl: Output<String>? = null, name: Output<String>? = null, namespace: Output<String>? = null, notBeforeDuration: Output<String>? = null, ttl: Output<String>? = null)

Properties

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

When supplied, this value specifies a signing algorithm for the key. Possible values: ssh-rsa, rsa-sha2-256, rsa-sha2-512.

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

Specifies if host certificates that are requested are allowed to use the base domains listed in allowed_domains.

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

Specifies a comma-separated list of critical options that certificates can have when signed.

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

The list of domains for which a client can request a host certificate.

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

Specifies if allowed_domains can be declared using identity template policies. Non-templated domains are also permitted.

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

Specifies a comma-separated list of extensions that certificates can have when signed.

Link copied to clipboard

Set of configuration blocks to define allowed user key configuration, like key type and their lengths. Can be specified multiple times. See Configuration-Options for more info

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

Specifies a comma-separated list of usernames that are to be allowed, only if certain usernames are to be allowed.

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

Specifies if allowed_users can be declared using identity template policies. Non-templated users are also permitted.

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

Allow signing certificates with no valid principals (e.g. any valid principal). For backwards compatibility only. The default of false is highly recommended.

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

Specifies if certificates are allowed to be signed for use as a 'host'.

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

Specifies if host certificates that are requested are allowed to be subdomains of those listed in allowed_domains.

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

Specifies if certificates are allowed to be signed for use as a 'user'.

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

Specifies if users can override the key ID for a signed certificate with the key_id field.

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

The path where the SSH secret backend is mounted.

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

The comma-separated string of CIDR blocks for which this role is applicable.

Link copied to clipboard
val defaultCriticalOptions: Output<Map<String, String>>? = null

Specifies a map of critical options that certificates have when signed.

Link copied to clipboard
val defaultExtensions: Output<Map<String, String>>? = null

Specifies a map of extensions that certificates have when signed.

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

Specifies the default username for which a credential will be generated.

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

If set, default_users can be specified using identity template values. A non-templated user is also permitted.

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

Specifies a custom format for the key id of a signed certificate.

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

Specifies the type of credentials generated by this role. This can be either otp, dynamic or ca.

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

Specifies the maximum Time To Live value.

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

Specifies the name of the role to create.

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

Specifies the duration by which to backdate the ValidAfter property. Uses duration format strings.

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

Specifies the Time To Live value.

Functions

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