Javi
Javi

Reputation: 11

Prevent to access local filesystem in Domino server

We need to prevent the access to Windows local filesystem through an XAgent in a Domino Server:

  xp:this.beforeRenderResponse><![CDATA[#{javascript:

  [...]

  var url = new java.net.URL("D:\path\to\archive.pdf");

  var conn:java.net.HttpURLConnection = url.openConnection();

  [...]

¿Should we have to do at Domino-level or Windows-level?

Upvotes: 1

Views: 143

Answers (1)

Sven Hasselbach
Sven Hasselbach

Reputation: 10485

You can disallow access to the file system by changing the java policy file (java.pol). Something like this:

grant {
    permission java.io.FilePermission "C:\\Notes\\*", "read";
};

This blocks every access to the filesystem and only allows that files in the Notes directory can be read.

See: Permissions in the Java Development Kit (JDK)

Upvotes: 5

Related Questions