Skip to content
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

Add better message for jwtSecret and rememberMe keys with jhipster info #19715

Merged
merged 9 commits into from
Sep 15, 2022

Conversation

mraible
Copy link
Contributor

@mraible mraible commented Sep 12, 2022

A better alternative might be to delete the keys altogether since they'll be regenerated.

Matt Raible added 2 commits September 12, 2022 09:09
        ██╗ ██╗   ██╗ ████████╗ ███████╗   ██████╗ ████████╗ ████████╗ ███████╗
        ██║ ██║   ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
        ██║ ████████║    ██║    ███████╔╝ ╚█████╗     ██║    ██████╗   ███████╔╝
  ██╗   ██║ ██╔═══██║    ██║    ██╔════╝   ╚═══██╗    ██║    ██╔═══╝   ██╔══██║
  ╚██████╔╝ ██║   ██║ ████████╗ ██║       ██████╔╝    ██║    ████████╗ ██║  ╚██╗
   ╚═════╝  ╚═╝   ╚═╝ ╚═══════╝ ╚═╝       ╚═════╝     ╚═╝    ╚═══════╝ ╚═╝   ╚═╝
                            https://www.jhipster.tech
Welcome to JHipster v7.9.3

##### **JHipster Version(s)**

```
[email protected] /Users/mraible/dev/generator-jhipster
└── (empty)

```

##### **JHipster configuration, a `.yo-rc.json` file generated in the root folder**

<details>
<summary>.yo-rc.json file</summary>
<pre>

</pre>
</details>

##### **JDL for the Entity configuration(s) `entityName.json` files generated in the `.jhipster` directory**

<details>
<summary>JDL entity definitions</summary>

<pre>

</pre>
</details>

##### **Environment and Tools**

openjdk version "17.0.4" 2022-07-19
OpenJDK Runtime Environment GraalVM CE 22.2.0 (build 17.0.4+8-jvmci-22.2-b06)
OpenJDK 64-Bit Server VM GraalVM CE 22.2.0 (build 17.0.4+8-jvmci-22.2-b06, mixed mode, sharing)

git version 2.32.1 (Apple Git-133)

node: v16.17.0

npm: 8.15.0

Docker version 20.10.17, build 100c701

docker-compose version 1.29.2, build 5becea4c

Congratulations, JHipster execution is complete!
Sponsored with ❤️  by @oktadev. so maintainers know
@mraible
Copy link
Contributor Author

mraible commented Sep 14, 2022

@jhipster/developers What do you think about this change? Deleting the keys might be even better since they aren't needed to regenerate an app.

@mshima
Copy link
Member

mshima commented Sep 15, 2022

Removing should be the way imo.

const result = JSON.stringify({ …this.jhipsterConfig, jwtSecretKey: undefined, rememberMeKey: undefined }, null, 2);

Copy link
Member

@mshima mshima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me if it's omitting the sensitive fields correctly.

Co-authored-by: Marcelo Shima <[email protected]>
@mshima mshima enabled auto-merge (squash) September 15, 2022 14:54
@mshima mshima merged commit 697fa6c into main Sep 15, 2022
@mshima mshima deleted the better-jwt-key-message branch September 15, 2022 16:18
emilpaw pushed a commit to emilpaw/generator-jhipster that referenced this pull request Sep 15, 2022
* Add better message to INFO! Using bundled JHipster

        ██╗ ██╗   ██╗ ████████╗ ███████╗   ██████╗ ████████╗ ████████╗ ███████╗
        ██║ ██║   ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
        ██║ ████████║    ██║    ███████╔╝ ╚█████╗     ██║    ██████╗   ███████╔╝
  ██╗   ██║ ██╔═══██║    ██║    ██╔════╝   ╚═══██╗    ██║    ██╔═══╝   ██╔══██║
  ╚██████╔╝ ██║   ██║ ████████╗ ██║       ██████╔╝    ██║    ████████╗ ██║  ╚██╗
   ╚═════╝  ╚═╝   ╚═╝ ╚═══════╝ ╚═╝       ╚═════╝     ╚═╝    ╚═══════╝ ╚═╝   ╚═╝
                            https://www.jhipster.tech
Welcome to JHipster v7.9.3

##### **JHipster Version(s)**

```
[email protected] /Users/mraible/dev/generator-jhipster
└── (empty)

```

##### **JHipster configuration, a `.yo-rc.json` file generated in the root folder**

<details>
<summary>.yo-rc.json file</summary>
<pre>

</pre>
</details>

##### **JDL for the Entity configuration(s) `entityName.json` files generated in the `.jhipster` directory**

<details>
<summary>JDL entity definitions</summary>

<pre>

</pre>
</details>

##### **Environment and Tools**

openjdk version "17.0.4" 2022-07-19
OpenJDK Runtime Environment GraalVM CE 22.2.0 (build 17.0.4+8-jvmci-22.2-b06)
OpenJDK 64-Bit Server VM GraalVM CE 22.2.0 (build 17.0.4+8-jvmci-22.2-b06, mixed mode, sharing)

git version 2.32.1 (Apple Git-133)

node: v16.17.0

npm: 8.15.0

Docker version 20.10.17, build 100c701

docker-compose version 1.29.2, build 5becea4c

Congratulations, JHipster execution is complete!
Sponsored with ❤️  by @oktadev. so maintainers know

* Run prettier

* Update generators/info/index.js

* Update generators/info/index.js

* Update generators/info/index.js

* Update generators/info/index.js

* Update index.js

* drop useless `this.async/done`

* Update generators/info/index.js

Co-authored-by: Marcelo Shima <[email protected]>

Co-authored-by: Marcelo Shima <[email protected]>
@DanielFran DanielFran added this to the 8.0.0-beta.1 milestone Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants