AuthBackend

Provides a resource for managing an LDAP auth backend within Vault.

Example Usage

using Pulumi;
using Vault = Pulumi.Vault;

class MyStack : Stack
{
    public MyStack()
    {
        var ldap = new Vault.Ldap.AuthBackend("ldap", new Vault.Ldap.AuthBackendArgs
        {
            Discoverdn = false,
            Groupdn = "OU=Groups,DC=example,DC=org",
            Groupfilter = "(&(objectClass=group)(member:1.2.840.113556.1.4.1941:={{.UserDN}}))",
            Path = "ldap",
            Upndomain = "EXAMPLE.ORG",
            Url = "ldaps://dc-01.example.org",
            Userattr = "sAMAccountName",
            Userdn = "OU=Users,OU=Accounts,DC=example,DC=org",
        });
    }

}

Coming soon!

import pulumi
import pulumi_vault as vault

ldap = vault.ldap.AuthBackend("ldap",
    discoverdn=False,
    groupdn="OU=Groups,DC=example,DC=org",
    groupfilter="(&(objectClass=group)(member:1.2.840.113556.1.4.1941:={{.UserDN}}))",
    path="ldap",
    upndomain="EXAMPLE.ORG",
    url="ldaps://dc-01.example.org",
    userattr="sAMAccountName",
    userdn="OU=Users,OU=Accounts,DC=example,DC=org")
import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";

const ldap = new vault.ldap.AuthBackend("ldap", {
    discoverdn: false,
    groupdn: "OU=Groups,DC=example,DC=org",
    groupfilter: "(&(objectClass=group)(member:1.2.840.113556.1.4.1941:={{.UserDN}}))",
    path: "ldap",
    upndomain: "EXAMPLE.ORG",
    url: "ldaps://dc-01.example.org",
    userattr: "sAMAccountName",
    userdn: "OU=Users,OU=Accounts,DC=example,DC=org",
});

Create a AuthBackend Resource

