Module: ROM::LDAP

Extended by:
Dry::Core::Extensions
Included in:
Relation
Defined in:
lib/rom/ldap/dsl.rb,
lib/rom/ldap/oid.rb,
lib/rom/ldap/pdu.rb,
lib/rom/ldap/ldif.rb,
lib/rom/ldap/alias.rb,
lib/rom/ldap/scope.rb,
lib/rom/ldap/types.rb,
lib/rom/ldap/client.rb,
lib/rom/ldap/errors.rb,
lib/rom/ldap/schema.rb,
lib/rom/ldap/socket.rb,
lib/rom/ldap/dataset.rb,
lib/rom/ldap/gateway.rb,
lib/rom/ldap/version.rb,
lib/rom/ldap/matchers.rb,
lib/rom/ldap/relation.rb,
lib/rom/ldap/type_map.rb,
lib/rom/ldap/attribute.rb,
lib/rom/ldap/constants.rb,
lib/rom/ldap/directory.rb,
lib/rom/ldap/formatter.rb,
lib/rom/ldap/functions.rb,
lib/rom/ldap/responses.rb,
lib/rom/ldap/expression.rb,
lib/rom/ldap/extensions.rb,
lib/rom/ldap/schema/dsl.rb,
lib/rom/ldap/dataset/dsl.rb,
lib/rom/ldap/transaction.rb,
lib/rom/ldap/directory/env.rb,
lib/rom/ldap/ldif/exporter.rb,
lib/rom/ldap/ldif/importer.rb,
lib/rom/ldap/message_queue.rb,
lib/rom/ldap/directory/root.rb,
lib/rom/ldap/projection_dsl.rb,
lib/rom/ldap/search_request.rb,
lib/rom/ldap/commands/create.rb,
lib/rom/ldap/commands/delete.rb,
lib/rom/ldap/commands/update.rb,
lib/rom/ldap/directory/entry.rb,
lib/rom/ldap/extensions/dsml.rb,
lib/rom/ldap/mapper_compiler.rb,
lib/rom/ldap/restriction_dsl.rb,
lib/rom/ldap/schema/inferrer.rb,
lib/rom/ldap/relation/reading.rb,
lib/rom/ldap/relation/writing.rb,
lib/rom/ldap/associations/core.rb,
lib/rom/ldap/client/operations.rb,
lib/rom/ldap/parsers/attribute.rb,
lib/rom/ldap/plugin/pagination.rb,
lib/rom/ldap/dataset/conversion.rb,
lib/rom/ldap/directory/password.rb,
lib/rom/ldap/expression_encoder.rb,
lib/rom/ldap/extensions/msgpack.rb,
lib/rom/ldap/relation/exporting.rb,
lib/rom/ldap/dataset/persistence.rb,
lib/rom/ldap/schema/type_builder.rb,
lib/rom/ldap/directory/operations.rb,
lib/rom/ldap/associations/self_ref.rb,
lib/rom/ldap/client/authentication.rb,
lib/rom/ldap/parsers/filter_syntax.rb,
lib/rom/ldap/directory/capabilities.rb,
lib/rom/ldap/directory/tokenization.rb,
lib/rom/ldap/directory/transactions.rb,
lib/rom/ldap/associations/one_to_one.rb,
lib/rom/ldap/parsers/abstract_syntax.rb,
lib/rom/ldap/associations/many_to_one.rb,
lib/rom/ldap/associations/one_to_many.rb,
lib/rom/ldap/extensions/compatibility.rb,
lib/rom/ldap/associations/many_to_many.rb,
lib/rom/ldap/directory/vendors/open_dj.rb,
lib/rom/ldap/directory/vendors/unknown.rb,
lib/rom/ldap/extensions/optimised_json.rb,
lib/rom/ldap/schema/attributes_inferrer.rb,
lib/rom/ldap/directory/vendors/apache_ds.rb,
lib/rom/ldap/directory/vendors/open_ldap.rb,
lib/rom/ldap/directory/vendors/e_directory.rb,
lib/rom/ldap/extensions/rails_log_subscriber.rb,
lib/rom/ldap/directory/vendors/open_directory.rb,
lib/rom/ldap/directory/vendors/active_directory.rb,
lib/rom/ldap/directory/vendors/three_eight_nine.rb,
lib/rom/ldap/extensions/active_support_notifications.rb

Defined Under Namespace

Modules: ActiveDirectory, ActiveSupportInstrumentation, ApacheDs, Associations, Commands, DSML, DSMLExport, EDirectory, Functions, LDIF, MsgPackExport, OpenDirectory, OpenDj, OpenLdap, OptimisedJSON, Parsers, Plugin, ThreeEightNine, Types, Unknown Classes: Attribute, Client, DSL, Dataset, Directory, Expression, ExpressionEncoder, Gateway, MapperCompiler, PDU, ProjectionDSL, RailsLogSubscriber, Relation, RestrictionDSL, Schema, SearchRequest, Socket, Transaction

Constant Summary collapse

OID =

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.

LDAP OID hash map

{
  matched_values:                   '1.2.826.0.1.3344810.2.3',
  paged_results:                    '1.2.840.113556.1.4.319',
  show_deleted:                     '1.2.840.113556.1.4.417',
  sort_request:                     '1.2.840.113556.1.4.473',
  sort_response:                    '1.2.840.113556.1.4.474',
  crossdom_move_target:             '1.2.840.113556.1.4.521',
  search_notification:              '1.2.840.113556.1.4.528',
  lazy_commit:                      '1.2.840.113556.1.4.619',
  sd_flags:                         '1.2.840.113556.1.4.801',
  matching_rule_bit_and:            '1.2.840.113556.1.4.803',
  matching_rule_bit_or:             '1.2.840.113556.1.4.804',
  delete_tree:                      '1.2.840.113556.1.4.805',
  directory_sync:                   '1.2.840.113556.1.4.841',
  verify_name:                      '1.2.840.113556.1.4.1338',
  domain_scope:                     '1.2.840.113556.1.4.1339',
  search_options:                   '1.2.840.113556.1.4.1340',
  permissive_modify:                '1.2.840.113556.1.4.1413',
  fast_concurrent_bind:             '1.2.840.113556.1.4.1781',
  matching_rule_in_chain:           '1.2.840.113556.1.4.1941',
  server_policy_hints:              '1.2.840.113556.1.4.2239',
  cancel_operation:                 '1.3.6.1.1.8',
  assertion:                        '1.3.6.1.1.12',
  pre_read:                         '1.3.6.1.1.13.1',
  post_read:                        '1.3.6.1.1.13.2',
  modify_increment:                 '1.3.6.1.1.14',
  transaction_start_request:        '1.3.6.1.1.21.1',
  transaction_spec_request:         '1.3.6.1.1.21.2',
  transaction_end_request:          '1.3.6.1.1.21.3',
  dont_use_copy:                    '1.3.6.1.1.22',
  password_policy_request:          '1.3.6.1.4.1.42.2.27.8.5.1',
  get_effective_rights_request:     '1.3.6.1.4.1.42.2.27.9.5.2',
  account_usable_request:           '1.3.6.1.4.1.42.2.27.9.5.8',
  apple_oid_prefix:                 '1.3.6.1.4.1.63',
  notice_of_disconnection:          '1.3.6.1.4.1.1466.20036',
  start_tls:                        '1.3.6.1.4.1.1466.20037',
  ns_transmitted:                   '1.3.6.1.4.1.1466.29539.12',
  dynamic_refresh:                  '1.3.6.1.4.1.1466.101.119.1',
  all_operational_attributes:       '1.3.6.1.4.1.4203.1.5.1',
  oc_ad_lists:                      '1.3.6.1.4.1.4203.1.5.2',
  true_false_filters:               '1.3.6.1.4.1.4203.1.5.3',
  language_tag_options:             '1.3.6.1.4.1.4203.1.5.4',
  language_range_options:           '1.3.6.1.4.1.4203.1.5.5',
  sync_request:                     '1.3.6.1.4.1.4203.1.9.1.1',
  sync_state:                       '1.3.6.1.4.1.4203.1.9.1.2',
  sync_done:                        '1.3.6.1.4.1.4203.1.9.1.3',
  sync_info_message:                '1.3.6.1.4.1.4203.1.9.1.4',
  subentries:                       '1.3.6.1.4.1.4203.1.10.1',
  password_modify:                  '1.3.6.1.4.1.4203.1.11.1',
  val_sort:                         '1.3.6.1.4.1.4203.666.5.14',
  dereference:                      '1.3.6.1.4.1.4203.666.5.16',
  cascade:                          '1.3.6.1.4.1.18060.0.0.1',
  launch_diagnostic_ui_request:     '1.3.6.1.4.1.18060.0.1.1',
  launch_diagnostic_ui_response:    '1.3.6.1.4.1.18060.0.1.2',
  graceful_shutdown_request:        '1.3.6.1.4.1.18060.0.1.3',
  graceful_shutdown_response:       '1.3.6.1.4.1.18060.0.1.4',
  graceful_disconnect:              '1.3.6.1.4.1.18060.0.1.5',
  stored_procedure_request:         '1.3.6.1.4.1.18060.0.1.6',
  stored_procedure_response:        '1.3.6.1.4.1.18060.0.1.7',
  create_grouping_request:          '2.16.840.1.113719.1.27.103.1',
  create_grouping_response:         '2.16.840.1.113719.1.27.103.1',
  end_grouping_request:             '2.16.840.1.113719.1.27.103.2',
  end_grouping_response:            '2.16.840.1.113719.1.27.103.2',
  grouping:                         '2.16.840.1.113719.1.27.103.7',
  transaction_grouping:             '2.16.840.1.113719.1.27.103.8',
  manage_dsa_it:                    '2.16.840.1.113730.3.4.2',
  persistent_search:                '2.16.840.1.113730.3.4.3',
  netscape_password_expired:        '2.16.840.1.113730.3.4.4',
  netscape_password_expiring:       '2.16.840.1.113730.3.4.5',
  entry_change_notification:        '2.16.840.1.113730.3.4.7',
  virtual_list_view_request:        '2.16.840.1.113730.3.4.9',
  virtual_list_view_response:       '2.16.840.1.113730.3.4.10',
  proxied_authorization_v1:         '2.16.840.1.113730.3.4.12',
  replication_update_information:   '2.16.840.1.113730.3.4.13',
  search_on_specific_database:      '2.16.840.1.113730.3.4.14',
  authentication_response:          '2.16.840.1.113730.3.4.15',
  authentication_identity_request:  '2.16.840.1.113730.3.4.16',
  real_attribute_only_request:      '2.16.840.1.113730.3.4.17',
  proxied_authorization_v2:         '2.16.840.1.113730.3.4.18',
  virtual_attributes_only_request:  '2.16.840.1.113730.3.4.19'
}.freeze
SUCCESS_CODES =

Returns:

  • (Array<Symbol>)

See Also:

i[
  success
  time_limit_exceeded
  size_limit_exceeded
  compare_true
  compare_false
  referral
  sasl_bind_in_progress
].freeze
DEREF_NEVER =

Do not dereference aliases in searching or in locating the base object of the search.

0
DEREF_SEARCH =

While searching subordinates of the base object, dereference any alias within the search scope.

1
DEREF_FIND =

Dereference aliases in locating the base object of the search, but not when searching subordinates of the base object.

2
DEREF_ALWAYS =

Always dereference aliases both in searching and in locating the base object of the search. is the default behavior.

3
DEREF_ALL =

Array of all dereferencing modes

[DEREF_NEVER, DEREF_SEARCH, DEREF_FIND, DEREF_ALWAYS].freeze
SCOPE_BASE =

Search Scope

Constrained to the entry named by baseObject.

0
SCOPE_ONE =

Constrained to the immediate subordinates of the entry named by baseObject.

1
SCOPE_SUB =

Constrained to the entry named by baseObject and to all its subordinates.

2
SCOPES =

“sub”

[SCOPE_BASE, SCOPE_ONE, SCOPE_SUB].freeze
CONNECTION_FAILURES =
[
  EOFError,
  Errno::ECONNABORTED,
  Errno::ECONNREFUSED,
  Errno::ECONNRESET,
  Errno::EHOSTUNREACH,
  Errno::EIO,
  Errno::ENETDOWN,
  Errno::ENETRESET,
  Errno::EPIPE,
  Errno::ETIMEDOUT,
  IOError
].freeze
BindError =
Class.new(StandardError)
SecureBindError =
Class.new(StandardError)
ResponseError =

