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.



1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
# File 'lib/models/porcelain.rb', line 1712

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.



1667
1668
1669
# File 'lib/models/porcelain.rb', line 1667

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



1669
1670
1671
# File 'lib/models/porcelain.rb', line 1669

def binddn
  @binddn
end

#bindpassObject

Password to use along with binddn when performing user search.



1671
1672
1673
# File 'lib/models/porcelain.rb', line 1671

def bindpass
  @bindpass
end

#certificateObject

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



1673
1674
1675
# File 'lib/models/porcelain.rb', line 1673

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.



1675
1676
1677
# File 'lib/models/porcelain.rb', line 1675

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



1677
1678
1679
# File 'lib/models/porcelain.rb', line 1677

def do_not_validate_timestamps
  @do_not_validate_timestamps
end

#idObject

Unique identifier of the Secret Engine.



1679
1680
1681
# File 'lib/models/porcelain.rb', line 1679

def id
  @id
end

#insecure_tlsObject

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



1681
1682
1683
# File 'lib/models/porcelain.rb', line 1681

def insecure_tls
  @insecure_tls
end

#key_rotation_interval_daysObject

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



1683
1684
1685
# File 'lib/models/porcelain.rb', line 1683

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



1686
1687
1688
# File 'lib/models/porcelain.rb', line 1686

def max_backoff_duration
  @max_backoff_duration
end

#nameObject

Unique human-readable name of the Secret Engine.



1688
1689
1690
# File 'lib/models/porcelain.rb', line 1688

def name
  @name
end

#policyObject

Policy for password creation



1690
1691
1692
# File 'lib/models/porcelain.rb', line 1690

def policy
  @policy
end

#public_keyObject

Public key linked with a secret engine



1692
1693
1694
# File 'lib/models/porcelain.rb', line 1692

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.



1694
1695
1696
# File 'lib/models/porcelain.rb', line 1694

def request_timeout
  @request_timeout
end

#secret_store_idObject

Backing secret store identifier



1696
1697
1698
# File 'lib/models/porcelain.rb', line 1696

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



1698
1699
1700
# File 'lib/models/porcelain.rb', line 1698

def secret_store_root_path
  @secret_store_root_path
end

#start_tlsObject

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



1700
1701
1702
# File 'lib/models/porcelain.rb', line 1700

def start_tls
  @start_tls
end

#tagsObject

Tags is a map of key, value pairs.



1702
1703
1704
# File 'lib/models/porcelain.rb', line 1702

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.



1704
1705
1706
# File 'lib/models/porcelain.rb', line 1704

def ttl
  @ttl
end

#upndomainObject

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



1706
1707
1708
# File 'lib/models/porcelain.rb', line 1706

def upndomain
  @upndomain
end

#urlObject

The LDAP server to connect to.



1708
1709
1710
# File 'lib/models/porcelain.rb', line 1708

def url
  @url
end

#userdnObject

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



1710
1711
1712
# File 'lib/models/porcelain.rb', line 1710

def userdn
  @userdn
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1760
1761
1762
1763
1764
1765
1766
# File 'lib/models/porcelain.rb', line 1760

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