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 {
...
|
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 ... |
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 ... |
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 ... |
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 ... |
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 ...
|
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 ... |
|
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 ... |
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.
|
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 ... |
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 ... |
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. ... |
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 ... |
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 ... |
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 ... |
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, ...
|
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 ... |
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 ...
|
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. ... |
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. ... |
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 ... |
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 ... |
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. ... |
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.
... |
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 ...
|
|
|
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 ... |
|
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 { ... |
|
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 ... |
|
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 ... |
|
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 ... |
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 ... |
|
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 ... |
|
|
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 ... |
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 |
|
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 ... |
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 ... |
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 ... |
|
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 ... |
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? |
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 ... |
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 ... |
|
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 ... |
|
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 ... |
|
|
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. ... |