GithubHelp home page GithubHelp logo

Comments (7)

nikola-shekerev avatar nikola-shekerev commented on September 18, 2024 2

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.

Hakky54 avatar Hakky54 commented on September 18, 2024 2

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.

Hakky54 avatar Hakky54 commented on September 18, 2024

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.

nikola-shekerev avatar nikola-shekerev commented on September 18, 2024

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.

Hakky54 avatar Hakky54 commented on September 18, 2024

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.

nikola-shekerev avatar nikola-shekerev commented on September 18, 2024
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.

Hakky54 avatar Hakky54 commented on September 18, 2024

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:

  1. Clone the project
  2. Run the script: ./script/configure-one-way-authentication.sh
  3. Rebuild project from the project root directory: mvn clean install
  4. cd to server and start it: cd server-with-spring-boot/ && nohup mvn spring-boot:run &
  5. 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.