mongodb block: Support different credentials