README.adoc 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. = X.509 + Form Login MFA Sample
  2. This sample demonstrates configuring Spring Security to require both an X.509 Certificate and a Username/Password Login in order to enter the site with full permissions.
  3. == Preparing to Use X.509
  4. This sample is intended to be used in a browser.
  5. As such, you should:
  6. 1. Configure your browser to trust the `ca.crt` that accompanies this project
  7. 2. Configure your browser with the `josh-keystore.p12` client certificate
  8. Both `api-keystore.p12` and `josh-keystore.p12` use keys signed by `ca.crt`.
  9. This means that after the above steps are performed, you can also use this application without getting a security warning in your browser.
  10. == Using the Sample
  11. To run, please use:
  12. .Java
  13. [source,java,role="primary"]
  14. ----
  15. ./gradlew :bootRun
  16. ----
  17. This will start an application on 8443, meaning you will need to reach it using HTTPS.
  18. You can reach the website at https://api.127.0.0.1.nip.io:8443.
  19. If that isn't working for you, please try https://localhost:8443.
  20. With the client certificate (`josh-keystore.p12`) correctly installed in the browser, it will ask you which client certificate you want to you.
  21. Select `josh`.
  22. You will then be redirected to the login page where you can use `josh/password` as the username and password.