Class: SDM::ActiveDirectoryEngine

Inherits:
Object
  • Object
show all
Defined in:
lib/models/porcelain.rb

Overview

ActiveDirectoryEngine is currently unstable, and its API may change, or it may be removed, without a major version bump.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(after_read_ttl: nil, binddn: nil, bindpass: nil, certificate: nil, connection_timeout: nil, do_not_validate_timestamps: nil, id: nil, insecure_tls: nil, key_rotation_interval_days: nil, max_backoff_duration: nil, name: nil, policy: nil, public_key: nil, request_timeout: nil, secret_store_id: nil, secret_store_root_path: nil, start_tls: nil, tags: nil, ttl: nil, upndomain: nil, url: nil, userdn: nil) ⇒ ActiveDirectoryEngine

Returns a new instance of ActiveDirectoryEngine.



2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
# File 'lib/models/porcelain.rb', line 2030

def initialize(
  after_read_ttl: nil,
  binddn: nil,
  bindpass: nil,
  certificate: nil,
  connection_timeout: nil,
  do_not_validate_timestamps: nil,
  id: nil,
  insecure_tls: nil,
  key_rotation_interval_days: nil,
  max_backoff_duration: nil,
  name: nil,
  policy: nil,
  public_key: nil,
  request_timeout: nil,
  secret_store_id: nil,
  secret_store_root_path: nil,
  start_tls: nil,
  tags: nil,
  ttl: nil,
  upndomain: nil,
  url: nil,
  userdn: nil
)
  @after_read_ttl = after_read_ttl == nil ? nil : after_read_ttl
  @binddn = binddn == nil ? "" : binddn
  @bindpass = bindpass == nil ? "" : bindpass
  @certificate = certificate == nil ? "" : certificate
  @connection_timeout = connection_timeout == nil ? 0 : connection_timeout
  @do_not_validate_timestamps = do_not_validate_timestamps == nil ? false : do_not_validate_timestamps
  @id = id == nil ? "" : id
  @insecure_tls = insecure_tls == nil ? false : insecure_tls
  @key_rotation_interval_days = key_rotation_interval_days == nil ? 0 : key_rotation_interval_days
  @max_backoff_duration = max_backoff_duration == nil ? nil : max_backoff_duration
  @name = name == nil ? "" : name
  @policy = policy == nil ? nil : policy
  @public_key = public_key == nil ? "" : public_key
  @request_timeout = request_timeout == nil ? 0 : request_timeout
  @secret_store_id = secret_store_id == nil ? "" : secret_store_id
  @secret_store_root_path = secret_store_root_path == nil ? "" : secret_store_root_path
  @start_tls = start_tls == nil ? false : start_tls
  @tags = tags == nil ? SDM::_porcelain_zero_value_tags() : tags
  @ttl = ttl == nil ? nil : ttl
  @upndomain = upndomain == nil ? "" : upndomain
  @url = url == nil ? "" : url
  @userdn = userdn == nil ? "" : userdn
end

Instance Attribute Details

#after_read_ttlObject

The default time-to-live duration of the password after it's read. Once the ttl has passed, a password will be rotated.



1985
1986
1987
# File 'lib/models/porcelain.rb', line 1985

def after_read_ttl
  @after_read_ttl
end

#binddnObject

Distinguished name of object to bind when performing user and group search. Example: cn=vault,ou=Users,dc=example,dc=com



1987
1988
1989
# File 'lib/models/porcelain.rb', line 1987

def binddn
  @binddn
end

#bindpassObject

Password to use along with binddn when performing user search.



1989
1990
1991
# File 'lib/models/porcelain.rb', line 1989

def bindpass
  @bindpass
end

#certificateObject

CA certificate to use when verifying LDAP server certificate, must be x509 PEM encoded.



1991
1992
1993
# File 'lib/models/porcelain.rb', line 1991

def certificate
  @certificate
end

#connection_timeoutObject

