When we try to authenticate any user against AEWS, it just goes in a loop of authentication prompt using browser (401 error)
AEWS in debug mode shows below exceptions in the log:
2024-03-07 07:22:20,491 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.security.AEEiamLoginModule(155) - AEEiamLoginModule - initialize start
2024-03-07 07:22:20,498 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.security.AEEiamLoginModule(470) - AEEiamLoginModule - checkOptions start
2024-03-07 07:22:20,498 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.security.AEEiamLoginModule(477) - AEEiamLoginModule - checkOptions end
2024-03-07 07:22:20,498 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.security.AEEiamLoginModule(178) - AEEiamLoginModule - initialize end
2024-03-07 07:22:20,498 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.security.AEEiamLoginModule(182) - AEEiamLoginModule - login start
2024-03-07 07:22:20,498 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.security.AEEiamLoginModule(534) - AEEiamLoginModule - retry
2024-03-07 07:22:20,498 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.security.AEEiamLoginModule(481) - AEEiamLoginModule - getCredentials start
2024-03-07 07:22:20,499 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.security.AEEiamLoginModule(524) - AEEiamLoginModule - getCredentials end
2024-03-07 07:22:20,499 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.security.AEEiamLoginModule(409) - AEEiamLoginModule - authenticateWithPassword start
2024-03-07 07:22:20,499 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.security.AEEiamLoginModule(231) - AEEiamLoginModule - getSafeContextFacade
2024-03-07 07:22:20,499 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.security.AEEiamLoginModule(239) - AEEiamLoginModule - getSafeContextUsingSCF start
2024-03-07 07:22:20,499 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.security.AEEiamLoginModule(553) - AEEiamLoginModule - getEEMServer start
2024-03-07 07:22:20,504 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.dbaccess.dao.AEQuerySQL(147) - (26540504) Generate query string...
2024-03-07 07:22:20,504 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.dbaccess.dao.AEQuerySQL(209) - (26540504) Generated where clause: WHERE u.id.type = 'u'
2024-03-07 07:22:20,505 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.dbaccess.dao.AEQuerySQL(231) - (26540504) Generated order by clause:
2024-03-07 07:22:20,505 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.dbaccess.dao.AEQuerySQL(168) - (26540504) Generated query: select NEW com.ca.waae.dbaccess.dao.KeyMasterDef(u.id.hostid, u.id.hostname, u.id.product, u.id.type, u.id.server, u.dakey, u.notUsed) FROM UjoKeymaster u WHERE u.id.type = 'u'
2024-03-07 07:22:20,505 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.dbaccess.dao.AEQuery(89) - (26540504) Execute Query
2024-03-07 07:22:20,508 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.dbaccess.config.DatabaseProperties(209) - setDbConf -> connection specification file to be set, file=/opt/CA/WorkloadAutomationAE/autosys/config/connection.properties
2024-03-07 07:22:20,511 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.dbaccess.config.DatabaseProperties(224) - connection specification file read, file=/opt/CA/WorkloadAutomationAE/autosys/config/connection.properties
2024-03-07 07:22:20,511 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.dbaccess.config.DatabaseProperties(242) - setDbConf -> connection specification file set, file=/opt/CA/WorkloadAutomationAE/autosys/config/connection.properties
2024-03-07 07:22:20,514 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.dbaccess.config.DatabaseProperties(299) - found provider: SYB
2024-03-07 07:22:20,515 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.dbaccess.config.DatabaseProperties(173) - Done initializing EventServer_1
2024-03-07 07:22:20,519 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.dbaccess.dao.AEConnMgr(470) - Create connections
2024-03-07 07:22:20,523 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.dbaccess.dao.AEConnection(98) - Create connection for: EventServer_1
2024-03-07 07:22:20,524 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.dbaccess.config.DatabaseProperties(507) - driver class name found, driver class name=com.sybase.jdbc4.jdbc.SybDriver
2024-03-07 07:22:20,525 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.dbaccess.config.DatabaseProperties(467) - jdbc url created, url=jdbc:sybase:Tds:SybaseDBHostName.Company.com:9741/autosys123
2024-03-07 07:22:20,526 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.dbaccess.dao.AEConnection(154) - JAAS authentication failed with exception: javax.security.auth.login.LoginException: No LoginModules configured for initiatenullNo LoginModules configured for initiate
2024-03-07 07:22:20,526 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.dbaccess.dao.AEConnection(129) - No LoginModules configured for initiate
2024-03-07 07:22:20,526 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.dbaccess.dao.AEConnMgr(475) - No LoginModules configured for initiate
2024-03-07 07:22:20,526 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.dbaccess.config.DatabaseProperties(209) - setDbConf -> connection specification file to be set, file=/opt/CA/WorkloadAutomationAE/autosys/config/connection.properties
2024-03-07 07:22:20,527 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.dbaccess.config.DatabaseProperties(224) - connection specification file read, file=/opt/CA/WorkloadAutomationAE/autosys/config/connection.properties
2024-03-07 07:22:20,527 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.dbaccess.config.DatabaseProperties(242) - setDbConf -> connection specification file set, file=/opt/CA/WorkloadAutomationAE/autosys/config/connection.properties
2024-03-07 07:22:20,528 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.dbaccess.config.DatabaseProperties(299) - found provider: SYB
2024-03-07 07:22:20,529 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.dbaccess.config.DatabaseProperties(173) - Done initializing EventServer_1
2024-03-07 07:22:20,532 [https-jsse-nio-9443-exec-1] DEBUG com.ca.waae.security.AEEiamLoginModule(83) - AEEiamLoginModule - abort
2024-03-07 07:22:20,546 [IntCodeLoader] DEBUG com.ca.waae.dbaccess.dao.AEQuerySQL(147) - (26540546) Generate query string...
2024-03-07 07:22:20,546 [IntCodeLoader] DEBUG com.ca.waae.dbaccess.dao.AEQuerySQL(209) - (26540546) Generated where clause: WHERE c.id.code > 0
2024-03-07 07:22:20,547 [IntCodeLoader] DEBUG com.ca.waae.dbaccess.dao.AEQuerySQL(231) - (26540546) Generated order by clause: ORDER BY c.id.code ASC
2024-03-07 07:22:20,547 [IntCodeLoader] DEBUG com.ca.waae.dbaccess.dao.AEQuerySQL(168) - (26540546) Generated query: select NEW com.ca.waae.dbaccess.dao.IntCodeDefs(c.text, c.id.fld, c.id.code) FROM UjoIntcode c WHERE c.id.code > 0 ORDER BY c.id.code ASC
2024-03-07 07:22:20,547 [IntCodeLoader] DEBUG com.ca.waae.dbaccess.dao.AEQuery(89) - (26540546) Execute Query
2024-03-07 07:22:20,547 [MetaDataLoader] DEBUG com.ca.waae.dbaccess.dao.AEQuerySQL(147) - (26540547) Generate query string...
2024-03-07 07:22:20,547 [MetaDataLoader] DEBUG com.ca.waae.dbaccess.dao.AEQuerySQL(209) - (26540547) Generated where clause: WHERE p.dbTable != 'ujo_monbro'
2024-03-07 07:22:20,547 [MetaDataLoader] DEBUG com.ca.waae.dbaccess.dao.AEQuerySQL(231) - (26540547) Generated order by clause: ORDER BY p.id.metaId
2024-03-07 07:22:20,547 [MetaDataLoader] DEBUG com.ca.waae.dbaccess.dao.AEQuerySQL(168) - (26540547) Generated query: select DISTINCT NEW com.ca.waae.dbaccess.dao.MetaPropDef(p.id.metaId, p.jilName, p.dbTable, p.dbColumn, p.dbType) FROM UjoMetaProperty p WHERE p.dbTable != 'ujo_monbro' ORDER BY p.id.metaId
2024-03-07 07:22:20,547 [MetaDataLoader] DEBUG com.ca.waae.dbaccess.dao.AEQuery(89) - (26540547) Execute Query
..
..
INFO | jvm 1 | 2024/03/07 07:19:18 | 07-Mar-2024 07:19:18.702 INFO [WrapperStartStopAppMain] org.apache.catalina.startup.Catalina.start Server startup in [8041] milliseconds
INFO | jvm 1 | 2024/03/07 07:22:20 | 07-Mar-2024 07:22:20.532 WARNING [https-jsse-nio-9443-exec-1] org.apache.catalina.realm.JAASRealm.authenticate Login exception authenticating username [ejmadmin]
INFO | jvm 1 | 2024/03/07 07:22:20 | javax.security.auth.login.LoginException: java.lang.NullPointerException
INFO | jvm 1 | 2024/03/07 07:22:20 | at com.ca.waae.dbaccess.dao.AEConnMgr.waitMonitorStartup(AEConnMgr.java:117)
INFO | jvm 1 | 2024/03/07 07:22:20 | at com.ca.waae.dbaccess.dao.AEConnMgr.executeQuery(AEConnMgr.java:106)
INFO | jvm 1 | 2024/03/07 07:22:20 | at com.ca.waae.dbaccess.dao.AEQuery.execute(AEQuery.java:94)
INFO | jvm 1 | 2024/03/07 07:22:20 | at com.ca.waae.dbaccess.dao.AEQuerySQL.execute(AEQuerySQL.java:40)
INFO | jvm 1 | 2024/03/07 07:22:20 | at com.ca.waae.security.AEEiamLoginModule.getEEMServer(AEEiamLoginModule.java:561)
INFO | jvm 1 | 2024/03/07 07:22:20 | at com.ca.waae.security.AEEiamLoginModule.getSafeContextUsingSCF(AEEiamLoginModule.java:240)
INFO | jvm 1 | 2024/03/07 07:22:20 | at com.ca.waae.security.AEEiamLoginModule.getSafeContextFacade(AEEiamLoginModule.java:232)
INFO | jvm 1 | 2024/03/07 07:22:20 | at com.ca.waae.security.AEEiamLoginModule.authenticateWithPassword(AEEiamLoginModule.java:418)
INFO | jvm 1 | 2024/03/07 07:22:20 | at com.ca.waae.security.AEEiamLoginModule.login(AEEiamLoginModule.java:197)
INFO | jvm 1 | 2024/03/07 07:22:20 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO | jvm 1 | 2024/03/07 07:22:20 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
INFO | jvm 1 | 2024/03/07 07:22:20 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO | jvm 1 | 2024/03/07 07:22:20 | at java.lang.reflect.Method.invoke(Method.java:498)
INFO | jvm 1 | 2024/03/07 07:22:20 | at javax.security.auth.login.LoginContext.invoke(LoginContext.java:755)
INFO | jvm 1 | 2024/03/07 07:22:20 | at javax.security.auth.login.LoginContext.access$000(LoginContext.java:195)
INFO | jvm 1 | 2024/03/07 07:22:20 | at javax.security.auth.login.LoginContext$4.run(LoginContext.java:682)
INFO | jvm 1 | 2024/03/07 07:22:20 | at javax.security.auth.login.LoginContext$4.run(LoginContext.java:680)
INFO | jvm 1 | 2024/03/07 07:22:20 | at java.security.AccessController.doPrivileged(Native Method)
INFO | jvm 1 | 2024/03/07 07:22:20 | at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
INFO | jvm 1 | 2024/03/07 07:22:20 | at javax.security.auth.login.LoginContext.login(LoginContext.java:587)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:380)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:312)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.catalina.authenticator.BasicAuthenticator.doAuthenticate(BasicAuthenticator.java:96)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:562)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:673)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:926)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
INFO | jvm 1 | 2024/03/07 07:22:20 | at java.lang.Thread.run(Thread.java:750)
INFO | jvm 1 | 2024/03/07 07:22:20 |
INFO | jvm 1 | 2024/03/07 07:22:20 | at javax.security.auth.login.LoginContext.invoke(LoginContext.java:856)
INFO | jvm 1 | 2024/03/07 07:22:20 | at javax.security.auth.login.LoginContext.access$000(LoginContext.java:195)
INFO | jvm 1 | 2024/03/07 07:22:20 | at javax.security.auth.login.LoginContext$4.run(LoginContext.java:682)
INFO | jvm 1 | 2024/03/07 07:22:20 | at javax.security.auth.login.LoginContext$4.run(LoginContext.java:680)
INFO | jvm 1 | 2024/03/07 07:22:20 | at java.security.AccessController.doPrivileged(Native Method)
INFO | jvm 1 | 2024/03/07 07:22:20 | at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
INFO | jvm 1 | 2024/03/07 07:22:20 | at javax.security.auth.login.LoginContext.login(LoginContext.java:587)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:380)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:312)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.catalina.authenticator.BasicAuthenticator.doAuthenticate(BasicAuthenticator.java:96)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:562)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:673)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:926)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
INFO | jvm 1 | 2024/03/07 07:22:20 | at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
INFO | jvm 1 | 2024/03/07 07:22:20 | at java.lang.Thread.run(Thread.java:750)
INFO | jvm 1 | 2024/03/07 07:22:20 | Exception in thread "IntCodeLoader" java.lang.NullPointerException
INFO | jvm 1 | 2024/03/07 07:22:20 | at com.ca.waae.dbaccess.dao.AEConnMgr.waitMonitorStartup(AEConnMgr.java:117)
INFO | jvm 1 | 2024/03/07 07:22:20 | at com.ca.waae.dbaccess.dao.AEConnMgr.executeQuery(AEConnMgr.java:106)
INFO | jvm 1 | 2024/03/07 07:22:20 | at com.ca.waae.dbaccess.dao.AEQuery.execute(AEQuery.java:94)
INFO | jvm 1 | 2024/03/07 07:22:20 | at com.ca.waae.dbaccess.dao.AEQuerySQL.execute(AEQuerySQL.java:40)
INFO | jvm 1 | 2024/03/07 07:22:20 | at com.ca.waae.common.IntCodes.loadIntCodes(IntCodes.java:136)
INFO | jvm 1 | 2024/03/07 07:22:20 | at com.ca.waae.common.IntCodes.<init>(IntCodes.java:46)
INFO | jvm 1 | 2024/03/07 07:22:20 | at com.ca.waae.aehome.AEHomeInstance$IntCodeLoader.run(AEHomeInstance.java:168)
INFO | jvm 1 | 2024/03/07 07:22:20 | Exception in thread "MetaDataLoader" java.lang.NullPointerException
INFO | jvm 1 | 2024/03/07 07:22:20 | at com.ca.waae.dbaccess.dao.AEConnMgr.waitMonitorStartup(AEConnMgr.java:117)
INFO | jvm 1 | 2024/03/07 07:22:20 | at com.ca.waae.dbaccess.dao.AEConnMgr.executeQuery(AEConnMgr.java:106)
INFO | jvm 1 | 2024/03/07 07:22:20 | at com.ca.waae.dbaccess.dao.AEQuery.execute(AEQuery.java:94)
INFO | jvm 1 | 2024/03/07 07:22:20 | at com.ca.waae.dbaccess.dao.AEQuerySQL.execute(AEQuerySQL.java:40)
INFO | jvm 1 | 2024/03/07 07:22:20 | at com.ca.waae.metadata.MetaData.GetMetaProperties(MetaData.java:331)
INFO | jvm 1 | 2024/03/07 07:22:20 | at com.ca.waae.metadata.MetaData.<init>(MetaData.java:69)
INFO | jvm 1 | 2024/03/07 07:22:20 | at com.ca.waae.metadata.WsMetaData.<init>(WsMetaData.java:62)
INFO | jvm 1 | 2024/03/07 07:22:20 | at com.ca.waae.aehome.AEHomeInstance$MetaDataLoader.run(AEHomeInstance.java:144)
Customer was using Sybase via Kerberos authentication, so Web Server's logon.conf needed to have Kerberos enabled
1) Make sure log4j.xml and JAAS.conf files exist in $AUTOUSER
2) If missing, add entry in $AUTOUSER/JAAS.conf to $AUTOUSER/webserver/conf/logon.conf
3) In $AUTOUSER/logon.conf -> make sure the path to eiam.ws.confing is correct
4) In $AUTOUSER/eiam.ws.config, make sure references to $AUTOUSER/logger.ws.config are correct
5) In the $AUTOUSER/webserver/conf/logon.conf file make sure the Kerboeros initialization lines exist:
EEM {
com.ca.waae.security.AEEiamLoginModule required
debug=true
populate.principle.standard=tomcat
eiam.config.file="/opt/CA/WorkloadAutomationAE/autouser.ACE/eiam.ws.config"
eiam.application=WorkloadAutomationAE
try.artifact.authentication=false;
};
initiate {
com.sun.security.auth.module.Krb5LoginModule required
useTicketCache=true
debug=true;
};
6) Restart AEWS web server once above changes are made. Rest AEWS access, it should work now