OpenAM Java EE agent plain text password -


in documentation, looks can set plain text password instead of encrypted one.

com.iplanet.am.service.secret

when using plain text password, set password agent profile, , leave am.encryption.pwd blank.

so, i've set following in openssoagentbootstrap.properties:

com.iplanet.am.service.secret = myplaintextpassword am.encryption.pwd =  

accessing agent application gives me:

java.lang.runtimeexception: failed load configuration: invalid application password specified     com.sun.identity.agents.arch.agentconfiguration.bootstrapclientconfiguration(agentconfiguration.java:790)     com.sun.identity.agents.arch.agentconfiguration.initializeconfiguration(agentconfiguration.java:1140)     com.sun.identity.agents.arch.agentconfiguration.<clinit>(agentconfiguration.java:1579)     com.sun.identity.agents.arch.manager.<clinit>(manager.java:675)     com.sun.identity.agents.filter.amagentbasefilter.initializefilter(amagentbasefilter.java:274)     com.sun.identity.agents.filter.amagentbasefilter.getamfilterinstance(amagentbasefilter.java:364)     com.sun.identity.agents.filter.amagentbasefilter.dofilter(amagentbasefilter.java:73) 

i saw here should using com.iplanet.am.service.password instead. did not work either.

is there must set on openam server? missing on agent side of things?


edit 1

openam server v12.0.0, , tomcat agent v3.3.0. log entries before exception:

