policy « Development « Java I/O Q&A





1. Using "strong" JRE policy files with BouncyCastle    stackoverflow.com

Cryptography newbie here... I'm trying to do 128-bit encryption using BouncyCastle with the code below.

import java.io.BufferedOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.KeyStore;
import java.security.Security;
import java.security.cert.X509Certificate;

import org.apache.commons.io.IOUtils;
import org.bouncycastle.cms.CMSEnvelopedDataGenerator;
import org.bouncycastle.cms.CMSEnvelopedDataStreamGenerator;
import org.bouncycastle.jce.provider.BouncyCastleProvider;

public class Test {
 ...

2. how to change policy file for applet printing    stackoverflow.com

i need to know that how can we change java.policy file for applet printing. as printing is not supported in java applets by default. i want to print from applet. and i am using ...

3. "Unlimited Strength" JCE Policy Files    stackoverflow.com

I have an app that uses 256-bit AES encryption which is not supported by Java out of the box. I know to get this to function correctly I install the JCE ...

4. Automating the generation of Java policy files    stackoverflow.com

Does anyone know of mechanisms to automate the generation of security policy files for a Java application, especially that of J2EE/JEE applications? Are there tips that can be observed to generate accurate ...

5. where policy file location for my applet that needs clients permission to access resource?    stackoverflow.com

i find out that i must write a policy file to grant permission for my applet... but i really confused with it... :( i want to write a applet that is a map ...

6. Jurisdiction policy files are not signed by trusted signers!    stackoverflow.com

We have next exception during starting of our application under JBoss on AIX: Caused by: java.lang.SecurityException: Cannot set up certs fo 12:56:25,055 INFO [STDOUT] r trusted CAs

    at javax.crypto.b.<clinit>(Unknown ...

7. Where to place java applet policy file?    stackoverflow.com

I am working on an artificial intelligence project which is a logic game and aims two user connecting to the server on the network who acts as an Admin and then ...

8. Location of policy file on Debian    stackoverflow.com

I'm working on an application/library, under DebianOS, that requires the presence of certain standard policy files (related to unlimited strength ciphers, 192, 256 bit AES keys). However, there seems to a problem ...

9. Alternative to policy files when granting permissions?    stackoverflow.com

Is it possible to grant Permissions through something other than a policy file? What I'd like to achieve is a permissions-based system that can be modified at runtime.





10. How to grant permissions to a java applet being called by JavaScript via the java.policy file    stackoverflow.com

I have a single sign on application for our intranet which is supposed to read a file off the local computer as well as get the users SID and verify that ...

11. Java SecurityManager: Good introduction to policy files    stackoverflow.com

Can you recommend a good introduction to non-trivial policy files for the standard Java SecurityManager? Are there examples that go beyond what the Java website offers? Or maybe someone describes how to ...

12. Possibilities of accessing client resources with a self signed java applet but without changes to the client's policy file    stackoverflow.com

My java applet is basically used for the following 2 functions: a. Displaying a progress bar. b. DB operations - running stored procedures. (sybase back end) Functionality a. seems to work fine but b. ...

13. Java Policy file - Deny permissions to a codebase    stackoverflow.com

In the Java policy file, the grant codeBase syntax specifies which codebase should be granted which permissions. for example,

grant codeBase "file:/C:/abc.jar" { permission java.security.AllPermission; };
grants AllPermission to ...

14. Problem with using signed Applet with policy File    stackoverflow.com

i have a problem with the .java.policy entries for my applet. I would try to create folders and files with an applet. I had already signed my jar and added in the ...

15. Java JCE Unlimited strength encryption security policy files    stackoverflow.com

Are the JCE policy files (in {java.home}/lib/security) overwritten with the standard strength policy files after a JRE update? or are these left alone on JRE update? EDIT: Does anyone know if the ...

16. Java Sandbox java.io.FilePermission error    stackoverflow.com

I'm trying to run a java application (a distributed file system) inside a sandbox, here is the policy file:

keystore "/home/me/.keystore", "jks";

grant signedBy "me1", codeBase "file:file.jar" { 


permission java.net.SocketPermission "*:1700-", "accept, connect, ...





17. Limiting file access in Java    stackoverflow.com

Problem:
In my Java application (not an applet) I wish to limit certain file operations to all classes except a list/group/package of classes that should not be restricted. Specifically, I would like to ...

18. Changing System Property in Java - Security Policy file    stackoverflow.com

I have some confusion in understanding Java Security model. In my ${JDK_HOME}/jre/lib/security/java.policy file, I could see below entries:

grant { 
    // Allows any thread to stop itself using ...

19. Creating a policy file    stackoverflow.com

How do I create a policy file in Java? And I want to ask something, when you create a project, for example, in Eclipse, the policy file is created by default. ...

20. Java security policy file question    stackoverflow.com

Okay guys, I am trying to get the interpreter to use my .policy file for some JAAS stuff I am doing. When I try to enter the extra entry (ie. ...

21. .java.policy file and local applet    stackoverflow.com

I am working on an HTML page that is using Javascript to interact with a Java applet. The HTML page, javascript files, and .jar file for the applet will be ...

22. Update Java plugin gives error 1722 (lib\securit\java.policy: Old File not found)    stackoverflow.com

When running an applet in my browser (Chrome), it tells me that my Java plug-in is out of date. However, if I try to install the latest version 1.6.0_27, I get ...

23. java.policy file not working in Vista?    stackoverflow.com

I have written a Java Applet (fileIOApp.class), which I have on my desktop, with some accompanying html code, which loads the applet into a browser. The applet requires file read/write permissions. ...

24. How to deploy Signed applet with policy file?    stackoverflow.com

Where I need to specify policy.URL.n?? How to deploy the Signed applet with policy file? I want to write, create directory/file, execute some file?? Please help me to deploy the signed applet. Thanks in advance. ...

25. Java Read File Permissions    stackoverflow.com

I was wondering if anybody can show me way to be able to create read file permissions for my java applet. The exact exception I receive is

java.security.AccessControlException: access denied(java.io.FilePermission filename.pdf ...

26. javaws.policy file?    coderanch.com

27. policy files:urgent    coderanch.com

28. policy file    coderanch.com

hi everybody, I have the following doubts: 1.In rmi, I am not dynamically downloading the class , but copying the class files.Do i still have to use the policy files.because it is working absolutely fine for me without it.But going through the books and some sites, it told me that since the security policy of java2 is restrictive,i have to provide ...

29. about policy file    coderanch.com

30. policy file prob    coderanch.com

Have you changed the policy.allowSystemProperty setting in the java.security file? The default true value would let you specify your policy on the command line as you have done. When I used the policytool to create a policy allowing everything, I did not specify a codebase and the policytool showed: CodeBase but the text of the policy file shows grant { ...

31. Slashes in the policy file    coderanch.com

32. Policy files and examples    coderanch.com

When running an RMI example 1) Do you have to specify a security policy file for BOTH the client and server machines 2) If so, do you run the server and client by commands such as the following? java -Djava.security.policy=c:\DirOnServer\wideopen.policy myRMIServer java -Djava.security.policy=c:\DirOnClient\wideopen.policy myRMIClient 3) Do the commands above have to refer to policy files on their own machines or if ...

33. how to make java use a policy file?    coderanch.com

34. java.security file policy setting not working...    coderanch.com

Ive got a directory (namely C:\Documents and Settings\David\My Documents\Java\) I want to grant all security permissions to. So I made a policy file with the policy tool. this is what the file contains: grant codeBase "file:/C:/Documents and Settings/David/My Documents/Java/*" { permission java.security.AllPermission; }; this policy file is stored here: C:\myJavaPolicy\myPolicy.policy I want to add this to my java.security file... so I ...

35. Is this policy file correct?    coderanch.com

36. Setting codebase and permissions in java.policy file    coderanch.com

Hi, I am new to javaranch and am not sure if this is the right place to post question on java2 policy files. If not please route it to the right forum. I have restricted access to a pacakge in the ${java.home}/jre/lib/security/java.security file through package.access = test.mypackage; Now I want to grant access to the above package only to web.myfiles.jar which ...

37. A BIG Problem using java policy files    coderanch.com

Hi Everyone, I have some trouble using policy files, which I hope someone might help me with. Here is all the information you need:- 1) I am trying to build a small program to test JMX security(probably not important, but mentioned anyway ) 2) I have a policy file "server.policy" in the SAME directory as my Server.class file which has the ...

38. .java.policy file and 1.6.0_10-rc2    coderanch.com

39. Java Policy File?    coderanch.com

Hi, I am using an applet in a jsp application. There is a save button in the applet, when i hit the save button, control should return back to the jsp application. However this is not happening. Since i am using applet,it seems that it cannot use the system resources. so i need to set the policy file.i hope i am ...

40. purpose of Policy File    coderanch.com

41. javaspaces policy file    coderanch.com

42. See the Policy File Effects (Applications)    java-forums.org

class GetProps { public static void main(String[] args) { /* Test reading properties w & w/out security manager */ String s; try { System.out.println("About to get os.name property value"); s = System.getProperty("os.name", "not specified"); System.out.println(" The name of your operating system is: " + s); System.out.println("About to get java.version property value"); s = System.getProperty("java.version", "not specified"); System.out.println(" The version of the ...

43. Pushing out java and policy file    java-forums.org

Hello, I'm in an environment that has different version of java and I need to accomplish 2 things: 1. How do we push out a version of java that puts everyone on the same (latest) version? 2. How do we push out a policy file to all my users? Like what do you use? SCCM? J

44. Security Manager and Policy Files    java-forums.org

45. access denied security policy file    forums.oracle.com

How did you "Since i havent figured out how to do SecurityManager stuff properly, i can override 2 checkPermission methods in SecurityManager with empty method bodies, thats a quick and dirty fix." As the link you posted is not valid anymore. All i want to do is use my server classes in eclipse to help me client connect to the RMI ...

46. with policytool in java,inWhich locationShould I store .java.policy permission file?    forums.oracle.com

If I remember correctly then if you specify a policy file (it's a -D option to set a system property) then a security manager is installed automatically. Start with the JavaDocs for java.lang.SecurityManager. Once a security manager is in place all actions that need checking, such as file access, socket connections and many others are checked against the Policy. Note that ...

47. Security policy file    forums.oracle.com

Hello, When I send a class file from a client to a server through RMI, I get the following runtime error: "java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.lang.ClassNotFoundException: a.b (no security manager: RMI class loader disabled)" Where "b" is the class file and "a" is the package that contains it. I know I have to create a policy file. I ...

49. Does anyone use the.java.policy file?    forums.oracle.com

Hi, Am I the only one using .java.policy file to allow an applet to read files on my local disks? I'm able to have an applet in Firefox read/write a file, but in IE7 it fails. Any recommendations on how to debug/trace it so I can get it to work? I just installed jre 6_10 and am having problems with acces ...

50. Applet policy file help!    forums.oracle.com

Thankyou this has been helpful. I need it to run as an applet even on my local because it is part of an experiment requirement. i understand that in normal situations it would not make sense. As this is the case if i only need it to work on my local what is the best way to go about it?

51. changing policy file in java..vulnerability. Fixed?    forums.oracle.com

A vulnerability was identified in Sun Java Runtime Environment, which could be exploited by malicious websites to compromise a vulnerable system. This flaw is due to an unspecified error when handling specially crafted applets, which may be exploited, via a malicious webpage, to bypass the default security policy and read/write arbitrary files on a vulnerable system or execute local applications with ...

52. Policy file    forums.oracle.com

hi, i have got a problem with policy file. i made it using the policy tool grant codeBase "http://www.java777.szm.sk/" { permission java.io.FilePermission "<>", "read"; }; i just need a permission to load images but i dont know what with the policy file i made do i need to put it in the html or in the applet? thanks very much ...

53. Placing policy files in archives    forums.oracle.com

54. About policy files    forums.oracle.com

HI, I want to run this example of the RMI. I'm in the "Running" level. http://java.sun.com/docs/books/tutorial/rmi/compiling.html I didn't understend where to put these files and what the goal for these: server.policy ,client.policy Am I create these files with the notpad editor? I'm using the same computer for server & client. I have this project: (in one directory - "RMI") My JVM ...

56. Policy files in stand-alone apps... what is the point?    forums.oracle.com

I'm trying to get a better understanding of Java security, but it seems like this very basic topic is flying over my head. I understand the purpose of security policy files in applets or distributed applications, but in a stand-alone application, what is the point in using them? Let's say I only want my program to be able to write to ...

57. policy write file issues    forums.oracle.com

58. Unlimited Strength Policy File    forums.oracle.com

59. Java Default File Rename Policy    forums.oracle.com

Code: MultipartRequest multi = new MultipartRequest(request, uploadDir, 10 * 1024 * 1024, new DefaultFileRenamePolicy()); This code seems to rename a duplicate filename correctly if done within our internal network. However, when the file is uploaded from outside the network, the file does NOT get renamed. We have checked the Java policy config files and all are identical. Any help/suggestions are welcomed. ...