> 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/selector.md).

# Selector

The selector configuration allows for multiple authenticators to use the same listener (host and port). Requests are routed to authenticators based on the rules defined in the selector.

If a request matches multiple selectors; first match wins. If no selector is specified; first authenticator wins.

Matching can be done on sender host (name or ip) and on one or more attributes. For a selector to match, all specified expressions must match.

Expressions must conform with Java regular expression (regex) syntax.

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

<table><thead><tr><th width="211">Name</th><th>Description</th></tr></thead><tbody><tr><td><code>host</code></td><td>Source host (sender) expression (regex).</td></tr><tr><td><code>attrs</code></td><td>List of attribute expression objects</td></tr><tr><td><code>attrs[*].name</code></td><td>Attribute name (Mandatory unless type is specified)</td></tr><tr><td><code>attrs[*].type</code></td><td>Attribute type (Mandatory unless name is specified)</td></tr><tr><td><code>attrs[*].value</code></td><td>Attribute value expression (regex)</td></tr></tbody></table>
{% endtab %}

{% tab title="Examples" %}
Selector matching requests from host with address starting with `"127."` or matching `"localhost"`.

```json
{
  "host" : "127\\..*|localhost"
}
```

Selector matching requests from `localhost` containing two attributes. Attribute 44 containing the value `"sms"` and 4 (NAS-IP-Address) starting with `"192."`.

```json
{
  "host" : "localhost",
  "attrs" : [ {
    "type" : 44,
    "value" : "sms"
  }, {
    "name" : "NAS-IP-Address",
    "value" : "192\\..*"
  } ]
}
```

{% endtab %}
{% endtabs %}

####
