-
Notifications
You must be signed in to change notification settings - Fork 40.8k
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 "Sanitize Sensitive Values" section in reference documentation #39094
Comments
As a side point, in the migration guide, the options for the
(emphasis is mine) In the current docs, the options are given as follows:
(emphasis mine) including the following note:
The migration guide is probably what most people read when upgrading to Spring Boot 3, and IMO it strongly implies that a sensible default, as previously, is being applied out of the box. |
For anybody coming from a search engine and looking for an example on how to get the previous behaviour back, see the comment from @welsh here: #32156 (comment). |
I've updated the migration guide to replace "sanitizing functions will apply" with "any user-defined sanitizing functions will still apply".
What do you mean by "previous config" here? |
Great, thank you very much. I think this will help avoid a lot of misunderstandings.
Sorry, you are correct. It seems I was thinking of the previous Health-only configuration (i.e. I suppose this, in tandem with keys being sanitized previously and my wrong interpretation of the migration guide, is where most of the confusion stems from for me. |
@filpano I think our reference documentation could also be improved. I've repurposed this issue to do that. |
@philwebb beyond the documentation updates was any consideration given to provide a default EDIT: just some additional thoughts - I like the security changes (i.e. |
@datagitlies please see #33448. |
@wilkinsona I still believe a better example |
As explained in the issue to which I linked, we don't feel that we can do that:
We think it's safer if users provide their own, limited to their specific needs. |
My expectation is not that |
@datagitlies I think I see what you're getting at. I've raised #39243 so we can consider our options. |
In Spring Boot 3, the Actuator security settings have changed somewhat, specifically with regard to the sanitization of potentially sensitive properties. Part of the reasoning for this (role-based vs. key-based) is given in #32156, which I do not question as being an improvement.
We currently use Spring Boot Admin and require an SSO administration login to see the UI which is populated by a service role with the
monitoring
role. This and other correctly configured monitoring tools now, per default, would show sensitive fields.Specifically given a previous config of
and a request matcher similar to the following:
which would semantically map to the new:
...would exhibit behaviour that is a drastic departure from the previous one w.r.t. sensitive information.
This is great for development - no doubt, but it was a bit of a shock to see it in action without an explicit and far more prominent warning that there is no default sanitizing function.
Since Spring Boot itself has a very opinionated approach to configuration, why do common-sense approaches allow us to use proper security practices (
WHEN_AUTHORIZED
with a specific system role) and still have potentially unsafe behaviour? The fact that a developer may need to be able to check a runtime configuration property does not immediately imply that they need access to sensitive values, with a sensible-looking configuration, per default.IMO it would be much better to require a sanitizing function when
WHEN_AUTHORIZED
is used, and perhaps - at the very least, provide aNoOpSanitizingFunction
that logs a suppressable warning. No one likes a silent breaking change.The text was updated successfully, but these errors were encountered: