Comments (1)
👋 @Swarup44 sorry for the slow reply!
Unfortunately, your report doesn't include enough information for me to tell you what's happening and TLS configuration issues can be tricky to debug. That said, I can say a little bit that should be helpful:
- TLS connections with MySQL definitely work with the current image, when configured correctly (example below).
- It's likely that you're encountering a TLS version mismatch or other configuration issue.
It's worth pointing out that modern MySQL servers prefer TLSv1.3 in a configuration
that doesn't seem to work with the Java 8 JVM used in the Archiva v2.2.9
image. (I didn't bother trying to figure out what the issue was in my tests, I just switched to TLSv1.2, which worked without any further configuration)
To see TLS (or SSL) connections working with the current image, you can use the following test on a *nix system, provided you have docker
+ certstrap
installed.
#
# Bootstrap a CA with certstrap. Use empty passphrases for this test.
#
certstrap init --common-name ArchivaTestAuth
certstrap request-cert --common-name MySQLDbTest
certstrap sign MySQLDbTest --CA ArchivaTestAuth
#
# Setup a mysql instance with SSL
#
mkdir -p mysql-certs
mv out/MySQLDbTest* mysql-certs/
mv mysql-certs/MySQLDbTest.key mysql-certs/server-key.pem
mv mysql-certs/MySQLDbTest.crt mysql-certs/server-crt.pem
#
# Create a docker network for the test
#
docker network create archivassltest
#
# Start a MySQL instance locally with TLS.
# Note that TLSv1.2 is explicitly set.
#
docker run -d --rm --name "mysql-test" \
--net=archivassltest \
-v ${PWD}/mysql-certs:/etc/ssl/mysql \
-e MYSQL_ROOT_PASSWORD=example \
-e MYSQL_DATABASE=archiva \
-e MYSQL_USER=archiva \
-e MYSQL_PASSWORD=archiva \
-p 3306:3306 \
mysql:8 \
--ssl-cert=/etc/ssl/mysql/server-crt.pem\
--ssl-key=/etc/ssl/mysql/server-key.pem \
--tls-version=TLSv1.2
#
# Setup the CA certs for this test
#
mkdir -p archiva-ca-certs
cp out/ArchivaTestAuth.crt archiva-ca-certs/
#
# Run archiva, using MySQL, the test CA cert, and requiring SSL. Note, the directive
# to both require SSL and verify the cert in the JDBC driver docs is sslMode=VERIFY_CA
#
# Archiva will be on port 8080
#
docker run --rm -d --name archiva \
--net=archivassltest \
-e DB_TYPE=mysql \
-e DB_USER=archiva \
-e DB_PASSWORD=archiva \
-e DB_HOST=mysql-test \
-e DB_PORT=3306 \
-e DB_NAME=archiva \
-v ${PWD}/archiva-ca-certs:/certs \
-e 'MYSQL_JDBC_PARAMS=sslMode=VERIFY_CA' \
-p 8080:8080 \
xetusoss/archiva:v2.2.9
Once, you've verified it works, you can tear it down with
docker stop archiva
docker stop mysql-test
docker network remove archivassltest
rm -rf mysql-certs
rm -rf out
from docker-archiva.
Related Issues (20)
- Running from example seems to hang on "Loading" HOT 2
- Support custom context path with environment variable HOT 7
- Artifacts are no longer stored under /archiva-data HOT 3
- What is the root password for Archiva Docker image? HOT 1
- while trying to push the artifact from jenkins(CI Job) to nexus.Error:"HTTP method PUT is not supported by this URL". HOT 1
- Latest openjdk:8 image breaks builds due to cacerts being moved.
- Error creating bean with name 'authenticationInterceptor#rest' HOT 2
- Hello, I'm new to docker. How easy would it be to add the $PORT env variable as a configuration parameter ? Thanks HOT 1
- validation_mail: user and password set via env variable HOT 2
- Container does not start as expected (HTTP ERROR 404) HOT 2
- How to set rest.baseUrl if behind proxy. HOT 2
- can't create directory '/archiva-data/data': Permission denied HOT 6
- Increase upload size HOT 9
- Add support for ARM 64 HOT 2
- Critical Log4j RCE bug (CVE-2021-44228) HOT 2
- Dockerhub tag `latest` does not seem to get updated HOT 1
- Write migration guide to reposilite
- Archiva 2.2.10 HOT 1
- Adding port 8443 to port list HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-archiva.