Project

General

Profile

How to pass a certificate and passphrase in an HTTPConnector?

Added by Michel Franck about 8 years ago

Hi guys,

I'm trying to reuse the GOCDB view that Cyril provided me with:

<connector type="HTTPConnector">
            <parameter name="url">https://goc.egi.eu/gocdbpi/private/?method=get_service_group</parameter>
            <parameter name="certificate" eval="property('certificate.path')"/>
            <parameter name="passphrase" eval="property('certificate.password')"/>
</connector>

    

How do I configure the certificate.path and certificate.password properties?
I'm using Lavoisier 4.

Thx,
Franck.


Replies (4)

RE: How to pass a certificate and passphrase in an HTTPConnector? - Added by L'Orphelin Cyril about 8 years ago

Hi

This part is independent from the version of Lavoisier .
These properties are set up into the file lavoisier-config.properties (into the directory : $lavoisier-home/etc )

Examples : certificate.path=/opt/lavoisier/certificate
certificate.password=my_password

For the passwords if you want to declare it into the properties but you want to hide these properties into the console you need to declare the list of the keys into lavoisier-hidden-properties.txt (into the directory : $lavoisier-home/etc ) in the previous example you have just to declare certificate.password in the file.

Regards

RE: How to pass a certificate and passphrase in an HTTPConnector? - Added by Michel Franck about 8 years ago

Ok great, worked straight away!

Two remarks:
  • in the start logs I get this trace, but the service starts fine anyway.
    ao¹t 23, 2013 9:36:31 AM fr.in2p3.lavoisier.security.UserPasswordAuthN getInstance
    INFO: AuthN properties file does not exist security/lavoisier-passwords.properties
  • for a Windows system, the file path should look like this:
    certificate.path=/C:/Users/username/... (in case you want to document it somewhere)

Thank you,
Franck.

RE: How to pass a certificate and passphrase in an HTTPConnector? - Added by Reynaud Sylvain about 8 years ago

Hi Franck,

The lavoisier-passwords.properties is needed only for password-based authentication, so you don't need it unless you want to authenticate to Lavoisier this way.

If you want your certificate path to be OS-independant, you can use the "user.home" system property as your base path:

certificate.path=${user.home}/yourcert.p12

Regards,
Sylvain

    (1-4/4)