Commit Graph

552 Commits

Author SHA1 Message Date
Patrick Mooney 9303d4f624 Prepare for 1.0.0 release 2015-10-22 20:58:19 -05:00
Patrick Mooney 69eb6d9038 More docs clean-up 2015-10-16 00:33:46 -05:00
Patrick Mooney 622b7486f7 First steps toward updating the docs 2015-10-16 00:25:49 -05:00
Patrick Mooney 9ec1e9022d Update package dependencies 2015-10-15 22:00:04 -05:00
Patrick Mooney c10a1a6faf Clean up client handling of end/error for searches 2015-10-15 21:49:34 -05:00
Patrick Mooney acc1ca8f43 Match objectClass case-insensitively in EqualityFilter
Fix mcavage/node-ldapjs#277
2015-06-29 20:20:06 -05:00
Patrick Mooney 000959d888 Remove node 0.8 testing from travis config
Node.js 0.8 is still supported but istanbul and friends now have
dependencies that balk.  The tests can still be run manually.
2015-06-14 21:22:24 -05:00
Patrick Mooney 64ad0bf5da Update package dependencies 2015-06-14 21:22:10 -05:00
Patrick Mooney fbdf70e424 Add license to package.json 2015-06-14 20:57:58 -05:00
Patrick Mooney 1376e593a6 Remove special attribute formatting for objectGUID
- Conclude mcavage/node-ldapjs#218
- Clean up exports in index.js
2015-06-14 20:57:47 -05:00
Patrick Mooney 3ca7e6d98f Allow startTLS during client setup 2015-05-24 19:56:16 -05:00
Patrick Mooney 821569c2c4 Implement client-side StartTLS support 2015-05-13 22:26:42 -05:00
Patrick Mooney ec062d370c Improve empty DN handling
- Use more strict comparisons for client input asserts
- Fix baseObject comparison in SearchRequest initialization
- Alter default error for server route fallthrough
2015-04-25 20:53:50 -05:00
Matt Simerson 19f2c16783 Allow simple client bind with empty credentials
Fix mcavage/node-ldapjs#254
2015-04-13 23:40:58 -05:00
Patrick Mooney 773a1c6fd2 Remove String.prototype modifications
Fix mcavage/node-ldapjs#257
2015-03-18 15:14:53 -05:00
Patrick Mooney 91f523af87 Update Travis config to test node 0.12 2015-02-18 11:11:14 -06:00
Patrick Mooney cab9f0bf45 Fix package.json for node 0.8 compatibility 2015-02-18 11:07:58 -06:00
Patrick Mooney b71c001ec6 Update dependencies for node compatibility 2015-02-18 09:30:13 -06:00
Patrick Mooney ffe5a16604 Add missing dtrace probes for abandon events 2015-02-18 09:17:23 -06:00
Patrick Mooney 495ea2afce Overhaul DN parsing and formatting
Certain applications depend upon DN string formatting in a manner more
strict than specified in the RFC.  To enable format transcription and
reproduction, some changes were made to how DNs are converted to/from
strings.

- Store RDN strings raw instead of escaped
- Record formatting details during DN/RDN parsing
- Add DN.format method to control format recreation
- Remove DN.spaced method in favor of DN.setFormat

Fix mcavage/node-ldapjs#176
2015-02-17 15:35:06 -06:00
Patrick Mooney 22b04f3a94 Move filter parsing into separate module 2014-10-16 17:00:14 -05:00
Patrick Mooney 9b8244e568 Fix style error in ldapjs-search util 2014-10-16 16:14:28 -05:00
Kyle P Davis 6f58387688 Ignore EPIPE errors in ldapjs-search
Fix mcavage/node-ldapjs#225
2014-10-02 10:07:15 -05:00
Patrick Mooney 5683bf036e Disable strictDN on cli utilities 2014-09-30 19:00:35 -05:00
Patrick Mooney 408e7c9f99 Support invalid DNs in client/server
Some LDAP implementations (mainly AD and Outlook) accept and/or output
DNs that are not valid.  To support interaction with these invalid DNs a
strictDN flag (default: true) has been added to the client and server
constructors.  Setting this flag to false will allow use of
non-conforming DNs.

When disabling strictDN in the ldapjs client, strings which wouldn't
parse into a DN can then be passed to the ldap operation methods.  It
also means that some methods (such as search) may return results with
string-formatted DNs instead of DN objects.

When disabling strictDN in the ldapjs server, incoming requests that
contain invalid DNs will be routed to the default ('') handler for that
operation type.  It is your responsiblity to differentiate between
string-type and object-type DNs in those handlers.

Fix mcavage/node-ldapjs#222
Fix mcavage/node-ldapjs#146
Fix mcavage/node-ldapjs#113
Fix mcavage/node-ldapjs#104
2014-09-30 18:39:19 -05:00
Patrick Mooney 58f58883cd Add formatting option to ldapjs-search
- Update dashdash version to 1.7.0
- Support line delimited JSON and JSON arrays as alternative output
  formats in ldapjs-search.

