Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
Login Authentication
Description
JCIFS is in maintenance mode and does not support NTML2/3. Action items:
1) Create new security authentication called SecurityAuthenticationNTLM2
2) Propose using SMBj which support 2 and partial 3
Proposed code for new security authentication:
import com.hierynomus.smbj.SMBClient;
import com.hierynomus.smbj.auth.AuthenticationContext;
import com.hierynomus.smbj.connection.Connection;
import com.hierynomus.smbj.session.Session;
public class SecurityAuthenticationNTLM2 implements SecurityAuthentication {
@Override
public boolean validateUser(String username, String password,
Hashtable params) throws Exception {
SMBClient client = new SMBClient();
try (
Connection connection = client.connect((String) params.get("domain_controller"))) {
AuthenticationContext ac = new AuthenticationContext(username, password.toCharArray(), (String) params.get("domain"));
Session session = connection.authenticate(ac);
session.getConnection();
session.close();
return true;
} catch(Exception se ) {
// NETWORK PROBLEMS?
throw new Exception (se.getMessage());
}
1) Create new security authentication called SecurityAuthenticationNTLM2
2) Propose using SMBj which support 2 and partial 3
Proposed code for new security authentication:
import com.hierynomus.smbj.SMBClient;
import com.hierynomus.smbj.auth.AuthenticationContext;
import com.hierynomus.smbj.connection.Connection;
import com.hierynomus.smbj.session.Session;
public class SecurityAuthenticationNTLM2 implements SecurityAuthentication {
@Override
public boolean validateUser(String username, String password,
Hashtable params) throws Exception {
SMBClient client = new SMBClient();
try (
Connection connection = client.connect((String) params.get("domain_controller"))) {
AuthenticationContext ac = new AuthenticationContext(username, password.toCharArray(), (String) params.get("domain"));
Session session = connection.authenticate(ac);
session.getConnection();
session.close();
return true;
} catch(Exception se ) {
// NETWORK PROBLEMS?
throw new Exception (se.getMessage());
}
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Fix Version/s | 1.7.12 [ 10901 ] |
Sprint | v1712.1 [ 26 ] |
i2b2 Feature/s | Login Authentication [ 10087 ] |
Assignee | Mike Mendis [ mem61 ] | |
Status | New [ 10000 ] | Open [ 1 ] |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Resolved [ 5 ] |
Assignee | Mike Mendis [ mem61 ] | Reeta Metta [ rm302 ] |
Status | Resolved [ 5 ] | Closed [ 6 ] |