Sign inSign up

crashvb/ejbca

By crashvb

Updated over 3 years ago

Contains ejbca.

Image
1

2.2K

crashvb/ejbca repository overview

ejbca-docker

version) image size linting license

Overview

This docker image contains EJBCA.

Debugging jboss and ejbca

Modify ejbca install to use jboss cli password
sed --in-place '/--command=/r /dev/stdin' $EJBCA_HOME/bin/jboss.xml <<- EOF
        <arg value="--user=admin" />
        <arg value="--password=\${env.JBOSS_PASSWORD}" />
EOF
Expose ejbca cli arguments (including secrets!)
sed --in-place 's/ejbca:cli-hideargs/ejbca:cli/g' $EJBCA_HOME/bin/cli.xml
Enable trace logging for ejbca cli
for i in ERROR WARN INFO DEBUG ; do
        sed --in-place "s/$i/TRACE/g" $EJBCA_HOME/dist/ejbca-ejb-cli/log4j.xml
done
sed --in-place 's/false/true/g' $EJBCA_HOME/dist/ejbca-ejb-cli/log4j.xml
Enable trace logging for jboss remoting

Reference: http://www.mastertheboss.com/jboss-server/jboss-log/5-loggers-in-jboss-you-should-know-about

Add the following to /usr/share/jboss/standalone/configuration/standalone.xml

<logger category="org.jboss.remoting.remote">
        <level name="TRACE"/>
</logger>

Entrypoint Scripts

ejbca

The embedded entrypoint script is located at /etc/entrypoint.d/20ejbca and performs the following actions:

  1. A new ejbca configuration is generated using the following environment variables:
VariableDefault ValueDescription
EJBCA_ADMIN_PASSWORDrandomThe ejbca admin password.
EJBCA_CA_NAMEManagementCAThe name of the CA.
EJBCA_CA_DNCN=$EJBCA_CA_NAME,O=EJBCA Sample,C=SEThe distinguished name of the CA.
EJBCA_CA_KEY_SPEC4096The cryptographic key length.
EJBCA_CA_KEY_TYPERSAThe cryptography algorithm.
EJBCA_CA_POLICY_IDnull
EJBCA_CA_SIGNATURE_ALGORITHMSHA256WithRSAThe signature algorithm.
EJBCA_CA_TOKEN_PASSWORDnull
EJBCA_CA_VALIDITY_DAYS30The time, in days, for which the CA is valid.
EJBCA_DATABASE_HOSTejbca-dbThe ejbca database hostname. (mysql only)
EJBCA_DATABASE_NAMEejbcaThe ejbca database name. (mysql only)
EJBCA_DATABASE_PASSWORDrandomThe ejbca database password.
EJBCA_DATABASE_PORT3306The ejbca database port. (mysql only)
EJBCA_DATABASE_USERNAMEejbcaThe ejbca database username. (mysql only)
EJBCA_DATASOURCEh2The datasource type (h2, postgres, mariadb, etc ...)
EJBCA_KEYSTORE_PASSWORDrandomThe ejbca keystore password.
EJBCA_SERVER_NAMElocalhostThe name of the server.
EJBCA_SERVER_DNCN=$EJBCA_SERVER_NAME,O=EJBCA Sample,C=SEThe distinguished name of the server.
EJBCA_SUPERADMIN_CNSuperAdminThe common name of the administrator.
EJBCA_SUPERADMIN_DNCN=$EJBCA_SUPERADMIN_CNThe distinguised name of the administrator.
EJBCA_SUPERADMIN_KEYSTORE_BATCHEDtrue
EJBCA_TRUSTSTORE_PASSWORDrandomThe ejbca truststore password.

Standard Configuration

Container Layout
/
├─ etc/
│  └─ entrypoint.d/
│     └─ 20ejbca
├─ run/
│  └─ secrets/
│     ├─ ejbca_admin_password
│     ├─ ejbca_database_password
│     ├─ ejbca_keystore_password
│     └─ ejbca_truststore_password
├─ usr/
│  └─ share/
│     └─ ejbca/
└─ var/
   └─ lib/
      └─ ejbca/
         └─ p12/
            └─ superadmin.p12
Exposed Ports
  • 8080/tcp - (repurposed) Public HTTP port of your application server, used for clients to access the public web for information. Not to be used for enrollment since it's not encrypted.
  • 8442/tcp - Public HTTPS port (server side only SSL) of your application server, used for clients to access the public web for enrollment.
  • 8443/tcp - SSL protected HTTPS port used to access the EJBCA Admin GUI. This port requires client certificate for access.
Volumes
  • /var/lib/ejbca - EJBCA data directory.

See Also

Development

Source Control

Tag summary

Content type

Image

Digest

sha256:61fdc62a9

Size

360.4 MB

Last updated

over 3 years ago

docker pull crashvb/ejbca