这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@PierreBesson
Copy link
Contributor

Linked to #8134

To try:

  • mvn -Pdev,tls for the back-end (not yet sure if this work for gradle)
  • yarn/npm start-tls for the front-end

This lets users run in https mode without breaking classic http.

  • Travis tests are green
  • Tests are added where necessary
  • Documentation is added/updated where necessary
  • Coding Rules & Commit Guidelines as per our CONTRIBUTING.md document are followed

done();
} else {
shelljs.mkdir('-p', `${SERVER_MAIN_RES_DIR}config/ssl`);
shelljs.mkdir('-p', `${SERVER_MAIN_RES_DIR}config/tls`);
Copy link
Member

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

Copy link
Contributor Author

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.
Copy link
Member

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.

@PierreBesson PierreBesson force-pushed the tls-profile branch 2 times, most recently from 76f0063 to 2e5e95a Compare August 23, 2018 12:08
+ '-keyalg RSA '
+ '-alias selfsigned '
+ `-keystore ${keyStoreFile} `
+ '-storepass password '
Copy link
Contributor Author

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 😄.

@PierreBesson
Copy link
Contributor Author

We will need extensive documentation changes for this.

@atomfrede
Copy link
Member

I will check if we can have a similar approach in grade (should be no problem I guess).

@PierreBesson
Copy link
Contributor Author

Oh I made it work for gradle.

'/h2-console',
'/auth'
],
target: 'http://127.0.0.1:<%= serverPort %>',
Copy link
Member

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.

Copy link
Contributor Author

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.

@PierreBesson
Copy link
Contributor Author

@jhipster/developers Can someone review this ?

Copy link
Member

@ruddell ruddell left a 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",
Copy link
Member

@ruddell ruddell Sep 4, 2018

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
...

Copy link
Member

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

Copy link
Member

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",

@PierreBesson
Copy link
Contributor Author

I fixed the issue with npm run.

@ruddell ruddell merged commit cf839c0 into jhipster:master Sep 13, 2018
@jdubois jdubois added this to the 5.3.2 milestone Sep 17, 2018
@jdubois jdubois changed the title Add a TLS profile (back and front) to run the development server in https Add a TLS profile (back and front) to run the development server in HTTPS Sep 17, 2018
@PierreBesson PierreBesson mentioned this pull request Nov 12, 2018
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants