Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overwrite Glassfish CA certs with OS certs #5034 #5045

Merged
merged 2 commits into from
Sep 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/sphinx-guides/source/installation/oauth2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ This template can be used for configuring this setting (**this is not something

- :download:`orcid-sandbox.json <../_static/installation/files/root/auth-providers/orcid-sandbox.json>`

Please note that the :doc:`prerequisites` section contains an step regarding CA certs in Glassfish that must be followed to get ORCID login to work.

Converting Local Users to OAuth
-------------------------------

Expand Down
12 changes: 12 additions & 0 deletions doc/sphinx-guides/source/installation/prerequisites.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,18 @@ This recommendation comes from http://www.c2b2.co.uk/middleware-blog/glassfish-4
# /usr/local/glassfish4/bin/asadmin start-domain
# /usr/local/glassfish4/bin/asadmin osgi lb | grep 'Weld OSGi Bundle'

The Certificate Authority (CA) certificate bundle file from Glassfish contains certs that expired in August 2018, causing problems with ORCID login.

- The actual expiration date is August 22, 2018, which you can see with the following command::

# keytool -list -v -keystore /usr/local/glassfish4/glassfish/domains/domain1/config/cacerts.jks

- Overwrite Glassfish's CA certs file with the file that ships with the operating system and restart Glassfish::

# cp /etc/pki/ca-trust/extracted/java/cacerts /usr/local/glassfish4/glassfish/domains/domain1/config/cacerts.jks
# /usr/local/glassfish4/bin/asadmin stop-domain
# /usr/local/glassfish4/bin/asadmin start-domain

Launching Glassfish on system boot
==================================

Expand Down
3 changes: 3 additions & 0 deletions scripts/vagrant/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ DOWNLOAD_DIR='/dataverse/downloads'
GLASSFISH_ZIP="$DOWNLOAD_DIR/glassfish-4.1.zip"
SOLR_TGZ="$DOWNLOAD_DIR/solr-7.3.0.tgz"
WELD_PATCH="$DOWNLOAD_DIR/weld-osgi-bundle-2.2.10.Final-glassfish4.jar"
# The CA certificate bundle files from CentOS are ok. Glassfish's are expired.
GOOD_CACERTS='/etc/pki/ca-trust/extracted/java/cacerts'
if [ ! -f $GLASSFISH_ZIP ] || [ ! -f $SOLR_TGZ ]; then
echo "Couldn't find $GLASSFISH_ZIP or $SOLR_TGZ! Running download script...."
cd $DOWNLOAD_DIR && ./download.sh && cd
Expand All @@ -55,6 +57,7 @@ if [ ! -d $GLASSFISH_ROOT ]; then
su $GLASSFISH_USER -s /bin/sh -c "cd $GLASSFISH_USER_HOME && unzip -q $GLASSFISH_ZIP"
su $GLASSFISH_USER -s /bin/sh -c "mv $GLASSFISH_ROOT/glassfish/modules/weld-osgi-bundle.jar /tmp"
su $GLASSFISH_USER -s /bin/sh -c "cp $WELD_PATCH $GLASSFISH_ROOT/glassfish/modules"
su $GLASSFISH_USER -s /bin/sh -c "cp $GOOD_CACERTS $GLASSFISH_ROOT/glassfish/domains/domain1/config/cacerts.jks"
else
echo "$GLASSFISH_ROOT already exists"
fi
Expand Down