See Also:

  • Client#submit
Class.new(StandardError)
DistinguishedNameError =

See Also:

  • #by_dn, #add
Class.new(StandardError)
ConnectionError =

See Also:

  • Socket#connect
Class.new(StandardError)
PasswordError =
Class.new(StandardError)
MAJOR =

The major version of ROM-LDAP. Only bumped for major changes.

0
MINOR =

The minor version of ROM-LDAP. Bumped for every non-patch level release.

2
TINY =

The tiny version of ROM-LDAP. Only bumped for bugfix releases.

2
VERSION =

The version of ROM-LDAP, as a string (e.g. “2.11.0”)

[MAJOR, MINOR, TINY].join('.').freeze
STRING_MATCHERS =

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.

Type Builder

Matching Rules - 2.5.13

Returns:

  • (Array<String>)

See Also:

%w[
  2.5.13.0 objectIdentifierMatch
  2.5.13.1 distinguishedNameMatch
  2.5.13.2 caseIgnoreMatch
  2.5.13.3 caseIgnoreOrderingMatch
  2.5.13.4 caseIgnoreSubstringsMatch
  2.5.13.5 caseExactMatch
  2.5.13.6 caseExactOrderingMatch
  2.5.13.7 caseExactSubstringsMatch
  2.5.13.8 numericStringMatch
  2.5.13.9 numericStringOrderingMatch
  2.5.13.10 numericStringSubstringsMatch
  2.5.13.11 caseIgnoreListMatch
  2.5.13.12 caseIgnoreListSubstringsMatch
  2.5.13.17 octetStringMatch
  2.5.13.18 octetStringOrderingMatch
  2.5.13.20 telephoneNumberMatch
  2.5.13.21 telephoneNumberSubstringsMatch
  2.5.13.24 protocolInformationMatch
  2.5.13.30 objectIdentifierFirstComponentMatch

  1.3.6.1.1.16.2 uuidMatch
  1.3.6.1.1.16.3 uuidOrderingMatch

  1.3.6.1.4.1.1466.109.114.1 caseExactIA5Match
  1.3.6.1.4.1.1466.109.114.2 caseIgnoreIA5Match
  1.3.6.1.4.1.1466.109.114.3 caseIgnoreIA5SubstringsMatch
].freeze
BOOLEAN_MATCHERS =

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.

Returns:

  • (Array<String>)
%w[
  2.5.13.13 booleanMatch
].freeze
INTEGER_MATCHERS =

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.

Returns:

  • (Array<String>)
%w[
  2.5.13.14 integerMatch
  2.5.13.15 integerOrderingMatch
].freeze
TIME_MATCHERS =

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.

Returns:

  • (Array<String>)
%w[
  csnMatch
  2.5.13.25 uTCTimeMatch
  2.5.13.27 generalizedTimeMatch
  2.5.13.28 generalizedTimeOrderingMatch
].freeze
OID_TYPE_MAP =

LDAPv3 Syntaxes

