<port> in the following is either 8076 for http (dev mode) or 8443 for https (prod mode) === Database initialization An H2 in-memory database is used for this project, initialized at startup. The database is initialized using http(s)://flywaydb.org/[flyway].
You can browse the database here: http(s)://localhost:<port>/h2-console entering in JDBC URL the following: jdbc:h2:mem:testdb
Users with ADMIN role can access the REST endpoint for user(s):
http(s)://localhost:<port>/api/users
To create the keystore for Tomcat HTTPS the following command was used (password is 'tomcat'):
keytool -genkey -alias tomcat -storetype PKCS12 -keyalg RSA -keysize 2048 -keystore keystore.p12 -validity 4000
To create the keystore for JWT signing the following command was used:
keytool -genkeypair -alias jwt -keyalg RSA -keypass jwtjwt -keystore jwt.jks -storepass jwtjwt -validity 4000
Then to export the public key separately the command:
keytool -list -rfc --keystore jwt.jks | openssl x509 -inform pem -pubkey
Then copy paste only the Public Key to a separate file. (This command needs openssl installed on your machine. Alternatively you can use a tool like Keystore Explorer for the export).