com.pulumi.vault.ldap.kotlin.AuthBackendArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-vault-kotlin Show documentation
Show all versions of pulumi-vault-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.vault.ldap.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.vault.ldap.AuthBackendArgs.builder
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Provides a resource for managing an [LDAP auth backend within Vault](https://www.vaultproject.io/docs/auth/ldap.html).
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vault from "@pulumi/vault";
* const ldap = new vault.ldap.AuthBackend("ldap", {
* path: "ldap",
* url: "ldaps://dc-01.example.org",
* userdn: "OU=Users,OU=Accounts,DC=example,DC=org",
* userattr: "sAMAccountName",
* upndomain: "EXAMPLE.ORG",
* discoverdn: false,
* groupdn: "OU=Groups,DC=example,DC=org",
* groupfilter: "(&(objectClass=group)(member:1.2.840.113556.1.4.1941:={{.UserDN}}))",
* });
* ```
* ```python
* import pulumi
* import pulumi_vault as vault
* ldap = vault.ldap.AuthBackend("ldap",
* path="ldap",
* url="ldaps://dc-01.example.org",
* userdn="OU=Users,OU=Accounts,DC=example,DC=org",
* userattr="sAMAccountName",
* upndomain="EXAMPLE.ORG",
* discoverdn=False,
* groupdn="OU=Groups,DC=example,DC=org",
* groupfilter="(&(objectClass=group)(member:1.2.840.113556.1.4.1941:={{.UserDN}}))")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Vault = Pulumi.Vault;
* return await Deployment.RunAsync(() =>
* {
* var ldap = new Vault.Ldap.AuthBackend("ldap", new()
* {
* Path = "ldap",
* Url = "ldaps://dc-01.example.org",
* Userdn = "OU=Users,OU=Accounts,DC=example,DC=org",
* Userattr = "sAMAccountName",
* Upndomain = "EXAMPLE.ORG",
* Discoverdn = false,
* Groupdn = "OU=Groups,DC=example,DC=org",
* Groupfilter = "(&(objectClass=group)(member:1.2.840.113556.1.4.1941:={{.UserDN}}))",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-vault/sdk/v6/go/vault/ldap"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := ldap.NewAuthBackend(ctx, "ldap", &ldap.AuthBackendArgs{
* Path: pulumi.String("ldap"),
* Url: pulumi.String("ldaps://dc-01.example.org"),
* Userdn: pulumi.String("OU=Users,OU=Accounts,DC=example,DC=org"),
* Userattr: pulumi.String("sAMAccountName"),
* Upndomain: pulumi.String("EXAMPLE.ORG"),
* Discoverdn: pulumi.Bool(false),
* Groupdn: pulumi.String("OU=Groups,DC=example,DC=org"),
* Groupfilter: pulumi.String("(&(objectClass=group)(member:1.2.840.113556.1.4.1941:={{.UserDN}}))"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.vault.ldap.AuthBackend;
* import com.pulumi.vault.ldap.AuthBackendArgs;
* 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 ldap = new AuthBackend("ldap", AuthBackendArgs.builder()
* .path("ldap")
* .url("ldaps://dc-01.example.org")
* .userdn("OU=Users,OU=Accounts,DC=example,DC=org")
* .userattr("sAMAccountName")
* .upndomain("EXAMPLE.ORG")
* .discoverdn(false)
* .groupdn("OU=Groups,DC=example,DC=org")
* .groupfilter("(&(objectClass=group)(member:1.2.840.113556.1.4.1941:={{.UserDN}}))")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* ldap:
* type: vault:ldap:AuthBackend
* properties:
* path: ldap
* url: ldaps://dc-01.example.org
* userdn: OU=Users,OU=Accounts,DC=example,DC=org
* userattr: sAMAccountName
* upndomain: EXAMPLE.ORG
* discoverdn: false
* groupdn: OU=Groups,DC=example,DC=org
* groupfilter: (&(objectClass=group)(member:1.2.840.113556.1.4.1941:={{.UserDN}}))
* ```
*
* ## Import
* LDAP authentication backends can be imported using the `path`, e.g.
* ```sh
* $ pulumi import vault:ldap/authBackend:AuthBackend ldap ldap
* ```
* @property binddn DN of object to bind when performing user search
* @property bindpass Password to use with `binddn` when performing user search
* @property caseSensitiveNames Control case senstivity of objects fetched from LDAP, this is used for object matching in vault
* @property certificate Trusted CA to validate TLS certificate
* @property clientTlsCert
* @property clientTlsKey
* @property denyNullBind Prevents users from bypassing authentication when providing an empty password.
* @property description Description for the LDAP auth backend mount
* @property disableRemount If set, opts out of mount migration on path updates.
* See here for more info on [Mount Migration](https://www.vaultproject.io/docs/concepts/mount-migration)
* @property discoverdn Use anonymous bind to discover the bind DN of a user.
* @property groupattr LDAP attribute to follow on objects returned by groupfilter
* @property groupdn Base DN under which to perform group search
* @property groupfilter Go template used to construct group membership query
* @property insecureTls Control whether or TLS certificates must be validated
* @property local Specifies if the auth method is local only.
* @property maxPageSize Sets the max page size for LDAP lookups, by default it's set to -1.
* *Available only for Vault 1.11.11+, 1.12.7+, and 1.13.3+*.
* @property namespace 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](https://www.terraform.io/docs/providers/vault/index.html#namespace).
* *Available only for Vault Enterprise*.
* @property path Path to mount the LDAP auth backend under
* @property starttls Control use of TLS when conecting to LDAP
* @property tlsMaxVersion Maximum acceptable version of TLS
* @property tlsMinVersion Minimum acceptable version of TLS
* @property tokenBoundCidrs Specifies the blocks of IP addresses which are allowed to use the generated token
* @property tokenExplicitMaxTtl Generated Token's Explicit Maximum TTL in seconds
* @property tokenMaxTtl The maximum lifetime of the generated token
* @property tokenNoDefaultPolicy If true, the 'default' policy will not automatically be added to generated tokens
* @property tokenNumUses The maximum number of times a token may be used, a value of zero means unlimited
* @property tokenPeriod Generated Token's Period
* @property tokenPolicies Generated Token's Policies
* @property tokenTtl The initial ttl of the token to generate in seconds
* @property tokenType The type of token to generate, service or batch
* @property upndomain The `userPrincipalDomain` used to construct the UPN string for the authenticating user.
* @property url The URL of the LDAP server
* @property useTokenGroups Use the Active Directory tokenGroups constructed attribute of the user to find the group memberships
* @property userattr Attribute on user object matching username passed in
* @property userdn Base DN under which to perform user search
* @property userfilter LDAP user search filter
* @property usernameAsAlias Force the auth method to use the username passed by the user as the alias name.
*/
public data class AuthBackendArgs(
public val binddn: Output? = null,
public val bindpass: Output? = null,
public val caseSensitiveNames: Output? = null,
public val certificate: Output? = null,
public val clientTlsCert: Output? = null,
public val clientTlsKey: Output? = null,
public val denyNullBind: Output? = null,
public val description: Output? = null,
public val disableRemount: Output? = null,
public val discoverdn: Output? = null,
public val groupattr: Output? = null,
public val groupdn: Output? = null,
public val groupfilter: Output? = null,
public val insecureTls: Output? = null,
public val local: Output? = null,
public val maxPageSize: Output? = null,
public val namespace: Output? = null,
public val path: Output? = null,
public val starttls: Output? = null,
public val tlsMaxVersion: Output? = null,
public val tlsMinVersion: Output? = null,
public val tokenBoundCidrs: Output>? = null,
public val tokenExplicitMaxTtl: Output? = null,
public val tokenMaxTtl: Output? = null,
public val tokenNoDefaultPolicy: Output? = null,
public val tokenNumUses: Output? = null,
public val tokenPeriod: Output? = null,
public val tokenPolicies: Output>? = null,
public val tokenTtl: Output? = null,
public val tokenType: Output? = null,
public val upndomain: Output? = null,
public val url: Output? = null,
public val useTokenGroups: Output? = null,
public val userattr: Output? = null,
public val userdn: Output? = null,
public val userfilter: Output? = null,
public val usernameAsAlias: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.vault.ldap.AuthBackendArgs =
com.pulumi.vault.ldap.AuthBackendArgs.builder()
.binddn(binddn?.applyValue({ args0 -> args0 }))
.bindpass(bindpass?.applyValue({ args0 -> args0 }))
.caseSensitiveNames(caseSensitiveNames?.applyValue({ args0 -> args0 }))
.certificate(certificate?.applyValue({ args0 -> args0 }))
.clientTlsCert(clientTlsCert?.applyValue({ args0 -> args0 }))
.clientTlsKey(clientTlsKey?.applyValue({ args0 -> args0 }))
.denyNullBind(denyNullBind?.applyValue({ args0 -> args0 }))
.description(description?.applyValue({ args0 -> args0 }))
.disableRemount(disableRemount?.applyValue({ args0 -> args0 }))
.discoverdn(discoverdn?.applyValue({ args0 -> args0 }))
.groupattr(groupattr?.applyValue({ args0 -> args0 }))
.groupdn(groupdn?.applyValue({ args0 -> args0 }))
.groupfilter(groupfilter?.applyValue({ args0 -> args0 }))
.insecureTls(insecureTls?.applyValue({ args0 -> args0 }))
.local(local?.applyValue({ args0 -> args0 }))
.maxPageSize(maxPageSize?.applyValue({ args0 -> args0 }))
.namespace(namespace?.applyValue({ args0 -> args0 }))
.path(path?.applyValue({ args0 -> args0 }))
.starttls(starttls?.applyValue({ args0 -> args0 }))
.tlsMaxVersion(tlsMaxVersion?.applyValue({ args0 -> args0 }))
.tlsMinVersion(tlsMinVersion?.applyValue({ args0 -> args0 }))
.tokenBoundCidrs(tokenBoundCidrs?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.tokenExplicitMaxTtl(tokenExplicitMaxTtl?.applyValue({ args0 -> args0 }))
.tokenMaxTtl(tokenMaxTtl?.applyValue({ args0 -> args0 }))
.tokenNoDefaultPolicy(tokenNoDefaultPolicy?.applyValue({ args0 -> args0 }))
.tokenNumUses(tokenNumUses?.applyValue({ args0 -> args0 }))
.tokenPeriod(tokenPeriod?.applyValue({ args0 -> args0 }))
.tokenPolicies(tokenPolicies?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.tokenTtl(tokenTtl?.applyValue({ args0 -> args0 }))
.tokenType(tokenType?.applyValue({ args0 -> args0 }))
.upndomain(upndomain?.applyValue({ args0 -> args0 }))
.url(url?.applyValue({ args0 -> args0 }))
.useTokenGroups(useTokenGroups?.applyValue({ args0 -> args0 }))
.userattr(userattr?.applyValue({ args0 -> args0 }))
.userdn(userdn?.applyValue({ args0 -> args0 }))
.userfilter(userfilter?.applyValue({ args0 -> args0 }))
.usernameAsAlias(usernameAsAlias?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [AuthBackendArgs].
*/
@PulumiTagMarker
public class AuthBackendArgsBuilder internal constructor() {
private var binddn: Output? = null
private var bindpass: Output? = null
private var caseSensitiveNames: Output? = null
private var certificate: Output? = null
private var clientTlsCert: Output? = null
private var clientTlsKey: Output? = null
private var denyNullBind: Output? = null
private var description: Output? = null
private var disableRemount: Output? = null
private var discoverdn: Output? = null
private var groupattr: Output? = null
private var groupdn: Output? = null
private var groupfilter: Output? = null
private var insecureTls: Output? = null
private var local: Output? = null
private var maxPageSize: Output? = null
private var namespace: Output? = null
private var path: Output? = null
private var starttls: Output? = null
private var tlsMaxVersion: Output? = null
private var tlsMinVersion: Output? = null
private var tokenBoundCidrs: Output>? = null
private var tokenExplicitMaxTtl: Output? = null
private var tokenMaxTtl: Output? = null
private var tokenNoDefaultPolicy: Output? = null
private var tokenNumUses: Output? = null
private var tokenPeriod: Output? = null
private var tokenPolicies: Output>? = null
private var tokenTtl: Output? = null
private var tokenType: Output? = null
private var upndomain: Output? = null
private var url: Output? = null
private var useTokenGroups: Output? = null
private var userattr: Output? = null
private var userdn: Output? = null
private var userfilter: Output? = null
private var usernameAsAlias: Output? = null
/**
* @param value DN of object to bind when performing user search
*/
@JvmName("jplbrynqaoxfyorw")
public suspend fun binddn(`value`: Output) {
this.binddn = value
}
/**
* @param value Password to use with `binddn` when performing user search
*/
@JvmName("uffolimslcgwhsxl")
public suspend fun bindpass(`value`: Output) {
this.bindpass = value
}
/**
* @param value Control case senstivity of objects fetched from LDAP, this is used for object matching in vault
*/
@JvmName("xtqlfcyoxxndinnm")
public suspend fun caseSensitiveNames(`value`: Output) {
this.caseSensitiveNames = value
}
/**
* @param value Trusted CA to validate TLS certificate
*/
@JvmName("kjryvqfqlqdjrorg")
public suspend fun certificate(`value`: Output) {
this.certificate = value
}
/**
* @param value
*/
@JvmName("eeakqvthblunqrit")
public suspend fun clientTlsCert(`value`: Output) {
this.clientTlsCert = value
}
/**
* @param value
*/
@JvmName("mhrcsdilxemeqqyq")
public suspend fun clientTlsKey(`value`: Output) {
this.clientTlsKey = value
}
/**
* @param value Prevents users from bypassing authentication when providing an empty password.
*/
@JvmName("wttyvmdpxwclwfen")
public suspend fun denyNullBind(`value`: Output) {
this.denyNullBind = value
}
/**
* @param value Description for the LDAP auth backend mount
*/
@JvmName("wrpwhlgbrgasudsn")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value If set, opts out of mount migration on path updates.
* See here for more info on [Mount Migration](https://www.vaultproject.io/docs/concepts/mount-migration)
*/
@JvmName("tvuwpffwdqqromrp")
public suspend fun disableRemount(`value`: Output) {
this.disableRemount = value
}
/**
* @param value Use anonymous bind to discover the bind DN of a user.
*/
@JvmName("hrdqatryysjkvfbu")
public suspend fun discoverdn(`value`: Output) {
this.discoverdn = value
}
/**
* @param value LDAP attribute to follow on objects returned by groupfilter
*/
@JvmName("nkwhghutmbeylehw")
public suspend fun groupattr(`value`: Output) {
this.groupattr = value
}
/**
* @param value Base DN under which to perform group search
*/
@JvmName("bkqjrbotluxlsnqx")
public suspend fun groupdn(`value`: Output) {
this.groupdn = value
}
/**
* @param value Go template used to construct group membership query
*/
@JvmName("ivjhsdwjtwkavrvt")
public suspend fun groupfilter(`value`: Output) {
this.groupfilter = value
}
/**
* @param value Control whether or TLS certificates must be validated
*/
@JvmName("axeoqttwnapchlwc")
public suspend fun insecureTls(`value`: Output) {
this.insecureTls = value
}
/**
* @param value Specifies if the auth method is local only.
*/
@JvmName("uviwcbqyrwnrxqui")
public suspend fun local(`value`: Output) {
this.local = value
}
/**
* @param value Sets the max page size for LDAP lookups, by default it's set to -1.
* *Available only for Vault 1.11.11+, 1.12.7+, and 1.13.3+*.
*/
@JvmName("yxwmefemdebebnaq")
public suspend fun maxPageSize(`value`: Output) {
this.maxPageSize = value
}
/**
* @param value 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](https://www.terraform.io/docs/providers/vault/index.html#namespace).
* *Available only for Vault Enterprise*.
*/
@JvmName("sxibdcviimccolny")
public suspend fun namespace(`value`: Output) {
this.namespace = value
}
/**
* @param value Path to mount the LDAP auth backend under
*/
@JvmName("ehvqppvoisnntabo")
public suspend fun path(`value`: Output) {
this.path = value
}
/**
* @param value Control use of TLS when conecting to LDAP
*/
@JvmName("ujdgxmtvsbxxxpcj")
public suspend fun starttls(`value`: Output) {
this.starttls = value
}
/**
* @param value Maximum acceptable version of TLS
*/
@JvmName("dewvupkjcjfylchq")
public suspend fun tlsMaxVersion(`value`: Output) {
this.tlsMaxVersion = value
}
/**
* @param value Minimum acceptable version of TLS
*/
@JvmName("anfcbkmdtrvmnhgr")
public suspend fun tlsMinVersion(`value`: Output) {
this.tlsMinVersion = value
}
/**
* @param value Specifies the blocks of IP addresses which are allowed to use the generated token
*/
@JvmName("kweuphpojrhxidpu")
public suspend fun tokenBoundCidrs(`value`: Output>) {
this.tokenBoundCidrs = value
}
@JvmName("vqbslaxcxumhulka")
public suspend fun tokenBoundCidrs(vararg values: Output) {
this.tokenBoundCidrs = Output.all(values.asList())
}
/**
* @param values Specifies the blocks of IP addresses which are allowed to use the generated token
*/
@JvmName("olqwcawlrswoacho")
public suspend fun tokenBoundCidrs(values: List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy