Module: ROM::LDAP::ActiveDirectory Private

Defined in:
lib/rom/ldap/directory/vendors/active_directory.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Microsoft Active Directory Extension

Constant Summary collapse

VERSION_NAMES =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Note:

Use the AD Forest configuration container as a search base.

RootDSE domainFunctionality RootDSE domainControllerFunctionality RootDSE forestFunctionality

{
  0 => 'Windows Server 2000 (5.0)',
  1 => 'Windows Server 2003 (5.2)',
  2 => 'Windows Server 2003 R2 (5.2)',
  3 => 'Windows Server 2008 (6.0)',
  4 => 'Windows Server 2008 R2 (6.1)',
  5 => 'Windows Server 2012 (6.2)',
  6 => 'Windows Server 2012 R2 (6.3)',
  7 => 'Windows Server 2016 (10.0)',
  8 => 'Windows Server Latest Version (?)'
}.freeze
POLICIES =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

RootDSE supportedLDAPPolicies

%w[
  InitRecvTimeout
  MaxBatchReturnMessages
  MaxConnections
  MaxConnIdleTime
  MaxDatagramRecv
  MaxNotificationPerConn
  MaxPageSize
  MaxPercentDirSyncRequests
  MaxPoolThreads
  MaxQueryDuration
  MaxReceiveBuffer
  MaxResultSetSize
  MaxResultSetsPerConn
  MaxTempTableSize
  MaxValRange
  MaxValRangeTransitive
  MinResultSets
  SystemMemoryLimitPercent
  ThreadMemoryLimit
].freeze

Instance Method Summary collapse

Instance Method Details

#controller_functionalityInteger

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Integer)


71
72
73
# File 'lib/rom/ldap/directory/vendors/active_directory.rb', line 71

def controller_functionality
  root.first('domainControllerFunctionality').to_i
end

#directory_timeTime

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

LDAP server internal clock

Returns:

  • (Time)


91
92
93
# File 'lib/rom/ldap/directory/vendors/active_directory.rb', line 91

def directory_time
  Functions[:to_time][root.first('currentTime')]
end

#domain_functionalityInteger

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Integer)


83
84
85
# File 'lib/rom/ldap/directory/vendors/active_directory.rb', line 83

def domain_functionality
  root.first('domainFunctionality').to_i
end

#forest_functionalityInteger

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Integer)


77
78
79
# File 'lib/rom/ldap/directory/vendors/active_directory.rb', line 77

def forest_functionality
  root.first('forestFunctionality').to_i
end

#supported_capabilitiesArray<String>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Array<String>)


97
98
99
# File 'lib/rom/ldap/directory/vendors/active_directory.rb', line 97

def supported_capabilities
  root['supportedCapabilities'].sort
end

#vendor_nameString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (String)


59
60
61
# File 'lib/rom/ldap/directory/vendors/active_directory.rb', line 59

def vendor_name
  'Microsoft'
end

#vendor_versionString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (String)


65
66
67
# File 'lib/rom/ldap/directory/vendors/active_directory.rb', line 65

def vendor_version
  VERSION_NAMES[domain_functionality]
end