ExoDefaultSecurityTokenGenerator() contains a hard-coded path to the encryption key
-----------------------------------------------------------------------------------
Key: GTNPORTAL-710
URL:
https://jira.jboss.org/jira/browse/GTNPORTAL-710
Project: GateIn Portal
Issue Type: Bug
Components: Common integration
Affects Versions: 3.0.0-CR01
Environment: EAP 5.0, Java 1.6, Linux
Reporter: Martin Podolinsky
I've created a config directory jboss-as/server/${server-config}/conf/exo-conf. This
directory should be a place where all exo related stuff is located. This directory is
checked and provided by the org.exoplatform.container.monitor.jvm.J2EEServerInfo class. So
after GateIn start is the gadget encryption key ("key.txt") properly generated
by the org.exoplatform.portal.gadget.core.ExoContainerConfig into the exo-conf dir. and
everything looks fine. But the problem occurs when the
org.exoplatform.portal.gadget.core.ExoDefaultSecurityTokenGenerator class comes into play.
It expects the key file "key.txt" located in the AS current execution directory
as it contains a hard-coded string
this.containerKey = "key.txt";
and is throwing an exception.
Exception stack trace:
*******************
11:03:06,742 ERROR [STDERR] java.io.FileNotFoundException: key.txt (No such file or
directory)
11:03:06,744 ERROR [STDERR] at java.io.FileInputStream.open(Native Method)
11:03:06,744 ERROR [STDERR] at
java.io.FileInputStream.<init>(FileInputStream.java:106)
11:03:06,744 ERROR [STDERR] at
org.apache.shindig.common.crypto.BasicBlobCrypter.<init>(BasicBlobCrypter.java:79)
11:03:06,744 ERROR [STDERR] at
org.exoplatform.portal.gadget.core.ExoDefaultSecurityTokenGenerator.getBlobCrypter(ExoDefaultSecurityTokenGenerator.java:127)
11:03:06,744 ERROR [STDERR] at
org.exoplatform.portal.gadget.core.ExoDefaultSecurityTokenGenerator.createToken(ExoDefaultSecurityTokenGenerator.java:92)
11:03:06,744 ERROR [STDERR] at
org.exoplatform.portal.gadget.core.ExoDefaultSecurityTokenGenerator.createToken(ExoDefaultSecurityTokenGenerator.java:122)
11:03:06,744 ERROR [STDERR] at
org.exoplatform.portal.webui.application.GadgetUtil.createToken(GadgetUtil.java:119)
11:03:06,744 ERROR [STDERR] at
org.exoplatform.portal.webui.application.UIGadget.getMetadata(UIGadget.java:210)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira