> For the complete documentation index, see [llms.txt](https://docs.fortifiedid.se/integrity-radius/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fortifiedid.se/integrity-radius/2.0-integrity-radius/authenticators/common-configuration/response-attributes.md).

# Response attributes

Response attributes can be configured for the following message types:

* Access-Accept
* Access-Challenge
* Access-Reject

Which attribute to set is specified using type code or name. The value supports property expansion (see below) and supports vendor specific attributes using the special syntax:

```json
"value": "<vendor-id>:<sub-type>:<value>"
```

{% hint style="info" %}
Vendor specific attributes can only be added as attribute 26 (Vendor-Specific).
{% endhint %}

Attribute `operation` controls how the configured attribute should be "added" to the specified response:

* `CREATE`: Attribute is created if and only if an attribute of same type does not already exist in the response (default).
* `ADD`: Attribute is added and the result may contain multiple attributes of the same type.
* `REPLACE`: Existing attributes (zero, one or many) of same type is replaced.
* `COPY`: All attribute of configured type is copied from request.

{% tabs %}
{% tab title="Properties" %}

<table><thead><tr><th width="295">Name</th><th>Description</th></tr></thead><tbody><tr><td><code>type</code></td><td>Attribute type. Mandatory unless <code>name</code> is specified.</td></tr><tr><td><code>name</code></td><td>Attribute name. Mandatory unless <code>type</code> is specified.</td></tr><tr><td><code>value</code></td><td>Attribute value. Supports property expansion.</td></tr><tr><td><code>operation</code></td><td>Attribute operation (Default: <code>"CREATE"</code>)</td></tr></tbody></table>
{% endtab %}

{% tab title="Example" %}

```json
{
    "type": 18,
    "name": "Reply-Message",
    "value": "Have a nice day! (This message was generated at {{{now}}} [{{{request.name}}}#{{{request.id}}}])"
}
```

{% endtab %}
{% endtabs %}

Property expansion context contains the following scopes:

* Request (`"request"`)
* Session (`"session"`)
* Pipe response Item (`"item"`)

{% hint style="warning" %}
The result of an expansion expression is always a string
{% endhint %}

{% tabs %}
{% tab title="Request" %}

| Name         | Description                                                                                        |
| ------------ | -------------------------------------------------------------------------------------------------- |
| `id`         | Numerical radius request packet identifier                                                         |
| `type`       | Numerical radius request packet type (int)                                                         |
| `name`       | Radius request packet type name                                                                    |
| \*           | Named request attribute (both attribute type (ex `"1"`) and name (ex `"User-Name"`) are supported) |
| {% endtab %} |                                                                                                    |

{% tab title="Session" %}

| Name         | Description            |
| ------------ | ---------------------- |
| `id`         | Session identifier     |
| `trace_id`   | Request trace id       |
| \*           | Named session property |
| {% endtab %} |                        |

{% tab title="Item" %}

| Name          | Description         |
| ------------- | ------------------- |
| `id`          | Item identifier     |
| \*            | Named item property |
|               |                     |
| {% endtab %}  |                     |
| {% endtabs %} |                     |
