Skip to content

Enhancement - Spring Boot 3 - Limited options of org.springframework.boot.actuate.endpoint.Show allow sensitive values to be displayed #33989

@solidjb

Description

@solidjb

Before Spring Boot 3, there were certain keys that were automatically masked on the /env point. Users were also able to configure other keys to be masked.

With Spring Boot 3, however, we now have 3 choices NEVER show any values (i.e. always mask every value), ALWAYS show values (i.e. never mask any value) and WHEN_AUTHORIZED (i.e. never mask any value as long as the caller has been authorized)

In our use case, we protect the /env endpoint with opaque token authorization, and a required scope. If the user is not authorized, then we do not even let them see the endpoint response at all (they will get a 401). But if the user is authorized, then they can see the values of every key - even key/values that were provided by a secret manager.

With the 3 options we have above, NEVER/ALWAYS/WHEN_AUTHORIZED - every value will be shown or masked. There is no ability to mix. I believe it would be beneficial to provide some mechanism to allow some values to be shown while other values are masked. That could be a configurable list of keys (or keySuffixes/keyPrefixes) or one could configure the masking by source name or something.

I think the new enum is too limited and needs to be enhanced.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: declinedA suggestion or change that we don't feel we should currently apply

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions