Hiding sensitive data in GUI and logs
When deploying midPoint, you can pass it sensitive information like passwords through environment variables or Java configuration options. This article explains how midPoint ensures that these sensitive data are not revealed in the graphical user interface (GUI) and logs.
How sensitive data get to midPoint
The usual way sensitive data like database or trust store passwords get into midPoint is through configuration variables.
Those are passed to midPoint deployments through environment variables MP_SET_* or via Java options JAVA_OPTS:
for example, MP_SET_http_proxyPassword in the docker-compose.yaml file.
Where the sensitive data may be revealed
There are two places where the sensitive configuration options could show in plain text:
-
The JVM properties section of the About screen in the midPoint GUI
-
Standard output on midPoint startup
For example, the MP_SET_http_proxyPassword option shows as http.proxyPassword in the logs and ‑Dhttp.proxyPassword in the JVM properties section in the GUI.
How midPoint protects sensitive configuration
Most configuration options are left as they are and printed into logs and displayed in the GUI. However, for passwords and similarly sensitive information, such behavior is undesirable from the security perspective.
Since configuration variables cannot be annotated up front with some kind of sensitive meta information, midPoint uses an explicit list of variable names the values of which need to be hidden.
A value of any variable the name of which contains a string from the list below is concealed using asterisks:
-
apikey -
api-key -
api.key -
api_key -
credential -
datasource -
jdbcurl -
jdbcusername -
passwd -
password -
pwd -
secret -
token
The filter does not look for an exact match;
it is enough for a variable name to contain a substring from the list above.
Moreover, the filter is case insensitive.
As a result, for the initialPassword option, you see in the GUI this: ‑Dmidpoint.administrator.initialPassword=[*****].