Fix mcavage/node-ldapjs#224
2014-09-25 10:01:21 -05:00
Patrick Mooney 92362e01f3 Improve parser error handling
- Wrap parser errors with VError
- Catch initial potential sequence errors
- Improve parser test coverage
- Emit parser errors instead of implicitly logging

Fix mcavage/node-ldapjs#221
2014-09-16 15:23:21 -05:00
Patrick Mooney 9ec6184ef5 Fix socket error handling during client unbind
The client now blackholes any socket errors after sending an unbind.
This prevents servers which issue RST from causing unecessary errors for
what was a succesful operation.

Fix mcavage/node-ldapjs#217
2014-08-21 02:01:30 -05:00
Patrick Mooney b70bdaa26b Cleanup lint/cruft 2014-07-29 10:21:57 -05:00
Patrick Mooney b94a66916e Process entries sequentially in ldapjs-add
This more closely mimics the behavior of ldapadd when it processes LDIF
entries in the order they are listed in the file.
2014-07-29 10:09:03 -05:00
Patrick Mooney de16802a16 Fix SearchPager bugs, improve test coverage 2014-07-25 14:16:31 -05:00
Patrick Mooney 8fd16ee255 Add resultError event to client
Detecting certain types of errors in encountered during any operation
(such as BusyError or UnavailableError) can be useful for making
client-wide decisions.
2014-07-25 13:35:15 -05:00
Patrick Mooney 0133e65865 Update CHANGES.md 2014-07-25 13:23:12 -05:00
Patrick Mooney b555463a90 Minor cleanup in SearchPager 2014-07-25 13:21:02 -05:00
Patrick Mooney d665378c0e Improve client paged search handling
Search response objects now include more instrumentation and control when
automatically fetching paged results.  See the SearchPager documentation
for more details.

Fix mcavage/node-ldapjs#203
2014-07-24 15:41:24 -05:00
Patrick Mooney 37ce094fc4 Add node.js 0.11 to Travis tests 2014-07-18 10:43:45 -05:00
Patrick Mooney abdd4890e5 Move client.connect into public API
In cases where a reconnect-enabled client has been manually disconnected
via unbind, it may be desirable to initiate a reconnect without
incurring other client actions.
2014-07-18 10:29:46 -05:00
Patrick Mooney 59bebe537b Make Attribute detection more strict
The old Attribute.isAttribute would allow objects lacking the toBer
method to be attached to Change objects.  This would result in errors
during serialization.

With the stricter Attribute detection, it's necessary to convert
Attribute-like objects containing type (string) and vals (array)
properties into real Attribute objects.  This precise detection is
necessary to avoid falling back to the object-keys-into-attributes

That other logic which will turn a well structured Attribute-like object
such as this:

  { type: 'valid', vals: ['something'] }

... and turn it into something broken like this:

  [
    { type: 'type', vals: ['valid'] },
    { type: 'vals', vals: ['something'] }
  ]
2014-07-17 13:33:02 -05:00
Patrick Mooney 48bd7bfe82 Fix message parsing for length-sensitive types
Certain LDAP messages (such as DeleteRequest) encode their contents as
raw bytes within the top-level sequence object.  As such, they rely
their length being passed to them when LDAPMessage decodes the sequence.

This was being done incorrectly, but would not manifest itself as a
problem unless controls followed the message.  If no controls were
present, then length of the sequence item was bounded by the message
itself and the parse would succeed.

Fix mcavage/node-ldapjs#212
2014-07-16 18:53:06 -05:00
Patrick Mooney 888d34ab7c Simplify and fix Change.apply tests for replace 2014-07-16 15:03:15 -05:00
Patrick Mooney a80cedd870 Add Change.apply method for object modification 2014-07-16 14:53:13 -05:00
Patrick Mooney 26e427f4a0 Update bunyan to 0.23.1 2014-07-14 16:07:22 -05:00
Patrick Mooney dd63fea6f7 Preserve raw Buffer value in Control objects
Fix mcavage/node-ldapjs#143
2014-07-14 14:47:56 -05:00
Patrick Mooney e30a5dab33 Fix scope option parsing in ldapjs-search util 2014-07-10 09:58:25 -05:00
Patrick Mooney 2939fa1fad Improve client request state tracking
- Handle abandoned requests properly
- Re-enable client abandon test
- Report client idleness correctly (even after abandons)

Fix mcavage/node-ldapjs#211
2014-07-09 13:40:17 -05:00
Patrick Mooney 6607d83b86 Add automatic bind support to client
The pooled client would automatically bind when initializing connections
if bindDN and bindCredentials were passed to during construction.
This convenience should be supported in the plain client too.
2014-07-08 21:44:01 -05:00
Patrick Mooney 643999f370 Update CHANGES.md 2014-07-08 15:53:20 -05:00
Patrick Mooney 7dabc16e47 Disable client abandon test
Abandon handling is not within spec in the ldapjs server and not
particularly robust in the client.  This test should be re-enabled when
both issues are fixed.
2014-07-08 15:29:05 -05:00
Patrick Mooney 3186f5eca1 Convert tests to use tape/istanbul/faucet 2014-07-08 15:09:26 -05:00
Patrick Mooney ee83d0e3ee Cleanup README formatting 2014-07-06 11:59:08 -05:00