Custom Authentication Module fails

Hi,

I've created this custom authentication module, deploy it in /opt/Progress/DataDirect/Hybrid_Data_Pipeline/Hybrid_Server/ddcloud/keystore/plugins, then created a user using this module but it's impossible to log-in, neither to see its classloading .

 

  1. import com.ddtek.cloudservice.plugins.auth.javaplugin.JavaAuthPluginException;
  2. import com.ddtek.cloudservice.plugins.auth.javaplugin.JavaAuthPluginInterface;
  3.  
  4. import java.util.HashMap;
  5. import java.util.logging.Logger;
  6.  
  7. public class BpsisAuthModule implements JavaAuthPluginInterface {
  8. static {
  9. Thread.dumpStack();
  10. new Throwable().printStackTrace();
  11. }
  12.  
  13. Logger logger;
  14.  
  15. public boolean authenticate(String username, String password, String ipAddress) throws JavaAuthPluginException {
  16. final String x = "BPSIS Auth: " + username + "," + password + "," + ipAddress;
  17. if (logger != null) {
  18. logger.info("BPSI-Auth: " + x);
  19. } else {
  20. System.err.println(x);
  21. }
  22. return true;
  23. }
  24.  
  25. public void destroy() {
  26. }
  27.  
  28. public void init(HashMap<String, Object> hashMap, Logger logger) {
  29. this.logger = logger;
  30. }
  31. }

 

in the logs I only see  [main] [system].[initialize environment] ServiceClassLoader[added=auth-bpsis.jar] but no stack traces...


  • here are the logs:

     

    1. catalina.out:19-04-2021 19:44:29,392 INFO OnPremiseLoginModule:? Started validating user credentials for: stephane2
    2. catalina.out:19-Apr-2021 19:44:29.403 WARNING [http-nio-18080-exec-7] org.apache.catalina.realm.JAASRealm.authenticate Login exception authenticating username [stephane2]
    3. catalina.out:19-04-2021 19:46:47,170 INFO OnPremiseLoginModule:? Started validating user credentials for: stephane2
    4. catalina.out:19-Apr-2021 19:46:47.176 WARNING [http-nio-18080-exec-1] org.apache.catalina.realm.JAASRealm.authenticate Login exception authenticating username [stephane2]
    5. catalina.2021-04-19.log:19-Apr-2021 19:44:29.403 WARNING [http-nio-18080-exec-7] org.apache.catalina.realm.JAASRealm.authenticate Login exception authenticating username [stephane2]
    6. catalina.2021-04-19.log:19-Apr-2021 19:46:47.176 WARNING [http-nio-18080-exec-1] org.apache.catalina.realm.JAASRealm.authenticate Login exception authenticating username [stephane2]
    7. das/[system].2021-04-19.log:19-Apr-2021 19:44:29.397 CONFIG [http-nio-18080-exec-3] [system].[auth] [success=false][ms=2][credentials=stephane2:<password>][hostInfo=<no host info>][deviceName=<no device name>][deviceDescription=<no device
    8. description>][ipAddr=127.0.0.1][authorizationTokenIn=<null>][authUser=null][operation=post]
    9. das/[system].2021-04-19.log:19-Apr-2021 19:46:47.175 CONFIG [http-nio-18080-exec-8] [system].[auth] [success=false][ms=3][credentials=stephane2:<password>][hostInfo=<no host info>][deviceName=<no device name>][deviceDescription=<no device
    10. description>][ipAddr=127.0.0.1][authorizationTokenIn=<null>][authUser=null][operation=post]
    11. webui/hdpui/hdpui.log:19-04-2021 19:44:29,392 INFO OnPremiseLoginModule:? Started validating user credentials for: stephane2
    12. webui/hdpui/hdpui.log:19-04-2021 19:46:47,170 INFO OnPremiseLoginModule:? Started validating user credentials for: stephane2
    13.  

     

  • When I look at the user from Tenant, the authentication module is not displayed properly:

     

    Service Id: 33

     

    Capture du 2021-04-20 09-15-23