IBM Support

Authentication Error 18 when running Guardium grdapi load_mongodb

Question & Answer


Question

Authentication Error 18 when running Guardium grdapi load_mongodb

Cause

grdapi load_mongodb command is used to load data files into mongodb from Guardium for "mongodb as a sniffer repository" functionality.
When running the grdapi an error appears in the Guardium Job Queue report and jobqueue.log file (available in app_issues must gather)

Answer

Example:

Error while loading mongoDB file.
com.mongodb.MongoTimeoutException:Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=<ip>:xxxxx, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSecurityException: Exception authenticating}, caused by {com.mongodb.MongoCommandException: Command failed with error 18: 'auth failed' on server <ip>:xxxxx. The full response is { "ok" : 0.0, "errmsg" : "auth failed", "code" : 18,"codeName" : "AuthenticationFailed" }}}] ERROR'

The authentication details provided in the grdapi are correct and can be verified from another mongodb client. Guardium v10.1.2 uses MONGODB-CR authentication method. Later versions of Mongodb use SCRAM-SHA-1 by default. The incorrect authentication method creates this error.

Remediation
There is no product fix for this.

Workaround - Change the mongodb settings to accept connections using MONGODB-CR method.

[{"Product":{"code":"SSMPHH","label":"IBM Security Guardium"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"10.0;10.0.1;10.1;10.1.2;10.1.3;10.1.4;10.5","Edition":"","Line of Business":{"code":"LOB24","label":"Security Software"}}]

Document Information

Modified date:
21 June 2018

UID

swg22017465