---
title: ProtectedContextValues System Parameter - Mask Context Property Values
description: "ProtectedContextValues masks the values of named context properties, such as passwords or file names, whenever Nodinite shows a Log Event's context: in Log Views, in the Web API, and in Resend and Repair. JSON array of Key and DisplayValue pairs."
---

# ProtectedContextValues - System Parameter

The **ProtectedContextValues** [System Parameter][System Parameters] masks the values of named context properties whenever :Nodinite: shows a [Log Event][]'s context: on the **Context Values** tab in [Log Views][] in the [Web Client][], in the [Web API][], and in Resend and Repair. Use it for sensitive data such as passwords, secrets, or file names that users with access to context data shouldn't see. Context properties are described with the Log Event and its [Context Options][].

![An invoice Log Event's Context Values showing an SFTP password and user in clear, ProtectedContextValues opened from the System Parameters list and given two keys, the password with DisplayValue null and the user with its own text, saved, then the same event showing eight asterisks and the user's text, and finally the Web API's GetMessageContext answer with the same masks, animated walkthrough (7.12)][Hero]  
*Animated walkthrough: two SFTP context properties of an invoice event are listed in **ProtectedContextValues**. The same event then shows `********` for the password and the chosen text for the user, and the [Web API][] returns the same masks.*

1. Open a Log Event's **Context Values** tab: the `Contoso.Sftp#Password` and `Contoso.Sftp#User` values show in clear.
2. Filter the [System Parameters][] list on *Protected* and open **ProtectedContextValues**.
3. List the two keys: the password with `"DisplayValue": null`, the user with `"*** SFTP user hidden ***"`. **Save**.
4. Open the same event's **Context Values** again: the password shows `********` and the user shows the display value.
5. The Web API's `GET api/Message/GetMessageContext` returns the same masked values.

## :fa-table: At a Glance {#at-a-glance}

| Property | Value |
| --- | --- |
| Key | `ProtectedContextValues` |
| Data type | json |
| Default | Empty (nothing is masked) |
| Read by | [Web API][] (the Web Client shows what it returns) and [Logging Service][] |
| Takes effect | Within about 15 seconds; no restart needed |
| Status | ✅ Active |
| Since | :Nodinite: 4.3.0.24 |

## :fa-gears: How It Works

Which users may see context data at all is set per [Role][Roles] with the [Permission Set for Log Views][]. For everyone who may see it, administrators included, **ProtectedContextValues** replaces the value of each listed context property with its display value when the context is read:

* the **Context Values** tab of a Log Event in every [Log View][Log Views], the [Admin view][Log Views Overview] included;
* the Web API's context, `GET api/Message/GetMessageContext` and the Log Event endpoints that return `Context`;
* Resend and Repair, which use the masked context. A Webhook header taken from a protected key ([ResendWebhookSettings][]) carries the mask.

The [Logging Service][] reads the context through the same masking while it processes events, so a [Search Field][Search Fields] that extracts a protected key stores the mask, not the value.

**The stored context doesn't change.** Remove a key from the parameter, and the event shows its value again, also for events logged while the key was listed. To remove a context property before it is stored, use [ContextPropertiesFilters][] instead.

The message body isn't masked; exports and the [Log Audit][Log Audits] don't contain context values.

Context properties come from many sources, for example HTTP headers, BizTalk Server context properties, MuleSoft business events, and [Azure Logic Apps][] tracked properties. A common case is BizTalk Server dynamic send ports, which can carry FTP passwords in the context.

> [!TIP]
> To mask data inside message payloads (XML, JSON, flat files), use [Stylesheets][].

## :fa-code: Value Format

The value is a JSON array with one entry per context property to mask:

| Property | Type | Meaning |
| --- | --- | --- |
| `Key` | string | The full name of the context property to mask. It must match the context property's name exactly, including case. |
| `DisplayValue` | string or `null` | The text shown instead of the value. When `null`, `********` (eight asterisks) is shown. |

### Mask a File Name

```json
[
  {
    "Key": "http://schemas.microsoft.com/BizTalk/2003/file-properties#ReceivedFileName",
    "DisplayValue": "*** hidden filename ***"
  }
]
```

*Example: hide the received file name in Log Events from BizTalk Server.*  

### Mask Several Context Properties

```json
[
  {
    "Key": "http://schemas.microsoft.com/BizTalk/2003/file-properties#ReceivedFileName",
    "DisplayValue": "*** hidden filename ***"
  },
  {
    "Key": "MySchema#Password",
    "DisplayValue": "******** [password is hidden]"
  },
  {
    "Key": "MySchema#SecureValue",
    "DisplayValue": null
  }
]
```

*Example: three masked context properties; the last one shows the default mask `********`.*  

## :fa-hand-point-right: Next Steps

* :fa-hard-drive: [Log Views][]  
* :fa-shield-halved: [Permission Set for Log Views][]  
* :fa-pen-to-square: [Manage System Parameters][]  

## :fa-link-horizontal: Related Topics

* :fa-trash-can: [ContextPropertiesFilters][] - Remove context properties instead of masking them  
* :fa-eye-slash: [HideAdditionalFieldValuesInLogViews][] - Show, hide, or mask built-in event fields  
* :fa-search-minus: [HideSearchFieldValuesInLogViews][] - Hide Search Field values not in the Log View  
* :fa-file-lines: [Stylesheets][] - Mask data in message payloads  
* :fa-list-check: [Context Options][]  
* :fa-cog: [System Parameters][]  

[Azure Logic Apps]:{ndr}/Logging%20and%20Monitoring/Azure%20Logic%20Apps/Overview.md
[Context Options]:{ndr}/Core%20Services/Log%20Event/Features/Context%20Options.md
[ContextPropertiesFilters]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/ContextPropertiesFilters.md
[Hero]:{ndm}/Documentation%20Pictures/IM/CoreServices/ConfigurationDatabase/SystemParameters/SystemParameters_ProtectedContextValues.gif
[HideAdditionalFieldValuesInLogViews]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/HideAdditionalFieldValuesInLogViews.md
[HideSearchFieldValuesInLogViews]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/HideSearchFieldValuesInLogViews.md
[Log Audits]:{ndr}/Administration/6.%20Tools/2.%20Log%20Audit%20Search.md
[Log Event]:{ndr}/Core%20Services/Log%20Event/Overview.md
[Log Views]:{ndr}/Administration/1.%20Log%20Management/1.%20Log%20Views/Features/What%20is%20a%20Log%20View.md
[Log Views Overview]:{ndr}/Administration/1.%20Log%20Management/1.%20Log%20Views/Overview.md
[Logging Service]:{ndr}/Core%20Services/Logging%20Service/Overview.md
[Manage System Parameters]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/Manage%20System%20Parameters.md
[Permission Set for Log Views]:{ndr}/Administration/3.%20Access%20Management/1.%20Roles/Features/Permission%20Set%20for%20Log%20Views.md
[ResendWebhookSettings]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/ResendWebhookSettings.md
[Roles]:{ndr}/Administration/3.%20Access%20Management/1.%20Roles/Features/What%20is%20a%20Role.md
[Search Fields]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/What%20is%20a%20Search%20Field.md
[Stylesheets]:{ndr}/Administration/4.%20Customize/2.%20Stylesheets/Features/What%20is%20a%20Stylesheet.md
[System Parameters]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/Overview.md
[Web API]:{ndr}/Core%20Services/Web%20API/Overview.md
[Web Client]:{ndr}/Core%20Services/Web%20Client/Overview.md