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

Rectify incorrect sanitizing regex example provided in how-to docs #29951

Closed
dharley-gaggle opened this issue Feb 22, 2022 · 0 comments
Closed
Labels
type: documentation A documentation update
Milestone

Comments

@dharley-gaggle
Copy link

dharley-gaggle commented Feb 22, 2022

the spring-boot actuator documentation located at https://docs.spring.io/spring-boot/docs/2.1.x/reference/html/howto-actuator.html gives an incorrect regex example. stating: "It is also possible to use a regular expression instead, such as *credentials.* to sanitize any key that holds the word credentials as part of the key."
however, if done via code, such a regex (am targeting password for my development purposes, not credentials) generates an exception at startup: java.util.regex.PatternSyntaxException, dangling metacharacter '*'
and if done via application.yml property the application will not start, giving exception: org.yaml.snakeyaml.composer.ComposerException","exception_message":"found undefined alias password.*\n in 'reader', line 54, column 25:\n keys-to-sanitize: *password.*\n
the correct example for such a regex should be: .*credentials.*

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 22, 2022
@philwebb philwebb added this to the 2.5.x milestone Feb 22, 2022
@philwebb philwebb added type: documentation A documentation update and removed status: waiting-for-triage An issue we've not yet triaged labels Feb 22, 2022
@mbhave mbhave changed the title incorrect sanitizing regex example provided in actuator endpoint how-to docs Rectify incorrect sanitizing regex example provided in how-to docs Feb 22, 2022
@mbhave mbhave closed this as completed in a70fa80 Feb 22, 2022
@snicoll snicoll modified the milestones: 2.5.x, 2.5.10 Feb 23, 2022
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