Github user sohami commented on a diff in the pull request: https://github.com/apache/drill/pull/997#discussion_r145319769 --- Diff: contrib/native/client/src/clientlib/drillClientImpl.cpp --- @@ -518,6 +518,22 @@ bool DrillClientImpl::clientNeedsEncryption(const DrillUserProperties* userPrope return needsEncryption; } +/* + * Checks if the client has explicitly expressed interest in authenticated connections only. + * If the USERPROP_PASSWORD or USERPROP_AUTH_MECHANISM connection string properties are set, + * then it is implied that the client wants authentication. + */ +bool DrillClientImpl::clientNeedsAuthentication(const DrillUserProperties* userProperties) { + bool needsAuthentication = false; + if(!userProperties) { + return false; + } + needsAuthentication = userProperties->isPropSet(USERPROP_PASSWORD) || + userProperties->isPropSet(USERPROP_AUTH_MECHANISM); --- End diff -- I think we should also check if the `password & auth parameter` value is not empty string.
---