yoy.be "Why-o-Why"

TMongoWire can now authenticate over SCRAM-SHA-1

2015-07-09 00:51  mongoAuth3  delphi  [permalink]


You can now use TMongoWire on mongoDB version 3.0 or newer and authenticate over SASL with SCRAM-SHA-1. This harder form of encryption offers a strong protection of your credentials and prevents against 'man in the middle' attacks. (But does not encrypt the data over the wire, it's advised to use TLS for that.) I did not find a ready-made SASL library for Delphi, so made the required encryption tools myself. I have added this support for HMAC and PBKDF2 to md5.zip.

To authenticate, call MongoWireAuthenticate from the new unit mongoAuth3.pas on a connected TMongoWire instance. (For backwards compatibility, mongoAuth.pas remains available.)