2015-04-01 12:44:09,634 [localhost-startstop-1] info  org.springframework.web.servlet.dispatcherservlet  - frameworkservlet 'myapp': initialization started 2015-04-01 12:44:09,634 [localhost-startstop-1] info  org.springframework.web.context.support.xmlwebapplicationcontext  - refreshing webapplicationcontext namespace 'myapp': startup date [wed apr 01 12:44:09 pdt 2015]; parent: root webapplicationcontext 2015-04-01 12:44:09,634 [localhost-startstop-1] info  org.springframework.beans.factory.xml.xmlbeandefinitionreader  - loading xml bean definitions servletcontext resource [/web-inf/servlet-context.xml] apr 01, 2015 12:44:09 pm org.apache.catalina.core.applicationcontext log info: initializing spring frameworkservlet 'myapp' 2015-04-01 12:44:09,775 [localhost-startstop-1] info  org.springframework.beans.factory.support.defaultlistablebeanfactory  - overriding bean definition bean 'mvccontentnegotiationmanager': replacing [root bean: class [org.springframework.web.accept.contentnegotiationmanagerfactorybean]; scope=; abstract=false; lazyinit=false; autowiremode=0; dependencycheck=0; autowirecandidate=true; primary=false; factorybeanname=null; factorymethodname=null; initmethodname=null; destroymethodname=null] [root bean: class [null]; scope=; abstract=false; lazyinit=false; autowiremode=3; dependencycheck=0; autowirecandidate=true; primary=false; factorybeanname=org.springframework.web.servlet.config.annotation.delegatingwebmvcconfiguration; factorymethodname=mvccontentnegotiationmanager; initmethodname=null; destroymethodname=(inferred); defined in class path resource [org/springframework/web/servlet/config/annotation/delegatingwebmvcconfiguration.class]] 2015-04-01 12:44:09,775 [localhost-startstop-1] info  org.springframework.context.annotation.configurationclassbeandefinitionreader  - skipping bean definition [beanmethod:name=mvcuricomponentscontributor,declaringclass=org.springframework.web.servlet.config.annotation.webmvcconfigurationsupport]: definition bean 'mvcuricomponentscontributor' exists. top-level bean definition considered override. 2015-04-01 12:44:09,994 [localhost-startstop-1] info  org.springframework.web.servlet.mvc.method.annotation.requestmappinghandleradapter  - looking @controlleradvice: webapplicationcontext namespace 'myapp': startup date [wed apr 01 12:44:09 pdt 2015]; parent: root webapplicationcontext 2015-04-01 12:44:10,135 [localhost-startstop-1] info  org.springframework.web.servlet.handler.simpleurlhandlermapping  - mapped url path [/**] onto handler of type [class org.springframework.web.servlet.resource.defaultservlethttprequesthandler] 2015-04-01 12:44:10,182 [localhost-startstop-1] info  org.springframework.web.servlet.mvc.method.annotation.requestmappinghandleradapter  - looking @controlleradvice: webapplicationcontext namespace 'myapp': startup date [wed apr 01 12:44:09 pdt 2015]; parent: root webapplicationcontext 2015-04-01 12:44:10,213 [localhost-startstop-1] info  org.apache.tiles.access.tilesaccess  - publishing tilescontext context: org.springframework.web.servlet.view.tiles3.springwildcardservlettilesapplicationcontext 2015-04-01 12:44:10,244 [localhost-startstop-1] info  org.springframework.web.servlet.dispatcherservlet  - frameworkservlet 'myapp': initialization completed in 610 ms apr 01, 2015 12:44:10 pm org.apache.coyote.abstractprotocol start info: starting protocolhandler ["http-bio-8081"] apr 01, 2015 12:44:10 pm org.apache.coyote.abstractprotocol start info: starting protocolhandler ["http-bio-8081"] java.lang.runtimeexception: invalid application password specified     @ com.sun.identity.agents.arch.agentconfiguration.setapplicationpassword(agentconfiguration.java:1030)     @ com.sun.identity.agents.arch.agentconfiguration.bootstrapclientconfiguration(agentconfiguration.java:720)     @ com.sun.identity.agents.arch.agentconfiguration.initializeconfiguration(agentconfiguration.java:1140)     @ com.sun.identity.agents.arch.agentconfiguration.<clinit>(agentconfiguration.java:1579)     @ com.sun.identity.agents.arch.manager.<clinit>(manager.java:675)     @ com.sun.identity.agents.filter.amagentbasefilter.initializefilter(amagentbasefilter.java:274)     @ com.sun.identity.agents.filter.amagentbasefilter.getamfilterinstance(amagentbasefilter.java:364)     @ com.sun.identity.agents.filter.amagentbasefilter.dofilter(amagentbasefilter.java:73)     @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:241)     @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:208)     @ org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve.java:220)     @ org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve.java:122)     @ org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:171)     @ org.apache.catalina.valves.errorreportvalve.invoke(errorreportvalve.java:103)     @ org.apache.catalina.core.standardenginevalve.invoke(standardenginevalve.java:116)     @ org.apache.catalina.connector.coyoteadapter.service(coyoteadapter.java:408)     @ org.apache.coyote.http11.abstracthttp11processor.process(abstracthttp11processor.java:1070)     @ org.apache.coyote.abstractprotocol$abstractconnectionhandler.process(abstractprotocol.java:611)     @ org.apache.tomcat.util.net.jioendpoint$socketprocessor.run(jioendpoint.java:314)     @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145)     @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615)     @ org.apache.tomcat.util.threads.taskthread$wrappingrunnable.run(taskthread.java:61)     @ java.lang.thread.run(thread.java:745) 

the agent's debug.out shows:

amagentcore:04/01/2015 12:44:35:314 pm pdt: thread[http-bio-8081-exec-1,5,main] ********************************************** amagentcore:04/01/2015 12:44:35:314 pm pdt: thread[http-bio-8081-exec-1,5,main] agentconfiguration.setorganizationname: organization name realm set to: / amagentcore:04/01/2015 12:44:35:314 pm pdt: thread[http-bio-8081-exec-1,5,main] agentconfiguration: service resolver set to: com.sun.identity.agents.tomcat.v6.amtomcatagentserviceresolver amagentcore:04/01/2015 12:44:35:314 pm pdt: thread[http-bio-8081-exec-1,5,main] agentconfiguration: service resolver reports ejbcontext available: false amagentcore:04/01/2015 12:44:35:314 pm pdt: thread[http-bio-8081-exec-1,5,main] agentconfiguration: application user: myagent amsdk:04/01/2015 12:44:35:329 pm pdt: thread[http-bio-8081-exec-1,5,main] ********************************************** amsdk:04/01/2015 12:44:35:329 pm pdt: thread[http-bio-8081-exec-1,5,main] error: jceencryption:: failed decrypt data java.lang.nullpointerexception     @ com.iplanet.services.util.jceencryption.pbedecrypt(jceencryption.java:246)     @ com.iplanet.services.util.jceencryption.decrypt(jceencryption.java:141)     @ com.iplanet.services.util.crypt.decode(crypt.java:343)     @ com.iplanet.services.util.crypt.decryptlocal(crypt.java:238)     @ com.sun.identity.agents.arch.am70crypt.decrypt(am70crypt.java:57)     @ com.sun.identity.agents.arch.agentconfiguration.setapplicationpassword(agentconfiguration.java:1020)     @ com.sun.identity.agents.arch.agentconfiguration.bootstrapclientconfiguration(agentconfiguration.java:720)     @ com.sun.identity.agents.arch.agentconfiguration.initializeconfiguration(agentconfiguration.java:1140)     @ com.sun.identity.agents.arch.agentconfiguration.<clinit>(agentconfiguration.java:1579)     @ com.sun.identity.agents.arch.manager.<clinit>(manager.java:675)     @ com.sun.identity.agents.filter.amagentbasefilter.initializefilter(amagentbasefilter.java:274)     @ com.sun.identity.agents.filter.amagentbasefilter.getamfilterinstance(amagentbasefilter.java:364)     @ com.sun.identity.agents.filter.amagentbasefilter.dofilter(amagentbasefilter.java:73)     @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:241)     @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:208)     @ org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve.java:220)     @ org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve.java:122)     @ org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:171)     @ org.apache.catalina.valves.errorreportvalve.invoke(errorreportvalve.java:103)     @ org.apache.catalina.core.standardenginevalve.invoke(standardenginevalve.java:116)     @ org.apache.catalina.connector.coyoteadapter.service(coyoteadapter.java:408)     @ org.apache.coyote.http11.abstracthttp11processor.process(abstracthttp11processor.java:1070)     @ org.apache.coyote.abstractprotocol$abstractconnectionhandler.process(abstractprotocol.java:611)     @ org.apache.tomcat.util.net.jioendpoint$socketprocessor.run(jioendpoint.java:314)     @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145)     @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615)     @ org.apache.tomcat.util.threads.taskthread$wrappingrunnable.run(taskthread.java:61)     @ java.lang.thread.run(thread.java:745) 

let @ source code taken github: openrock/openam

private static synchronized void setapplicationpassword() {     if (!isinitialized()) {         try {             _crypt = servicefactory.getcryptprovider();             if(_crypt != null) {                 string encodedpass = getproperty(sdkprop_app_password);                 _applicationpassword = _crypt.decrypt(encodedpass);             }         } catch (exception ex) {             logerror("agentconfiguration: unable create new instance of " + "crypt class exception ", ex);         }         if (_applicationpassword == null || _applicationpassword.trim().length() == 0) {             throw new runtimeexception("invalid application password specified");         }     } } 

the constant sdfsfd defined as:

public static final string sdkprop_app_password = "com.iplanet.am.service.secret"; 

as can see agentconfiguration reads password , stores encodedpass.

so believe method getcryptprovider returns broken cryptprovider (_crypt). _crypt.decrypt(encodedpass) nullpointerexception , variable _applicationpassword never initialized runtimeexception thrown.

make sure configuration allows or defines cryptprovider.


ok saw edit

nullpointerexception occurs here. try interpret that.

final cipher pbecipher = cipherprovider.getcipher(); // npe 

Comments

Popular posts from this blog

How to run C# code using mono without Xamarin in Android? -

c# - SharpSsh Command Execution -

python - Specify path of savefig with pylab or matplotlib -