Note that there are some explanatory texts on larger screens.

plurals
  1. PODomino Agent struggling with Java security using third party jar in /jvm/lib/ext
    primarykey
    data
    text
    <p>I am running into a Java security problem. I have an agent which uses the pdfbox-1.7.1.jar to decrypt a PDF whose password I know. The jar has been placed in /jvm/lib/ext on both the server and my client, and I get this little beauty of a stack trace:</p> <pre><code>java.lang.SecurityException at java.lang.SecurityManager.checkPermission(SecurityManager.java:582) at COM.ibm.JEmpower.applet.AppletSecurity.checkSecurityPermission(AppletSecurity.java:1332) at COM.ibm.JEmpower.applet.AppletSecurity.checkPermission(AppletSecurity.java:1613) at COM.ibm.JEmpower.applet.AppletSecurity.checkPermission(AppletSecurity.java:1464) at java.lang.SecurityManager.checkSecurityAccess(SecurityManager.java:1725) at java.security.Security.insertProviderAt(Security.java:190) at java.security.Security.addProvider(Security.java:210) at org.apache.pdfbox.pdmodel.encryption.SecurityHandlersManager.getInstance(SecurityHandlersManager.java:146) at org.apache.pdfbox.pdmodel.PDDocument.openProtection(PDDocument.java:1365) at org.apache.pdfbox.pdmodel.PDDocument.decrypt(PDDocument.java:798) at com.magerman.hremail.prep1docc.PDFDecryptor.decrypt(Unknown Source) at com.magerman.hremail.prep1docc.MetaAttachment.decrypt(Unknown Source) at com.magerman.hremail.prep1docc.MetaDocContainingAttachments.removePasswordOfPDFAttachments(Unknown Source) at com.magerman.hremail.prep1docc.EPDFPreparerFactory.generateAttachmentsTriggerDocs(Unknown Source) at com.magerman.hremail.prep1docc.EPDFPreparerFactory.run(Unknown Source) at com.magerman.hremail.prep1docc.BaseClass.NotesMain(Unknown Source) at lotus.domino.AgentBase.runNotes(Unknown Source) at lotus.domino.NotesThread.run(Unknown Source) </code></pre> <p>Both Client and Server are using 8.5.3. The Agent security level is set to 3. Putting the jars in the agent itself does not help. The signer of the agent is full admin on the server. The security exception seems to point at "insertProviderAt" </p> <p>This is what I tried:</p> <p>putting </p> <pre><code>grant { permission java.security.AllPermission; } </code></pre> <p>solves my problem, but I will never get this past my eagle-eyed admin. </p> <p>I am trying to reduce the scope of the permission to just the database but the documentation here: <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/security/PolicyFiles.html" rel="nofollow">http://docs.oracle.com/javase/7/docs/technotes/guides/security/PolicyFiles.html</a> did not really tell me how to input a notes database.</p> <p>I looked into Stephan Wissel's article on Xpages Java security here: <a href="http://www.wissel.net/blog/d6plinks/SHWL-8JYAT5" rel="nofollow">http://www.wissel.net/blog/d6plinks/SHWL-8JYAT5</a> and inserted the following into my /jvm/lib/security/java.policy file:</p> <pre><code>grant codeBase "xspnsf://server:0/development/hre-mail/hre-mail2_0/hre-mail_(2_0)_dev.nsf/-" { permission java.security.AllPermission; }; </code></pre> <p>but that did not work either, I suppose because my codeBase syntax is not valid for the nsf database but only for webpages.</p> <p>I am also trying to reduce the Permission to that which is really needed, and looking at the documentation here: <a href="http://docs.oracle.com/javase/1.4.2/docs/guide/security/permissions.html" rel="nofollow">http://docs.oracle.com/javase/1.4.2/docs/guide/security/permissions.html</a></p> <p>implies that I have to do something like</p> <pre><code>java.security.SecurityPermission "insertProvider.{name}" </code></pre> <p>but I have no idea what {name} should be.</p> <p>I also read Mikkel's article on <a href="http://lekkimworld.com/2013/06/20/java_in_notes_domino_explained_on_java_security_and_how_it_relates_to_notes_domino.html" rel="nofollow">http://lekkimworld.com/2013/06/20/java_in_notes_domino_explained_on_java_security_and_how_it_relates_to_notes_domino.html</a></p> <p>but my brain fried at about the middle of the page. In particular, I am not sure how to actually implement this method. Could you hold my hand and walk me through please?</p> <p>Whilst I'm at it, am I right in assuming that whenever I put new jars in /jvm/lib/ext, all I need to do is a </p> <pre><code>tell http restart </code></pre> <p>to have the JVM reload? I am assuming Domino is using a single JVM for Xpages, Agents, and the HTTP Task, is this right.</p> <p>Also, am I right that I need to restart the server for any new policies in java.policy to be effective?</p> <p>Any ideas? </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload