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

Improve --help and documentation for "encodepassword -a/--algorithm" in the Spring Boot CLI #38203

Closed
manueljordan opened this issue Nov 3, 2023 · 2 comments
Assignees
Labels
type: documentation A documentation update
Milestone

Comments

@manueljordan
Copy link

About Spring Boot CLI 3.1.4 when is executed the ./spring --help encodepassword command appears:

./spring --help encodepassword
spring encodepassword - Encode a password for use with Spring Security

usage: spring encodepassword [options] <password to encode>

Option                    Description                            
------                    -----------                            
-a, --algorithm <String>  The algorithm to use (default: default)

examples:

    To encode a password with the default encoder:
        $ spring encodepassword mypassword

    To encode a password with pbkdf2:
        $ spring encodepassword -a pbkdf2 mypassword

Two things to consider:

  • About default: default is really BCrypt (I think it should be updated)
  • Should be listed all the possible valid values for -a/--algorithm

The improvements of both should be applied for the command's output and Reference documentation.

Thanks for your understanding

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 3, 2023
@philwebb philwebb added type: documentation A documentation update and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 6, 2023
@philwebb philwebb added this to the 2.7.x milestone Nov 6, 2023
@mhalbritter mhalbritter self-assigned this Nov 7, 2023
@mhalbritter mhalbritter changed the title Spring Boot CLI: Improve --help and documentation for "encodepassword -a/--algorithm" Improve --help and documentation for "encodepassword -a/--algorithm" in the Spring Boot CLI Nov 7, 2023
@mhalbritter mhalbritter modified the milestones: 2.7.x, 2.7.18 Nov 7, 2023
@mhalbritter
Copy link
Contributor

Now looks like this:

spring encodepassword - Encode a password for use with Spring Security

usage: spring encodepassword [options] <password to encode>

Option                    Description                                         
------                    -----------                                         
-a, --algorithm <String>  The algorithm to use. Supported algorithms: default,
                            bcrypt, pbkdf2. The default algorithm uses bcrypt 
                            (default: default)                                

examples:

    To encode a password with the default (bcrypt) encoder:
        $ spring encodepassword mypassword

    To encode a password with pbkdf2:
        $ spring encodepassword -a pbkdf2 mypassword

@manueljordan
Copy link
Author

Thanks for the quick update ... I assumed that for legacy support MD5 and SHA256 were possible too. Interesting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation A documentation update
Projects
None yet
Development

No branches or pull requests

4 participants