{
  '1.3.6.1.1.16.1'                =>  'String',     # UUID
  '1.3.6.1.4.1.1466.115.121.1.1'  =>  'String',     # ACI Item
  '1.3.6.1.4.1.1466.115.121.1.2'  =>  'String',     # Access Point
  '1.3.6.1.4.1.1466.115.121.1.3'  =>  'String',     # Attribute Type Description
  '1.3.6.1.4.1.1466.115.121.1.4'  =>  'Binary',     # Audio
  '1.3.6.1.4.1.1466.115.121.1.5'  =>  'Binary',     # Binary
  '1.3.6.1.4.1.1466.115.121.1.6'  =>  'String',     # Bit String
  '1.3.6.1.4.1.1466.115.121.1.7'  =>  'Bool',       # Boolean
  '1.3.6.1.4.1.1466.115.121.1.8'  =>  'String',     # Certificate
  '1.3.6.1.4.1.1466.115.121.1.9'  =>  'String',     # Certificate List
  '1.3.6.1.4.1.1466.115.121.1.10' =>  'String',     # Certificate Pair
  '1.3.6.1.4.1.1466.115.121.1.11' =>  'String',     # Country String - IA5 ISO-646 (ASCII). Limited to exactly two characters describing the ISO 3166 country code.
  '1.3.6.1.4.1.1466.115.121.1.12' =>  'String',     # DN
  '1.3.6.1.4.1.1466.115.121.1.13' =>  'String',     # Data Quality Syntax
  '1.3.6.1.4.1.1466.115.121.1.14' =>  'String',     # Delivery Method
  '1.3.6.1.4.1.1466.115.121.1.15' =>  'String',     # Directory String
  '1.3.6.1.4.1.1466.115.121.1.19' =>  'String',     # DSA Quality Syntax
  '1.3.6.1.4.1.1466.115.121.1.20' =>  'String',     # DSE Type
  '1.3.6.1.4.1.1466.115.121.1.21' =>  'String',     # Enhanced Guide
  '1.3.6.1.4.1.1466.115.121.1.22' =>  'String',     # Facsimile Telephone Number
  '1.3.6.1.4.1.1466.115.121.1.23' =>  'String',     # Fax
  '1.3.6.1.4.1.1466.115.121.1.24' =>  'Time',       # Generalized Time
  '1.3.6.1.4.1.1466.115.121.1.25' =>  'String',     # Guide
  '1.3.6.1.4.1.1466.115.121.1.26' =>  'String',     # IA5String - IA5 ISO-646 (ASCII).
  '1.3.6.1.4.1.1466.115.121.1.27' =>  'Integer',    # INTEGER - IntegerMatch / integerOrderingMatch
  '1.3.6.1.4.1.1466.115.121.1.28' =>  'Binary',     # JPEG - RFC2798: Joint Photographic Experts Group (JPEG) image syntax from inetOrgPerson object class schema.
  '1.3.6.1.4.1.1466.115.121.1.32' =>  'String',     # Mail Preference
  '1.3.6.1.4.1.1466.115.121.1.34' =>  'String',     # Name And Optional UID
  '1.3.6.1.4.1.1466.115.121.1.35' =>  'String',     # Name Form Description
  '1.3.6.1.4.1.1466.115.121.1.36' =>  'Integer',    # Numeric String - IA5 ISO-646 (ASCII).
  '1.3.6.1.4.1.1466.115.121.1.37' =>  'String',     # Object Class Description
  '1.3.6.1.4.1.1466.115.121.1.38' =>  'String',     # OID
  '1.3.6.1.4.1.1466.115.121.1.39' =>  'String',     # Other Mailbox
  '1.3.6.1.4.1.1466.115.121.1.40' =>  'String',     # Octet String - Treated as transparent 8-bit bytes. (passwords)
  '1.3.6.1.4.1.1466.115.121.1.41' =>  'String',     # Postal Address - UTF-8 ISO-10646 (Unicode). Split by dollar sign "$".
  '1.3.6.1.4.1.1466.115.121.1.42' =>  'String',     # Protocol Information
  '1.3.6.1.4.1.1466.115.121.1.43' =>  'String',     # Presentation Address
  '1.3.6.1.4.1.1466.115.121.1.44' =>  'String',     # Printable String
  '1.3.6.1.4.1.1466.115.121.1.50' =>  'String',     # Telephone Number
  '1.3.6.1.4.1.1466.115.121.1.51' =>  'String',     # Teletex Terminal Identifier
  '1.3.6.1.4.1.1466.115.121.1.52' =>  'String',     # Telex Number
  '1.3.6.1.4.1.1466.115.121.1.53' =>  'Time',       # UTC Time
  '1.3.6.1.4.1.1466.115.121.1.54' =>  'String',     # LDAP Syntax Description
  '1.3.6.1.4.1.1466.115.121.1.56' =>  'String',     # LDAP Schema Definition
  '1.3.6.1.4.1.1466.115.121.1.57' =>  'String',     # LDAP Schema Description

  # Microsoft Active Directory
  #
  # @see https://ldapwiki.com/wiki/Microsoft%20Active%20Directory%20Syntax
  # @see https://docs.microsoft.com/en-gb/windows/desktop/ADSchema/attributes-all
  # @see https://docs.microsoft.com/en-us/windows/desktop/ADSI/data-type-mapping-between-active-directory-and-ldap
  #
  '1.2.840.113556.1.2.19'         =>  'Time',       # uSNCreated
  '1.2.840.113556.1.2.120'        =>  'Time',       # uSNChanged

  '1.2.840.113556.1.4.49'         =>  'Time',       # badPasswordTime
  '1.2.840.113556.1.4.52'         =>  'Time',       # lastLogon
  '1.2.840.113556.1.4.53'         =>  'Time',       # lastSetTime
  '1.2.840.113556.1.4.60'         =>  'Time',       # lockoutDuration
  '1.2.840.113556.1.4.74'         =>  'Time',       # maxPwdAge
  '1.2.840.113556.1.4.76'         =>  'Integer',    # maxStorage
  '1.2.840.113556.1.4.78'         =>  'Time',       # minPwdAge
  '1.2.840.113556.1.4.96'         =>  'Time',       # pwdLastSet
  '1.2.840.113556.1.4.159'        =>  'Time',       # accountExpires
  '1.2.840.113556.1.4.371'        =>  'Integer',    # rIDAllocationPool
  '1.2.840.113556.1.4.662'        =>  'Time',       # lockoutTime
  '1.2.840.113556.1.4.903'        =>  'String',     # DNWithOctetString
  '1.2.840.113556.1.4.904'        =>  'String',     # DNWithString
  '1.2.840.113556.1.4.905'        =>  'String',     # Telex
  '1.2.840.113556.1.4.906'        =>  'Integer',    # INTEGER8
  '1.2.840.113556.1.4.907'        =>  'String',     # ObjectSecurityDescriptor
  '1.2.840.113556.1.4.1221'       =>  'String',     # CaseIgnoreString' / ORName
  '1.2.840.113556.1.4.1362'       =>  'String',     # CaseExactString
  '1.2.840.113556.1.4.1696'       =>  'Time'        # lastLogonTimeStamp
}.freeze
LDAPURI_REGEX =

Matches an ldap(s) url

Returns:

  • (Regexp)
Regexp.union(
  ::URI::DEFAULT_PARSER.make_regexp('ldap'),
  ::URI::DEFAULT_PARSER.make_regexp('ldaps')
).freeze
DN_REGEX =

Any word character or hyphen, equals

Returns:

  • (Regexp)
/(([-\w]+=[-\w]+)*,?)/.freeze
FILTER_REGEX =

Something in parentheses

Returns:

  • (Regexp)
/^\s*\(.*\)\s*$/.freeze
NEW_LINE =

Returns:

  • (String)
"\n"
WILDCARD =

Returns:

  • (String)
'*'
PERCENT_SPACE =

Returns:

  • (String)
'%20'
SPACE =

Returns:

  • (String)
' '
OP_ATTRS =

Returns:

  • (Array<String>)
%w[+].freeze
ALL_ATTRS =

Returns:

  • (Array<String>)
[WILDCARD, *OP_ATTRS].freeze
DEFAULT_PK =

Returns:

  • (String)
'entrydn'
TIMESTAMPS =

Examples:

Schema
use :timestamps,
  attributes: i(create_timestamp modify_timestamp),
  type: ROM::LDAP::Types::Time

Returns:

  • (Array<String>)

See Also:

%w[createTimestamp modifyTimestamp].freeze
DEFAULT_FILTER =

Returns:

  • (String)
'(objectClass=*)'
TEN_MILLION =

Time conversion

Returns:

  • (Integer)

See Also:

10_000_000
SINCE_1601 =

Returns:

  • (Integer)

See Also:

11_644_473_600
CONSTRUCTORS =

Internal abstraction of LDAP string search filter constructors.

Returns:

  • (Hash)

See Also:

{
  con_and: '&',   # AND / AMPERSAND   / %x26
  con_or:  '|',   # OR  / VERTBAR     / %x7C
  con_not: '!'    # NOT / EXCLAMATION / %x21
}.freeze
CONSTRUCTOR_REGEX =
Regexp.union(/\s*\|\s*/, /\s*\&\s*/).freeze
OPERATORS =

Internal abstraction of LDAP string search filter operators.

{
  op_bineq: '=', # Binary comparison
  op_eql: '=',    # Equal to
  op_prx: '~=',   # Approximately equal to
  op_gte: '>=',   # Lexicographically greater than or equal to
  op_lte: '<=',   # Lexicographically less than or equal to
  op_ext: ':='    # Bitwise comparison of numeric values
}.freeze
OPERATOR_REGEX =
Regexp.union(*OPERATORS.values).freeze
ABSTRACTS =

Returns:

  • (Array)
[*OPERATORS.keys, *CONSTRUCTORS.keys].freeze
VALUES_MAP =

Symbolic abstraction of LDIF booleans and wildcard matcher

Returns:

  • (Hash)
{
  :wildcard => WILDCARD, #  ANY / ASTERISK / %x2A
  true      => 'TRUE',
  false     => 'FALSE'
}.freeze
ESCAPES =

DSL dataset methods

Returns:

  • (Hash)

See Also:

  • value encoding rule.
{
  "\0" => '00',   #   NUL      / %x00
  '*'  => '2A',   #   ASTERISK / %x2A
  '('  => '28',   #   LPARENS  / %x28
  ')'  => '29',   #   RPARENS  / %x29
  '\\' => '5C'    #   ESC      / %x5C
}.freeze
EXTENSIBLE_REGEX =

Expression Encoder (1)type (2)dn (4)rule

<attribute name>:<matching rule OID>:=<value> (&(objectCategory=group)(groupType:1.2.840.113556.1.4.803:=2147483648))

Returns:

  • (Regexp)
/^([-;\w]*)(:dn)?(:(\w+|[.\w]+))?$/.freeze
UNESCAPE_REGEX =

ESC and HEX values

The value encoding rule ensures that the entire filter string is a valid UTF-8 string and provides that the octets that represent theses ESCAPES are represented as a backslash followed by the two hexadecimal digits representing the value of the encoded octet.

/\\([a-f\d]{2})/i.freeze
ESCAPE_REGEX =

Returns:

  • (Regexp)
Regexp.new('[' + ESCAPES.keys.map { |e| Regexp.escape(e) }.join + ']').freeze
VAL_REGEX =

Returns:

  • (Regexp)
%r"(?:[-\[\]{}\w*.+/:@=,#\$%&!'^~\s\xC3\x80-\xCA\xAF]|[^\x00-\x7F]|\x5C(?:[\x20-\x23]|[\x2B\x2C]|[\x3B-\x3E]|\x5C)|\\[a-fA-F\d]{2})+"u.freeze
BIN_FILE_REGEX =

Local file path

Returns:

  • (Regexp)
%r{^file://(.*)}.freeze
LDIF_LINE_REGEX =

$1 = attribute $3 = value

/^([^:]+):([\:]?)[\s]*<?(.*)$/.freeze
DEFAULT_FORMATTER =

Proc that returns input value.

->(v) { v }
RESPONSES_PATH =

Loaded by PDU

Pathname(__dir__).join('../../../config/responses.yml').realpath.freeze
RESPONSES =
::YAML.load_file(RESPONSES_PATH).freeze
MessageQueue =
Hash.new { |hash, key| hash[key] = [] }

Class Method Summary collapse

Class Method Details

.formatterObject

Examples:

ROM::LDAP.load_extensions :compatibility

See Also:

  • 'rom/ldap/extensions/compatibility'


22
23
24
# File 'lib/rom/ldap/formatter.rb', line 22

def self.formatter
  @formatter || DEFAULT_FORMATTER
end

.LDIF(ldif, &block) ⇒ Object

Parser for LDIF format rubocop:disable Naming/MethodName

alias for LDIF.to_tuples



69
70
71
# File 'lib/rom/ldap/ldif.rb', line 69

def LDIF(ldif, &block)
  LDIF.to_tuples(ldif, &block)
end

.use_formatter(func = nil) ⇒ Object

Set/Reset the formatting proc

Parameters:

  • func (Proc) (defaults to: nil)

    Callable object



13
14
15
# File 'lib/rom/ldap/formatter.rb', line 13

def self.use_formatter(func = nil)
  @formatter = func
end