Timeout, in seconds, when attempting to connect to the LDAP server before trying the next URL in the configuration.



1993
1994
1995
# File 'lib/models/porcelain.rb', line 1993

def connection_timeout
  @connection_timeout
end

#do_not_validate_timestampsObject

If set to true this will prevent password change timestamp validation in Active Directory when validating credentials



1995
1996
1997
# File 'lib/models/porcelain.rb', line 1995

def do_not_validate_timestamps
  @do_not_validate_timestamps
end

#idObject

Unique identifier of the Secret Engine.



1997
1998
1999
# File 'lib/models/porcelain.rb', line 1997

def id
  @id
end

#insecure_tlsObject

If true, skips LDAP server SSL certificate verification - insecure, use with caution!



1999
2000
2001
# File 'lib/models/porcelain.rb', line 1999

def insecure_tls
  @insecure_tls
end

#key_rotation_interval_daysObject

An interval of public/private key rotation for secret engine in days



2001
2002
2003
# File 'lib/models/porcelain.rb', line 2001

def key_rotation_interval_days
  @key_rotation_interval_days
end

#max_backoff_durationObject

The maximum retry duration in case of automatic failure. On failed ttl rotation attempt it will be retried in an increasing intervals until it reaches max_backoff_duration



2004
2005
2006
# File 'lib/models/porcelain.rb', line 2004

def max_backoff_duration
  @max_backoff_duration
end

#nameObject

Unique human-readable name of the Secret Engine.



2006
2007
2008
# File 'lib/models/porcelain.rb', line 2006

def name
  @name
end

#policyObject

Policy for password creation



2008
2009
2010
# File 'lib/models/porcelain.rb', line 2008

def policy
  @policy
end

#public_keyObject

Public key linked with a secret engine



2010
2011
2012
# File 'lib/models/porcelain.rb', line 2010

def public_key
  @public_key
end

#request_timeoutObject

Timeout, in seconds, for the connection when making requests against the server before returning back an error.



2012
2013
2014
# File 'lib/models/porcelain.rb', line 2012

def request_timeout
  @request_timeout
end

#secret_store_idObject

Backing secret store identifier



2014
2015
2016
# File 'lib/models/porcelain.rb', line 2014

def secret_store_id
  @secret_store_id
end

#secret_store_root_pathObject

Backing Secret Store root path where managed secrets are going to be stored



2016
2017
2018
# File 'lib/models/porcelain.rb', line 2016

def secret_store_root_path
  @secret_store_root_path
end

#start_tlsObject

If true, issues a StartTLS command after establishing an unencrypted connection.



2018
2019
2020
# File 'lib/models/porcelain.rb', line 2018

def start_tls
  @start_tls
end

#tagsObject

Tags is a map of key, value pairs.



2020
2021
2022
# File 'lib/models/porcelain.rb', line 2020

def tags
  @tags
end

#ttlObject

The default password time-to-live duration. Once the ttl has passed, a password will be rotated the next time it's requested.



2022
2023
2024
# File 'lib/models/porcelain.rb', line 2022

def ttl
  @ttl
end

#upndomainObject

The domain (userPrincipalDomain) used to construct a UPN string for authentication.



2024
2025
2026
# File 'lib/models/porcelain.rb', line 2024

def upndomain
  @upndomain
end

#urlObject

The LDAP server to connect to.



2026
2027
2028
# File 'lib/models/porcelain.rb', line 2026

def url
  @url
end

#userdnObject

Base DN under which to perform user search. Example: ou=Users,dc=example,dc=com



2028
2029
2030
# File 'lib/models/porcelain.rb', line 2028

def userdn
  @userdn
end

Instance Method Details

#to_json(options = {}) ⇒ Object



2078
2079
2080
2081
2082
2083
2084
# File 'lib/models/porcelain.rb', line 2078

def to_json(options = {})
  hash = {}
  self.instance_variables.each do |var|
    hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
  end
  hash.to_json
end