def AuthBackend(resource_name, opts=None, binddn=None, bindpass=None, certificate=None, deny_null_bind=None, description=None, discoverdn=None, groupattr=None, groupdn=None, groupfilter=None, insecure_tls=None, path=None, starttls=None, tls_max_version=None, tls_min_version=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, upndomain=None, url=None, use_token_groups=None, userattr=None, userdn=None, __props__=None);
func NewAuthBackend(ctx *Context, name string, args AuthBackendArgs, opts ...ResourceOption) (*AuthBackend, error)
public AuthBackend(string name, AuthBackendArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args AuthBackendArgs
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 AuthBackendArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AuthBackendArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

AuthBackend Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The AuthBackend resource accepts the following input properties:

Url string

The URL of the LDAP server

Binddn string

DN of object to bind when performing user search

Bindpass string

Password to use with binddn when performing user search

Certificate string

Trusted CA to validate TLS certificate

DenyNullBind bool
Description string

Description for the LDAP auth backend mount

Discoverdn bool
Groupattr string

LDAP attribute to follow on objects returned by groupfilter

Groupdn string

Base DN under which to perform group search

Groupfilter string

Go template used to construct group membership query

InsecureTls bool

Control whether or TLS certificates must be validated

Path string

Path to mount the LDAP auth backend under

Starttls bool

Control use of TLS when conecting to LDAP

TlsMaxVersion string

Maximum acceptable version of TLS

TlsMinVersion string

Minimum acceptable version of TLS

TokenBoundCidrs List<string>

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.

TokenExplicitMaxTtl int

If set, will encode an explicit max TTL onto the token in number of seconds. This is a hard cap even if token_ttl and token_max_ttl would otherwise allow a renewal.

TokenMaxTtl int

The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.

TokenNoDefaultPolicy bool

If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.

TokenNumUses int

The period, if any, in number of seconds to set on the token.

TokenPeriod 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.

TokenPolicies List<string>

List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.

TokenTtl int

The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.

TokenType string

The type of token that should be generated. Can be service, batch, or default to use the mount’s tuned default (which unless changed will be service tokens). For token store roles, there are two additional possibilities: default-service and default-batch which specify the type to return unless the client requests a different type at generation time.

Upndomain string

The userPrincipalDomain used to construct UPN string

UseTokenGroups bool

Use the Active Directory tokenGroups constructed attribute of the user to find the group memberships

Userattr string

Attribute on user object matching username passed in

Userdn string

Base DN under which to perform user search

Url string

The URL of the LDAP server

Binddn string

DN of object to bind when performing user search

Bindpass string

Password to use with binddn when performing user search

Certificate string

Trusted CA to validate TLS certificate

DenyNullBind bool
Description string

Description for the LDAP auth backend mount

Discoverdn bool
Groupattr string

LDAP attribute to follow on objects returned by groupfilter

Groupdn string

Base DN under which to perform group search

Groupfilter string

Go template used to construct group membership query

InsecureTls bool

Control whether or TLS certificates must be validated

Path string

Path to mount the LDAP auth backend under

Starttls bool

Control use of TLS when conecting to LDAP

TlsMaxVersion string

Maximum acceptable version of TLS

TlsMinVersion string

Minimum acceptable version of TLS

TokenBoundCidrs []string

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.

TokenExplicitMaxTtl int

If set, will encode an explicit max TTL onto the token in number of seconds. This is a hard cap even if token_ttl and token_max_ttl would otherwise allow a renewal.

TokenMaxTtl int

The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.

TokenNoDefaultPolicy bool

If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.

TokenNumUses int

The period, if any, in number of seconds to set on the token.

TokenPeriod 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.

TokenPolicies []string

List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.

TokenTtl int

The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.

TokenType string

The type of token that should be generated. Can be service, batch, or default to use the mount’s tuned default (which unless changed will be service tokens). For token store roles, there are two additional possibilities: default-service and default-batch which specify the type to return unless the client requests a different type at generation time.

Upndomain string

The userPrincipalDomain used to construct UPN string

UseTokenGroups bool

Use the Active Directory tokenGroups constructed attribute of the user to find the group memberships

Userattr string

Attribute on user object matching username passed in

Userdn string

Base DN under which to perform user search

url string

The URL of the LDAP server

binddn string

DN of object to bind when performing user search

bindpass string

Password to use with binddn when performing user search

certificate string

Trusted CA to validate TLS certificate

denyNullBind boolean
description string

Description for the LDAP auth backend mount

discoverdn boolean
groupattr string

LDAP attribute to follow on objects returned by groupfilter

groupdn string

Base DN under which to perform group search

groupfilter string

Go template used to construct group membership query

insecureTls boolean

Control whether or TLS certificates must be validated

path string

Path to mount the LDAP auth backend under

starttls boolean

Control use of TLS when conecting to LDAP

tlsMaxVersion string

Maximum acceptable version of TLS

tlsMinVersion string

Minimum acceptable version of TLS

tokenBoundCidrs string[]

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.

tokenExplicitMaxTtl number

If set, will encode an explicit max TTL onto the token in number of seconds. This is a hard cap even if token_ttl and token_max_ttl would otherwise allow a renewal.

tokenMaxTtl number

The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.

tokenNoDefaultPolicy boolean

If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.

tokenNumUses number

The period, if any, in number of seconds to set on the token.

tokenPeriod 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.

tokenPolicies string[]

List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.

tokenTtl number

The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.

tokenType string

The type of token that should be generated. Can be service, batch, or default to use the mount’s tuned default (which unless changed will be service tokens). For token store roles, there are two additional possibilities: default-service and default-batch which specify the type to return unless the client requests a different type at generation time.

upndomain string

The userPrincipalDomain used to construct UPN string

useTokenGroups boolean

Use the Active Directory tokenGroups constructed attribute of the user to find the group memberships

userattr string

Attribute on user object matching username passed in

userdn string

Base DN under which to perform user search

url str

The URL of the LDAP server

binddn str

DN of object to bind when performing user search

bindpass str

Password to use with binddn when performing user search

certificate str

Trusted CA to validate TLS certificate

deny_null_bind bool
description str

Description for the LDAP auth backend mount

discoverdn bool
groupattr str

LDAP attribute to follow on objects returned by groupfilter

groupdn str

Base DN under which to perform group search

groupfilter str

Go template used to construct group membership query

insecure_tls bool

Control whether or TLS certificates must be validated

path str

Path to mount the LDAP auth backend under

starttls bool

Control use of TLS when conecting to LDAP

tls_max_version str

Maximum acceptable version of TLS

tls_min_version str

Minimum acceptable version of TLS

token_bound_cidrs List[str]

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_max_ttl float

If set, will encode an explicit max TTL onto the token in number of seconds. This is a hard cap even if token_ttl and token_max_ttl would otherwise allow a renewal.

token_max_ttl float

The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.

token_no_default_policy bool

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_uses float

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]

