Comments (7)
On my side the server does not start with nohup mvn spring-boot:run &
I start it with sudo mvn spring-boot:run &
instead.
Your fix worked and the tests pass
from mutual-tls-ssl.
Awesome, really glad to hear it worked! Thank you again for pointing out the issue, thanks to you the project is more robust! 🎉
from mutual-tls-ssl.
Greetings, dear human. Good project, have my star
👋🏼 🙇🏼 🎉 🥳
Hi Nikola,
Thank you for trying out this project, giving it a star and sharing your issues! The build is passing, see here: https://github.com/Hakky54/mutual-tls-ssl/actions So I doubt there is a regression, but maybe there is a bug or something else which needs to improved? Let's try to find the solution!
It looks like the server and client project is not able resolve certificates although you see that everything is present. I think the server/client is not able to find it as it may not be present at the classpath during startup-time/runtime, but this is an assumption... Do you start the server through Maven or through your Intellij IDEA/Eclipse?
If you do start the server through maven you can try to run mvn package
first to make sure the server can load the files from the classpath. Can you retry and share your results?
from mutual-tls-ssl.
Greetings
I believe the issue is with client, not with server
I ran mvn package
in client folder and I got this error just now
[ERROR] Failures:
[ERROR] ClientConfigShould.createCxfWebClientWithSecurity:341
Expecting a throwable with root cause being an instance of:
java.net.ConnectException
but was an instance of:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Please note that the truststore is where it should be according to readme
from mutual-tls-ssl.
Hmm, thats strange. I did the exact same thing on my side and not getting the same issue. I would like to replicate the same behaviour as what you got.
So your environment is Ubuntu 18. Which java and maven are you using? Can you share the result of mvn -v
and java -version
from mutual-tls-ssl.
java -version
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.18.04)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.18.04, mixed mode, sharing)
javac -version
javac 11.0.11
echo $JAVA_HOME
/usr/lib/jvm/java-11-openjdk-amd64
mvn -v
Apache Maven 3.6.0
Maven home: /usr/share/maven
Java version: 11.0.11, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "5.4.0-80-generic", arch: "amd64", family: "unix"
Items were installed with the following commands
sudo apt install default-jre
sudo apt install default-jdk
sudo apt install maven
Maven is 3.6 instead of the requested 3.5 in readme, but the friend I mentioned in original post used the same and did not have this issue, so I ruled it out as the cause. I got my Ubunto disk from him, so I also ruled out the OS version as the cause.
from mutual-tls-ssl.
I have prepared the same setup as you mentioned and in my case only 2 http clients failed (Apache CXF based).
I have pushed the fix to the master branch. In your case all of the http clients failed, that didn't happen on my side. So I am not sure what the cause is although the Ubuntu, Java and Maven versions are the same.
So what I did was:
- Clone the project
- Run the script:
./script/configure-one-way-authentication.sh
- Rebuild project from the project root directory:
mvn clean install
- cd to server and start it:
cd server-with-spring-boot/ && nohup mvn spring-boot:run &
- cd to client and start it:
cd client/ && mvn exec:java
Can you retry with the latest commit? If it still not works we can do a remote pair-programming session and in that way I can analyse your issue more in dept.
from mutual-tls-ssl.
Related Issues (19)
- javax.net.ssl.SSLException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty HOT 33
- 找不到客户端启动ssl认证的配置 HOT 4
- class path resource [identity.jks] cannot be resolved to URL because it does not exist HOT 5
- Asking help about the No Subject Alternative Name HOT 4
- Asking help about the check the Certificate Status with OCSP with TLS Connection? HOT 1
- Can't call the server with 2-way TLS based on trusting CA authority - javax.net.ssl.SSLHandshakeException: None of the TrustManagers trust this server certificate chain HOT 7
- Access Server using curl command HOT 9
- A request for examples using standard servers with JAX-RS instead of SpringBoot HOT 1
- Server example with jersey and tomcat HOT 1
- Server example with jboss wildfly HOT 1
- alias does not exist HOT 2
- Missing instructions for running ClientRunnerIT HOT 3
- Server with HttpsServer from com.sun.net.httpserver HOT 12
- Build with mvn is not working HOT 2
- Specif CLASSPATH setting instructions would be beneficial HOT 3
- An explicit instructions which tell how I can run ClientRunnerIT would be beneficial. HOT 3
- Enable Client Cert validation only for a single end point at Service end (Spring Boot Java)? HOT 6
- Invalid Keystore Format HOT 11
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 mutual-tls-ssl.