Trust Store and Key Store Configuration (2024)

Introduction

Communications between a client and a server can be secured using TLS/SSL (TLS is the new version of the standard that was previously called SSL, but the term SSL is still widely used). This security includes encryption, authentication of the server by the client, and optionally authentication of the client by the server.

In Nuxeo, the kinds of communications that can be secured in this manner depend on the services used. Among them one can find:

  • remote HTTPS servers with which Nuxeo needs to communicate (for example Nuxeo Online Services)
  • connection to Elasticsearch
  • connection to MongoDB
  • etc.

Each time a connection is made to a remote server using SSL, the remote server's certificate is checked against the Trust Store of the client. The Trust Store contains a list of known certificates for various certification authorities. During authentication, the remote server presents a certificate signed by a certification authority (or a self-signed certificate) known by the Trust Store.

Optionally, the server can request that the client authenticate itself to the server by providing a client certificate. The Key Store contains the private keys for the certificates that the client can provide to the server upon request.

The JVM contains a default Trust Store that contains standard well-known certificates. This can be replaced globally by a custom Trust Store using Java system properties. And for Nuxeo services that have the capability, a specific Trust Store and Key Store can be used for this specific service.

Default Trust Store

The JVM contains a default Trust Store in:

$JAVA_HOME/lib/security/cacerts

This Trust Store contains all the certificates of well-known certification authorities. By default, the password for this Trust Store is "changeit".

It is not recommended that you modify this default Trust Store, given that it is shipped with your JVM and will be updated with it. Instead you could make a copy and add certificates to the copy, and use the section below to use this copy as your custom global Trust Store.

Custom Global Trust Store and Key Store

To set up a custom global Trust Store and Key Store, you just have to add the following system properties to Java:

What forParameter name
Trust Store Pathjavax.net.ssl.trustStore
Trust Store Passwordjavax.net.ssl.trustStorePassword
Trust Store Typejavax.net.ssl.trustStoreType
Key Store Pathjavax.net.ssl.keyStore
Key Store Passwordjavax.net.ssl.keyStorePassword
Key Store Typejavax.net.ssl.keyStoreType

For instance you could add the following parameters to your JAVA_OPTS:

$NUXEO_HOME/bin/nuxeo.conf

trustStore

JAVA_OPTS=$JAVA_OPTS -Djavax.net.ssl.trustStore=/path/to/truststore.jks -Djavax.net.ssl.trustStoreType=jks -Djavax.net.ssl.trustStorePassword=changeit

keyStore

JAVA_OPTS=$JAVA_OPTS -Djavax.net.ssl.keyStore=/path/to/keystore.jks -Djavax.net.ssl.keyStoreType=jks -Djavax.net.ssl.keyStorePassword=changeit

Adding Your Certificates to the default Trust Store

To add your certificates to the default Trust Store:

  1. Copy the default Trust Store.
  2. Launch the following command line to add your certificate to the copy:

    keytool -import -file /path/to/certificate.pem -alias NameYouWantToGiveOfYourCertificate -keystore /path/to/copy/of/default/truststore.jks -storepass changeit
  3. Set the trust store copy as your custom trust store.

  4. Restart your Nuxeo instance.

Service-specific Trust Store and Key store

For some Nuxeo services, it's possible to configure individually a Trust Store and Key Store without touching the global JVM Trust Store and Key Store.

Elasticsearch

Use the following nuxeo.conf properties:

  • elasticsearch.restClient.truststore.path
  • elasticsearch.restClient.truststore.password
  • elasticsearch.restClient.truststore.type
  • elasticsearch.restClient.keystore.path
  • elasticsearch.restClient.keystore.password
  • elasticsearch.restClient.keystore.type

See the Elasticsearch Configuration page for more.

MongoDB

Use the following nuxeo.conf properties:

  • nuxeo.mongodb.ssl=true
  • nuxeo.mongodb.truststore.path
  • nuxeo.mongodb.truststore.password
  • nuxeo.mongodb.truststore.type
  • nuxeo.mongodb.keystore.path
  • nuxeo.mongodb.keystore.password
  • nuxeo.mongodb.keystore.type

See the MongoDB Configuration page for more.

Troubleshooting

If your Nuxeo instance cannot access Nuxeo Online Services anymore, or the Marketplace and Hot Fixes are no longer automatically available (through the Update Center for instance), this can mean that the Trust Store does not contain the certificates from the authority that signed the Nuxeo Online Services certificates, which are normally part of the default JVM Trust Store.

If you have the following error in your logs during the connection establishment:

sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

It means that the remote certificate is not trusted.

The following messages mean there is no Trust Store set for your JVM:

java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

or

java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl)

This means you must have broken at least the default configuration.

If you have one of the following error, the remote server has been trusted but it asks for authentication and there is no key for that:

Received fatal alert: handshake_failure

or

Remote host closed connection during handshake

The following error can mean that a configured Key Store is not available:

java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl)
Trust Store and Key Store Configuration (2024)
Top Articles
How Travel Insurance Covers Family Members
Why Home Staging is Important? and How Virtual Method Contributes Positively l RICOH360 Blog
123 Movies Black Adam
Craigslist Cars Augusta Ga
EY – все про компанію - Happy Monday
Tx Rrc Drilling Permit Query
Tap Tap Run Coupon Codes
How to Type German letters ä, ö, ü and the ß on your Keyboard
Minn Kota Paws
House Share: What we learned living with strangers
Progressbook Brunswick
Tripadvisor Near Me
Cool Math Games Bucketball
سریال رویای شیرین جوانی قسمت 338
Used Drum Kits Ebay
Best Suv In 2010
Midlife Crisis F95Zone
Find Such That The Following Matrix Is Singular.
Fdny Business
NBA 2k23 MyTEAM guide: Every Trophy Case Agenda for all 30 teams
Ratchet & Clank Future: Tools of Destruction
Busted Newspaper Fauquier County Va
Juicy Deal D-Art
Mail.zsthost Change Password
Iu Spring Break 2024
Sodium azide 1% in aqueous solution
Glover Park Community Garden
Reser Funeral Home Obituaries
Afni Collections
Craigslist Fort Smith Ar Personals
Craigslist Northern Minnesota
Criglist Miami
In hunt for cartel hitmen, Texas Ranger's biggest obstacle may be the border itself (2024)
Swimgs Yuzzle Wuzzle Yups Wits Sadie Plant Tune 3 Tabs Winnie The Pooh Halloween Bob The Builder Christmas Autumns Cow Dog Pig Tim Cook’s Birthday Buff Work It Out Wombats Pineview Playtime Chronicles Day Of The Dead The Alpha Baa Baa Twinkle
Worlds Hardest Game Tyrone
Amici Pizza Los Alamitos
Workday Latech Edu
Ippa 番号
Cross-Border Share Swaps Made Easier Through Amendments to India’s Foreign Exchange Regulations - Transatlantic Law International
Gwu Apps
Wsbtv Fish And Game Report
Legit Ticket Sites - Seatgeek vs Stubhub [Fees, Customer Service, Security]
R/Moissanite
World Social Protection Report 2024-26: Universal social protection for climate action and a just transition
Craigslist Com Panama City Fl
Gopher Hockey Forum
Royals Yankees Score
Craigslist Com St Cloud Mn
300+ Unique Hair Salon Names 2024
Christie Ileto Wedding
Gear Bicycle Sales Butler Pa
Latest Posts
Article information

Author: Margart Wisoky

Last Updated:

Views: 6229

Rating: 4.8 / 5 (58 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Margart Wisoky

Birthday: 1993-05-13

Address: 2113 Abernathy Knoll, New Tamerafurt, CT 66893-2169

Phone: +25815234346805

Job: Central Developer

Hobby: Machining, Pottery, Rafting, Cosplaying, Jogging, Taekwondo, Scouting

Introduction: My name is Margart Wisoky, I am a gorgeous, shiny, successful, beautiful, adventurous, excited, pleasant person who loves writing and wants to share my knowledge and understanding with you.