I am interested in automatically generating certificates for some users (given that I've somehow verified their identity previously, e.g., they are using a "disposable" link I've given to them - in a secure way -, for that purpose). I found the HttpGetCert.java sample program, which, in it's comment, says: "Example how a certificate can be fetched programmatically using HTTP/S".
That was exactly what I wanted, so I've adapted it to work as a Servlet attending certificate requests (via a a proxy which validates them previously). But now, I'm testing it and I get the following error:
I'm using the URL mysite.com/ejbca/publicweb/apply/certreq because it's the URL specified within the sample code, and I thought it was a standard URL used for that purpose, but now I'm getting this error, I've looked for any reference to it and I haven't found anything.
Does anyone know what is the way in which it must be done? I'd appreciate any help on the matter.
Thank you.
PS: I'm using EJBCA 3.10.1 with JBOSS 4.2.3-GA
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
But now I have a doubt that I should have considered before. If I want to create new users, also programmatically, to be able to fetch certificates to them, the right way will be using the org.ejbca.core.ejb.ra.LocalUserAdminSessionBean addUser(..UserDataVO..) method? This is the method that seems to be the most appropiate that I've found, but I'll thank an expert confirmation (or correction, if proceeds).
Thank you again.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I am interested in automatically generating certificates for some users (given that I've somehow verified their identity previously, e.g., they are using a "disposable" link I've given to them - in a secure way -, for that purpose). I found the HttpGetCert.java sample program, which, in it's comment, says: "Example how a certificate can be fetched programmatically using HTTP/S".
That was exactly what I wanted, so I've adapted it to work as a Servlet attending certificate requests (via a a proxy which validates them previously). But now, I'm testing it and I get the following error:
I'm using the URL mysite.com/ejbca/publicweb/apply/certreq because it's the URL specified within the sample code, and I thought it was a standard URL used for that purpose, but now I'm getting this error, I've looked for any reference to it and I haven't found anything.
Does anyone know what is the way in which it must be done? I'd appreciate any help on the matter.
Thank you.
PS: I'm using EJBCA 3.10.1 with JBOSS 4.2.3-GA
The sample is rather old and the url is just outdated.
http://localhost:8080/ejbca/certreq
You can check how the public web pages work, they use the same servlet.
Cheers,
Tomas
PrimeKey Solutions offers commercial EJBCA and SignServer support subscriptions and training courses. Please see www.primekey.se or contact info@primekey.se for more information.
http://www.primekey.se/Services/Support/
http://www.primekey.se/Services/Training/
Ok. Thank you very much. It worked!
But now I have a doubt that I should have considered before. If I want to create new users, also programmatically, to be able to fetch certificates to them, the right way will be using the org.ejbca.core.ejb.ra.LocalUserAdminSessionBean addUser(..UserDataVO..) method? This is the method that seems to be the most appropiate that I've found, but I'll thank an expert confirmation (or correction, if proceeds).
Thank you again.
You are right again. The best example for using the ejb API should be the command line interface in modules/ejbca-ejb-cli.
Cheers,
Tomas