Add a TLS profile (back and front) to run the development server in HTTPS#8138
Add a TLS profile (back and front) to run the development server in HTTPS#8138ruddell merged 8 commits intojhipster:masterfrom
Conversation
| done(); | ||
| } else { | ||
| shelljs.mkdir('-p', `${SERVER_MAIN_RES_DIR}config/ssl`); | ||
| shelljs.mkdir('-p', `${SERVER_MAIN_RES_DIR}config/tls`); |
There was a problem hiding this comment.
Sorry about that line, that broke the master branch, and I just fixed it, so you'll have a conflict here
There was a problem hiding this comment.
Rebased in order to remove this commit.
| @@ -0,0 +1,18 @@ | |||
| # =================================================================== | |||
| # To enable TLS in development, uncomment the the "server.ssl" properties below. | |||
There was a problem hiding this comment.
This comment should be updated as the lines aren't commented out anymore.
76f0063 to
2e5e95a
Compare
| + '-keyalg RSA ' | ||
| + '-alias selfsigned ' | ||
| + `-keystore ${keyStoreFile} ` | ||
| + '-storepass password ' |
There was a problem hiding this comment.
I'm a bit sad that the keystore password is password and not changeit as traditionally used 😄.
|
We will need extensive documentation changes for this. |
2e5e95a to
b28cc15
Compare
|
I will check if we can have a similar approach in grade (should be no problem I guess). |
|
Oh I made it work for gradle. |
b28cc15 to
a79e98b
Compare
| '/h2-console', | ||
| '/auth' | ||
| ], | ||
| target: 'http://127.0.0.1:<%= serverPort %>', |
There was a problem hiding this comment.
Not sure you should change the server port here, it's a parameter because people will probably want to change this for microservices.
There was a problem hiding this comment.
Sorry it was a mistake, I have fixed it.
74cfcdb to
dbe9024
Compare
dbe9024 to
9ad9a09
Compare
This reverts commit 90d2a7b.
|
@jhipster/developers Can someone review this ? |
There was a problem hiding this comment.
Works once the issue I pointed out is fixed
| "postinstall": "webdriver-manager update --gecko false", | ||
| <%_ } _%> | ||
| "start": "<%= clientPackageManager %> run webpack:dev", | ||
| "start-tls": "<%= clientPackageManager %> run start --env.tls", |
There was a problem hiding this comment.
This isn't passing --env.tls to webpack, you might need to add a webpack:dev-tls script or figure out how to pass the flag through the chain of npm scripts.
npm run start-tls
> mono@0.0.0 start-tls /private/tmp/jh/mono2
> npm run start --env.tls
> mono@0.0.0 start /private/tmp/jh/mono2
> npm run webpack:dev
...
There was a problem hiding this comment.
Also there is an extra space before start
There was a problem hiding this comment.
Another solution (although a bit ugly) could be to add -- -- to go through the 2 commands:
"start-tls": "<%= clientPackageManager %> run start -- -- --env.tls",
|
I fixed the issue with npm run. |
e231876 to
db6831d
Compare
Linked to #8134
To try:
mvn -Pdev,tlsfor the back-end (not yet sure if this work for gradle)yarn/npm start-tlsfor the front-endThis lets users run in https mode without breaking classic http.