List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.

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, or default to use the mount’s tuned default (which unless changed will be service tokens). For token store roles, there are two additional possibilities: default-service and default-batch which specify the type to return unless the client requests a different type at generation time.

upndomain str

The userPrincipalDomain used to construct UPN string

use_token_groups bool

Use the Active Directory tokenGroups constructed attribute of the user to find the group memberships

userattr str

Attribute on user object matching username passed in

userdn str

Base DN under which to perform user search

Outputs

All input properties are implicitly available as output properties. Additionally, the AuthBackend resource produces the following output properties:

Accessor string

The accessor for this auth mount.

Id string
The provider-assigned unique ID for this managed resource.
Accessor string

The accessor for this auth mount.

Id string
The provider-assigned unique ID for this managed resource.
accessor string

The accessor for this auth mount.

id string
The provider-assigned unique ID for this managed resource.
accessor str

The accessor for this auth mount.

id str
The provider-assigned unique ID for this managed resource.

Look up an Existing AuthBackend Resource

Get an existing AuthBackend 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?: AuthBackendState, opts?: CustomResourceOptions): AuthBackend
static get(resource_name, id, opts=None, accessor=None, binddn=None, bindpass=None, certificate=None, deny_null_bind=None, description=None, discoverdn=None, groupattr=None, groupdn=None, groupfilter=None, insecure_tls=None, path=None, starttls=None, tls_max_version=None, tls_min_version=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, upndomain=None, url=None, use_token_groups=None, userattr=None, userdn=None, __props__=None);
func GetAuthBackend(ctx *Context, name string, id IDInput, state *AuthBackendState, opts ...ResourceOption) (*AuthBackend, error)
public static AuthBackend Get(string name, Input<string> id, AuthBackendState? 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:

Accessor string

The accessor for this auth mount.

Binddn string

DN of object to bind when performing user search

Bindpass string

Password to use with binddn when performing user search

Certificate string

Trusted CA to validate TLS certificate

DenyNullBind bool
Description string

Description for the LDAP auth backend mount

Discoverdn bool
Groupattr string

LDAP attribute to follow on objects returned by groupfilter

Groupdn string

Base DN under which to perform group search

Groupfilter string

Go template used to construct group membership query

InsecureTls bool

Control whether or TLS certificates must be validated

Path string

Path to mount the LDAP auth backend under

Starttls bool

Control use of TLS when conecting to LDAP

TlsMaxVersion string

Maximum acceptable version of TLS

TlsMinVersion string

Minimum acceptable version of TLS

TokenBoundCidrs List<string>

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.

TokenExplicitMaxTtl int

If set, will encode an explicit max TTL onto the token in number of seconds. This is a hard cap even if token_ttl and token_max_ttl would otherwise allow a renewal.

TokenMaxTtl int

The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.

TokenNoDefaultPolicy bool

If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.

TokenNumUses int

The period, if any, in number of seconds to set on the token.

TokenPeriod 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.

TokenPolicies List<string>

List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.

TokenTtl int

The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.

TokenType string

The type of token that should be generated. Can be service, batch, or default to use the mount’s tuned default (which unless changed will be service tokens). For token store roles, there are two additional possibilities: default-service and default-batch which specify the type to return unless the client requests a different type at generation time.

Upndomain string

The userPrincipalDomain used to construct UPN string

Url string

The URL of the LDAP server

UseTokenGroups bool

Use the Active Directory tokenGroups constructed attribute of the user to find the group memberships

Userattr string

Attribute on user object matching username passed in

Userdn string

Base DN under which to perform user search

Accessor string

The accessor for this auth mount.

Binddn string

DN of object to bind when performing user search

Bindpass string

Password to use with binddn when performing user search

Certificate string

Trusted CA to validate TLS certificate

DenyNullBind bool
Description string

Description for the LDAP auth backend mount

Discoverdn bool
Groupattr string

LDAP attribute to follow on objects returned by groupfilter

Groupdn string

Base DN under which to perform group search

Groupfilter string

Go template used to construct group membership query

InsecureTls bool

Control whether or TLS certificates must be validated

Path string

Path to mount the LDAP auth backend under

Starttls bool

Control use of TLS when conecting to LDAP

TlsMaxVersion string

Maximum acceptable version of TLS

TlsMinVersion string

Minimum acceptable version of TLS

TokenBoundCidrs []string

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.

TokenExplicitMaxTtl int

If set, will encode an explicit max TTL onto the token in number of seconds. This is a hard cap even if token_ttl and token_max_ttl would otherwise allow a renewal.

TokenMaxTtl int

The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.

TokenNoDefaultPolicy bool

If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.

TokenNumUses int

The period, if any, in number of seconds to set on the token.

TokenPeriod 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.

TokenPolicies []string

List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.

TokenTtl int

The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.

TokenType string

The type of token that should be generated. Can be service, batch, or default to use the mount’s tuned default (which unless changed will be service tokens). For token store roles, there are two additional possibilities: default-service and default-batch which specify the type to return unless the client requests a different type at generation time.

Upndomain string

The userPrincipalDomain used to construct UPN string

Url string

The URL of the LDAP server

UseTokenGroups bool

Use the Active Directory tokenGroups constructed attribute of the user to find the group memberships

Userattr string

Attribute on user object matching username passed in

Userdn string

Base DN under which to perform user search

accessor string

The accessor for this auth mount.

binddn string

DN of object to bind when performing user search

bindpass string

Password to use with binddn when performing user search

certificate string

Trusted CA to validate TLS certificate

denyNullBind boolean
description string

Description for the LDAP auth backend mount

discoverdn boolean
groupattr string

LDAP attribute to follow on objects returned by groupfilter

groupdn string

Base DN under which to perform group search

groupfilter string

Go template used to construct group membership query

insecureTls boolean

Control whether or TLS certificates must be validated

path string

Path to mount the LDAP auth backend under

starttls boolean

Control use of TLS when conecting to LDAP

tlsMaxVersion string

Maximum acceptable version of TLS

tlsMinVersion string

Minimum acceptable version of TLS

tokenBoundCidrs string[]

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.

tokenExplicitMaxTtl number

If set, will encode an explicit max TTL onto the token in number of seconds. This is a hard cap even if token_ttl and token_max_ttl would otherwise allow a renewal.

tokenMaxTtl number

The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.

tokenNoDefaultPolicy boolean

If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.

tokenNumUses number

The period, if any, in number of seconds to set on the token.

tokenPeriod 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.

tokenPolicies string[]

List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.

tokenTtl number

The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.

tokenType string

The type of token that should be generated. Can be service, batch, or default to use the mount’s tuned default (which unless changed will be service tokens). For token store roles, there are two additional possibilities: default-service and default-batch which specify the type to return unless the client requests a different type at generation time.

upndomain string

The userPrincipalDomain used to construct UPN string

url string

The URL of the LDAP server

useTokenGroups boolean

Use the Active Directory tokenGroups constructed attribute of the user to find the group memberships

userattr string

Attribute on user object matching username passed in

userdn string

Base DN under which to perform user search

accessor str

The accessor for this auth mount.

binddn str

DN of object to bind when performing user search

bindpass str

Password to use with binddn when performing user search

certificate str

Trusted CA to validate TLS certificate

deny_null_bind bool
description str

Description for the LDAP auth backend mount

discoverdn bool
groupattr str

LDAP attribute to follow on objects returned by groupfilter

groupdn str

Base DN under which to perform group search

groupfilter str

Go template used to construct group membership query

insecure_tls bool

Control whether or TLS certificates must be validated

path str

Path to mount the LDAP auth backend under

starttls bool

Control use of TLS when conecting to LDAP

tls_max_version str

Maximum acceptable version of TLS

tls_min_version str

Minimum acceptable version of TLS

token_bound_cidrs List[str]

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_max_ttl float

If set, will encode an explicit max TTL onto the token in number of seconds. This is a hard cap even if token_ttl and token_max_ttl would otherwise allow a renewal.

token_max_ttl float

The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.

token_no_default_policy bool

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_uses float

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]

List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.

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, or default to use the mount’s tuned default (which unless changed will be service tokens). For token store roles, there are two additional possibilities: default-service and default-batch which specify the type to return unless the client requests a different type at generation time.

upndomain str

The userPrincipalDomain used to construct UPN string

url str

The URL of the LDAP server

use_token_groups bool

Use the Active Directory tokenGroups constructed attribute of the user to find the group memberships

userattr str

Attribute on user object matching username passed in

userdn str

Base DN under which to perform user search

Package Details

Repository
https://github.com/pulumi/pulumi-vault
License
Apache-2.0
Notes
This Pulumi package is based on the vault Terraform Provider.