4

Have anyone tried NTLM authentication implemented in Karate framework which i could refer? I get 401 authorization issue while I try building a test and pass header argument.

@BeforeClass
public static void before() {
    System.setProperty("http.auth.ntlm.domain", "***");
    System.setProperty("jcifs.smb.client.domain", "***");
    System.setProperty("jcifs.smb.client.username", "***");
    System.setProperty("jcifs.smb.client.password", "***");
    System.setProperty("java.protocol.handler.pkgs", "jcifs");
}
Sanu
  • 55
  • 3

1 Answers1

-1

Unfortunately NTLM support is not yet implemented in Karate. There is an open feature request: https://github.com/intuit/karate/issues/372 We'll need you or someone to contribute this from the open-source community.

Meanwhile you should be able to work-around this by using a Java library or custom Java code that does the necessary authentication. Refer to the Java inter-op section of the Karate documentation: https://github.com/intuit/karate#calling-java

EDIT: also see https://stackoverflow.com/a/51150286/143475

EDIT - you can use curl ! https://stackoverflow.com/a/64352676/143475

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248