-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Add a TLS profile (back and front) to run the development server in HTTPS #8138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 ? |
ruddell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also there is an extra space before start
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.