run keytool through java program and pass values

1104 byte By raviadhaa at 2007-10-3 2:55:31
Hello,I want to run keytool through my java program and i want to pass arguments through my code. i have been trying this but had no luck.Any body please help me.this is my codeimport java.io.*;public class RunExe {public static void main(String[] args) { Runtime run = Runtime.getRuntime(); try ...

importing public key into keystore

189 byte By lektuvasa at 2007-10-3 3:09:56
Hello,I have a public key in pem format (file starts with '--BEGIN PUBLIC KEY--). The key isn't wrapped into any certificate. Is there a way to import it into java keystore?

authenticating a Java web client to a IIS/Active Directory

2034 byte By musikit1000a at 2007-10-3 3:11:35
hello.i'm going a little crazy here. i've downloaded tool after tool and configured my java application/web server hundreds of times now.i was asked to build a .NET web service running on a windows 2003 server machine and to only allow users to enter via Integrated windows authentication ...

How to protect creating Thread

330 byte By mnhudaa at 2007-10-3 3:12:02
Hello Security People,I would be very glad if you answer my following questions.The Java security manager (when activated) can control almost every operation by Java program. But, is it possible to stop a Java program from creating Threads? If yes, How? Thank you very much for your ...

createLoginContext.test Access denied

7610 byte By jay_dawga at 2007-10-3 3:28:30
[nobr]I get the following error:org.apache.jasper.JasperException: access denied (javax.security.auth.AuthPermission ...

keytool problem

435 byte By noe.rochaa at 2007-10-3 4:14:04
hello.i new with this technology, i have been reading about keytool and generation of Certificates, exporting and importing certificates...i was trying the examples from here http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/keytool.html#EXAMPLES...but i only get errors.keytool error: ...

Recovery

1072 byte By shrishivoma at 2007-10-3 4:25:24
Hi Freinds,By mistake i have deleted a java file (SHIFT+DELETE) . and when i tried to recover that file from some recovery software , i am not getting the file in the proper format , i am not getting which for mat it is .I have posted a part of the file below.It was a importants one.Please give ...

Policy file ignoring permission entry.

869 byte By JNooreza at 2007-10-3 4:49:43
For the data base program i am writing, I have an ExceptionWindow class which alerts the user if there was an unexptected exception. The information of the exception would then be saved to a file so that I can fix whatever caused the error. I am using a security manager with the database and I ...

ImageIcon can not be drawn and NullPointerException was thrown

2106 byte By secondta at 2007-10-3 4:53:52
I have a dialog that displays list of items whose cell renderer is customized using ImageIcons. Permissions have been granted properly, I think. The dialog can be shown but it can not draw it's children element correctly. And java.lang.NullPointerException was ...

java.security.AccessControlException

152 byte By ren.zihuia at 2007-10-3 4:55:50
When I encounter a java.security.AccessControlException, how can I find which class on the call stack cause the problem.Thanks in advance!

java.io.FilePermission not working

1015 byte By barbara_muellera at 2007-10-3 5:26:16
hiI would like to give a java.io.FilePermission to one of my packages which than writes into a file contained in an other package. If I apply the policy to to all packages, everything works correctly. But as soon as I apply the security only to one package, my policy doesn't work any more. ...

Safely store accepted certificates?

332 byte By Carmelloa at 2007-10-3 5:42:50
I am working on a pluginengine and wanted to add support for signed pluginsand want to store which certificates are accepted by the user, I guess I should store them in a keystore but how do I safely imlpement it so that no other program can add a certificate that the user didn't accepted? ...

Tomcat 4.1, JAASRealm, and Eclipse Configuration

1846 byte By avromfa at 2007-10-3 6:01:08
Hi,I am trying to get an application that is usually deployed on JRun to run on Tomcat 4.1 within Eclipse (using Eclipse's WTP).Now, this application uses JAAS for authentication via a FORM.I have been trying to get it to work by using Tomcat's JAASRealm without much success.Here is what I ...

JAAS with TomCat 5.5 Unable to login.No error shown.PLS HELP ME:(

2797 byte By NoobProgrammera at 2007-10-3 6:03:24
Log of tomcat:Sep 28, 2006 3:21:49 PM org.apache.catalina.core.AprLifecycleListener lifecycleEventINFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Apache Software Foundation\Tomcat ...

Enforcing Java Security Manager in Restricted Windows Environments

4568 byte By jan_monscha at 2007-10-3 6:05:29
Good morningCurrently I am working on a Terminal-Server-Project which provides applications to users. Through Software Restriction Policys the users are restricted to a certain set of executables (Whitelisting). One of these permitted executables is java.exe. So if Java is enabled any Java ...

user management framework

604 byte By feha at 2007-10-3 6:06:01
I'm beginning work on a new web application, and I'm looking for a framework or library that provides user management functionality. What I mean by that phrase is:- user/role CRUD (Create, Read, Update, Delete)- user authentication/authorizationWe've always written this functionality ...

RFC: Good Book to read on security

353 byte By RobSilva at 2007-10-3 6:24:08
Was wondering if anyone had any input on a good book to read on java security? I was looking at "Java Security, 2nd Ed" by Oaks. Wondering if anyone has an opinion on this book or another that may be more suited. I am looking for a solid foundation in security and then moving into more advanced ...

Problems using JAAS with EJB 3.0 on JBoss 4.0.4-GA

4760 byte By danieldestroa at 2007-10-3 6:25:30
Hello all,I am trying to build a very simple JavaEE application with JAAS, but I getting mad.I have an EAR packed with a WAR module an EJB JAR module and a JAR with other classes. Struts is the MVC framework and EJB 3.0 is been used.First of all, I configured the "login-config.xml" file within ...

Problem propagating user credentials on Oracle AS cluster environment

2121 byte By yurtsevicha at 2007-10-3 6:28:38
Dear colleagues, I have following problem.Configuration. We have Oracle AS 10.1.2.0.1 cluster. Client module requests functionality from EJB module deployed in server (stateless session beans). Client is written by Java 1.5, EJB - by Java 1.4. JAAS is used to establish security context between ...

sun.security.pkcs11.wrapper.PKCS11.getInstance arguments

445 byte By fcornelia at 2007-10-3 6:39:30
Hi,For some reason I'm currently using the Sun PKCS11 wrapper directly in Java5. But, in Java 6, they changed the arguments of this static method. They added a string as second argument. What should I put in there?In Java5 I used to call:PKCS11.getInstance(pkcs11Library, null, ...

Message signing

1531 byte By kristof_taveirnea at 2007-10-3 7:12:25
Hi,I'm implementing a client that uses a eID to sign XML messages in a SAML implementation of the FIPS196 protocol for SSO.When I launch the client, the SAML assertions are being exchanged and signed by the eid. The first time something gets signed a pin code is asked using a pop-up dialog ...

Urgent! Problem setting users/credentials in jazn-data.xml in oc4j 10.1.3

3486 byte By s-raghavana at 2007-10-3 7:27:59
My application is an EAR deployed in OAS 9.0.4 successfully. Now I am trying to deploy it in oc4j standalone 10.1.3. I use Enterprise Manager to do deploy it. My EAR contains a War and also an application.xml like ...

SATSA PKI

1427 byte By fGomeza at 2007-10-3 7:39:56
Hi all.I'm developing an application for an E61 mobile, using PKI SATSA package. The IDE I use is netbeans 4.1 with the wireless toolkit 2.5, and the java card emulator 2.2.2.Ok, the thing is that with the emulators, everything goes right. I can generate a CSR, I can add a certificate and I ...

Can an arbitrarily created Subject be used in doAs() without LoginContext?

951 byte By secondta at 2007-10-3 7:41:13
Can a Subject that is created independently be used for doAs() or doAsPrivileged()?Due to some restrictions I can not use LoginModule(and LoginContext) to authenitcate a user, instead, the authentication process is done using another approach. After that process I have added the gained roles as ...

file permissions checking

246 byte By BadIsGooda at 2007-10-3 7:46:15
Hi,I'd like to access the file permissions on a Unix system in order to know what action to do.Is that possible?I had a look at FilePermission, but it seems to deal only with java permissions.RegardsYann

alternative to set "java.security.auth.login.config" ?

372 byte By maqiang9111a at 2007-10-3 8:02:06
In all examples of using JASS, it uses the following way. System.setProperty("java.security.auth.login.config", fileName)Is there a way I can specify the policies in code, not in a file? That way I don't have to worry about file permissions.p.s. Thanks for Seema-1 who anwsered my last ...

List Certs in Truststore programmatically

741 byte By james.bender@53.coma at 2007-10-3 8:21:27
Hi,I need to iterate the Certificates in my App Server (Websphere)'s trust store (trust.jks) programmatically. I need to look at each cert, tell if it is within a month of expiring (and send a warning email if it is). We just got burned by an expired SSL certificate and my manager is adamant ...

Luhn check range

567 byte By jjdevelopera at 2007-10-3 8:27:41
Hi,I like to write a function that will take two credit cards number (valid luhn numbers) and counts how many luhn numbers exist in the range. Any pointers as to how to approach this?I have the fuction that check if the card is a valid Luhn and also know how to commute the check digit. But not ...

Basic policy file question

2758 byte By msp1960ADa at 2007-10-3 8:53:32
I think this is a simple question on grant statements and the default security manager, but I'm missing something obvious:1) If I have a class PrintHomepublic class PrintHome {public static void main(String[] argv) {System.out.println(System.getProperty("user.home"));}}residing in ...

how can i prevent JAAS to buffer users?

614 byte By peddinenisa at 2007-10-3 8:55:06
Hi all,For security, we are using JAAS (in JBoss). The problem is whenever the user enters the application and logs out. Later then user gets deleted and its getting deleted in database. But if i login using"deleted user", instead of showing invalid login details, it is taking me to application ...

How I get the SunPKCS11 provider to log in to my token?

1270 byte By JohnMersha at 2007-10-3 8:57:51
I am trying to get the SunPKCS11 provider to work with our PKCS11 library. The problem I have is that to access the keys within the PKCS11 token as a key store it is necessary to log into the token using C_LOGIN. I have tried to get the SunPKCS11 library to do this but I have totally ...

Unable to GlobalAlloc memory for LAN message buffer.

3104 byte By RoxyLJa at 2007-10-3 9:11:04
Hi There,I'm not sure if this is the right place to be posting this topic, but I'm not sure where else to put it. I think it's more of a Microsoft issue than a Java one, but maybe someone can point me in the right direction of where to look.I have written a front-end Java application that ...

Authorization using JAAS RDBMS LoginModule from Swing Application

1018 byte By mark_in_gra at 2007-10-3 9:23:22
My goal is to design an Authentication and Authorization system based on settings stored in an RDBMS schema. These settings would control which users would have certain CRUD operations associated to Features or specific Functionality.I also want to declaratively control the association between ...

Exception at com.trend.iwss.jscan.appscan.runtime.PolicyRuntime.getB64StrPr

2452 byte By Nortona at 2007-10-3 9:25:06
WHEN ERROR OCCURS:-This problem never occured earlier but since the last few days this problem is occuring on my Windows XP System (Version 2002 Service Pack2).CLASSPATH includes bcprov-jdk14-134.jar and bcmail-jdk14-134.jar.At this statement....signerInformation.verify(cert.getPublicKey(), ...

Client Authentication - Received fatal alert: bad_certificate

3783 byte By junkyaad2a at 2007-10-3 9:34:29
I am making a "secure" chat server that has some simple functionality.For the server cert, I sent off the CSR to Thawte and set up the trust chain. That keystore seems to be fine:Keystore type: jksKeystore provider: SUNYour keystore contains 2 entriesAlias name: verisigntestrootCreation date: ...

configuring HTTPS in websphere

87 byte By jagdeeshna at 2007-10-3 9:35:06
Hi,can any one tell me how to configure HTTPS in websphere.thanks.

How to convert X509Certificate to .CER file?

208 byte By Nortona at 2007-10-3 9:41:36
I have an X509Certificate object with me. Now how can I write this X509Certificate object as a .cer file containing the public key on the hard disk?Can it be done with BouncyCastle? Please help!

SEVERE error in log files

2262 byte By EricWaitea at 2007-10-3 9:49:52
I am receiving the following error in the log files:Nov 14, 2006 11:32:23 AM org.apache.commons.modeler.Registry registerComponentSEVERE: Error registering Catalina:type=RequestProcessor,worker=jk-8009,name=JkRequest8163016javax.management.InstanceAlreadyExistsException: ...

Exception in thread "main" when trying to sign jar file

1004 byte By hudamana at 2007-10-3 9:50:38
Whenever I attempt to use jarsigner to sign or verify a jar file I receive the following message:C:\Contract Manager\Contractmanager\dist>jarsigner -verify CM.jarException in thread "main" java.lang.NoClassDefFoundError: sun/security/tools/JarSignerC:\Contract ...

Server to server validation using SLL

393 byte By i_subhashka at 2007-10-3 10:24:53
How to validate the server to server using ssl,I have a server A with ssl cert,,also i have another server B with ssl cert,,,now when server A send request to server B,,the server B should validate server A,,means the server B shud service the requests of only server A for a perticular ...

On this significance of a ProtectionDomain with a null CodeSource

1036 byte By msp1960ADa at 2007-10-3 10:33:09
Good day.I am putting the finishing touches on a custom security manager that profiles an application's security needs at runtime http://www.petrovic.org/content/SecMgrTutorial/sm.htmlIn short, the custom security manager extends java.lang.SecurityManager and overrides the two checkPermission() ...

PKIX path validation failed | subject/issuer name chaining check failed

628 byte By mpinga at 2007-10-3 10:46:14
I am developing an application that simulates the user's actions on a browser (logs in a site, do some POST's and GET's, etc) and I get the following error:Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: ...

Invalidate Session

386 byte By antonioj.arias@gmail.coma at 2007-10-3 10:54:25
Hi, i磛e some problems invalidating session web from my app web.I磛e my application web that uses multiples contexts. I want when I logout, the session is invalidate to all context. I use JAAS for authenticate in a login.jsp, and when I logout, I come back to lign.jsp but don磘 let me login ...

Is there a way to declare "variables" in policy files ?

1069 byte By andreafloa at 2007-10-3 10:57:18
Hi everyone,I built a client- server RMI application;I'm defyining the policy permission for both clien and server side;I would like to know if there is a way to declare "variables" in policy files like that:grant codebase "/home/accounts/.../javarmi/" {permission java.net.SocketPermission ...

Apache XML Security

471 byte By fdkumroa at 2007-10-3 11:01:45
Hi,I am creating a small program that will need to sign a XML document given a keyname. At this point my program can import the key and also sign the XML document. However I cannot find any documentation on how to save signature so its embedded in the XML document. The apache xml security ...

How to generate CSR (certificate signing request) in PKCS#10 format

389 byte By mvpa at 2007-10-3 11:28:38
Hi,First, I am a novice in security issues.Problem:I know how to generate CSR using PKCS#10 format with keytool. However I need to implement this functionality in my application. Unfortunately I can't find any docs describing this issue.Do anybody know about some API where I just pass data and ...

Should realy upgrade Java 1.5 ?

424 byte By v701005a at 2007-10-3 11:34:00
Hello all, This may be a silly question, but I would like to understan this. I can read from the Java 1.5 feature that it offers more efficiency than the older versions. But what happens if I'm already working with older version (may be Java 1.4) and upgraded to Java 1.5 hence most of my ...

Error looking up datasource once security is enabled in IBM WAS 6

1756 byte By vjk_smart421a at 2007-10-3 11:47:48
Hi everyone,I am having trouble starting up my application after enabling global security on WAS 6.The startup logs show that the datasource has been successfully created and bound to server. But as soon as my application is trying to load and lookup that datasource an Exception is being ...

how to sign midlet

566 byte By RiekeyLeea at 2007-10-3 11:52:49
1. What is the benifit to get MIDlet signed.2. how to do it? Can I do it with keytool? or J2ME toolkit?3. I tried to sign my midlet suite with a self signed cert and using keytool, jarsigner and JadTool in WTK22. I export the cert to a .crt file and installed it on my 6630 and give all ...

Baffled by FilePermission access denied

2188 byte By ce-cona at 2007-11-26 12:41:24
I am trying to read through a directory and check whether I can read the files located in that directory. When I don't use a security manager the canRead() function always returns true. So I'm trying to implement a security manager and can't figure out what I'm doing wrong.I created the ...