Class: SDM::ActiveDirectoryEngine

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

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, node_selector: 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.



2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
# File 'lib/models/porcelain.rb', line 2345

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,
  node_selector: 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
  @node_selector = node_selector == nil ? "" : node_selector
  @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.



2298
2299
2300
# File 'lib/models/porcelain.rb', line 2298

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



2300
2301
2302
# File 'lib/models/porcelain.rb', line 2300

def binddn
  @binddn
end

#bindpassObject

Password to use along with binddn when performing user search.



2302
2303
2304
# File 'lib/models/porcelain.rb', line 2302

def bindpass
  @bindpass
end

#certificateObject

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



2304
2305
2306
# File 'lib/models/porcelain.rb', line 2304

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.



2306
2307
2308
# File 'lib/models/porcelain.rb', line 2306

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



2308
2309
2310
# File 'lib/models/porcelain.rb', line 2308

def do_not_validate_timestamps
  @do_not_validate_timestamps
end

#idObject

Unique identifier of the Secret Engine.



2310
2311
2312
# File 'lib/models/porcelain.rb', line 2310

def id
  @id
end

#insecure_tlsObject

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



2312
2313
2314
# File 'lib/models/porcelain.rb', line 2312

def insecure_tls
  @insecure_tls
end

#key_rotation_interval_daysObject

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



2314
2315
2316
# File 'lib/models/porcelain.rb', line 2314

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



2317
2318
2319
# File 'lib/models/porcelain.rb', line 2317

def max_backoff_duration
  @max_backoff_duration
end

#nameObject

Unique human-readable name of the Secret Engine.



2319
2320
2321
# File 'lib/models/porcelain.rb', line 2319

def name
  @name
end

#node_selectorObject

node selector is used to narrow down the nodes used to communicate with with secret engine



2321
2322
2323
# File 'lib/models/porcelain.rb', line 2321

def node_selector
  @node_selector
end

#policyObject

Policy for password creation



2323
2324
2325
# File 'lib/models/porcelain.rb', line 2323

def policy
  @policy
end

#public_keyObject

Public key linked with a secret engine



2325
2326
2327
# File 'lib/models/porcelain.rb', line 2325

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.



2327
2328
2329
# File 'lib/models/porcelain.rb', line 2327

def request_timeout
  @request_timeout
end

#secret_store_idObject

Backing secret store identifier



2329
2330
2331
# File 'lib/models/porcelain.rb', line 2329

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



2331
2332
2333
# File 'lib/models/porcelain.rb', line 2331

def secret_store_root_path
  @secret_store_root_path
end

#start_tlsObject

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



2333
2334
2335
# File 'lib/models/porcelain.rb', line 2333

def start_tls
  @start_tls
end

#tagsObject

Tags is a map of key, value pairs.



2335
2336
2337
# File 'lib/models/porcelain.rb', line 2335

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.



2337
2338
2339
# File 'lib/models/porcelain.rb', line 2337

def ttl
  @ttl
end

#upndomainObject

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



2339
2340
2341
# File 'lib/models/porcelain.rb', line 2339

def upndomain
  @upndomain
end

#urlObject

The LDAP server to connect to.



2341
2342
2343
# File 'lib/models/porcelain.rb', line 2341

def url
  @url
end

#userdnObject

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



2343
2344
2345
# File 'lib/models/porcelain.rb', line 2343

def userdn
  @userdn
end

Instance Method Details

#to_json(options = {}) ⇒ Object



2395
2396
2397
2398
2399
2400
2401
# File 'lib/models/porcelain.rb', line 2395

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