> For the complete documentation index, see [llms.txt](https://wiki.datadike.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.datadike.com/pam/administration/sessions/connection-methods.md).

# Connection methods

Control which protocols and clients a user may use to reach an asset — not which assets they may reach.

## What this is and when to use it

A connect method rule controls **how** a user connects to an asset.

It is easy to confuse with [authorizations](https://wiki.datadike.com/pam/administration/access/authorizations.md), so it is worth stating plainly:

| Policy         | Answers                                                 |
| -------------- | ------------------------------------------------------- |
| Authorization  | *Which* assets and accounts a user may reach            |
| Connect method | *How* they may reach them — which protocols and clients |

Controlling access without controlling the method leaves the weakest available path open. Use these rules to remove connection methods that are unsuitable for a given audience: denying a native client to third parties so that everything goes through the recorded web session, for example, or removing a protocol that your security policy does not allow for privileged access.

{% hint style="warning" %}
The only available action is **Reject**. A rule denies the selected methods to the users it matches; there is no rule that grants a method. Everything not denied remains available.
{% endhint %}

## Before you start

* The **SYSADMIN** profile.
* A clear idea of which method should remain, not only which one to remove. Denying every method for a user denies their access entirely.

## Steps

1. Open **Policies › Connect method**.
2. Click **Create**.
3. Under **Basic**, set the **Name** and the **Priority** — numeric, default 50, and **lower is evaluated first**.
4. Choose the users. With **Filter by attribute**, click **Add** and build each line as *Attribute name · Match · Attribute value*. See the operators below.
5. Under **Connect method**, select the methods the rule covers. Several may be selected.
6. Under **Action**, **Reject** is selected and is the only option.
7. Tick **Active**, and write a **Description** saying why the rule exists — the reasoning is what the next administrator will need.
8. **Submit**, or **Save & Continue** to keep editing.

{% hint style="info" %}
Leave gaps between priority numbers — 10, 20, 30 rather than 1, 2, 3 — so a new rule can be inserted between two existing ones later without renumbering everything.
{% endhint %}

## What you should see

![The Connect Method ACL screen](https://1085357737-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7xzJyi9JVzRwnV6JzUho%2Fuploads%2Fgit-blob-474394bfaef293a487e999464777f8841d56a6d4%2Fconnection-methods.png?alt=media)

**1** How many rules exist. **2** One rule. Reject is the only action a rule can take.

The rule appears in the list, ordered by priority, with its active state and description.

## How to verify it worked

1. Sign in as one of the users the rule matches.
2. Open the connection dialog for a granted asset.
3. The denied methods must not be offered. If they are still there, the rule's user scope does not cover this user, or a rule with a lower number matched first.
4. Confirm that a method you intended to keep is still available. This is the check people skip, and it is how a rule quietly removes all access.

## Attribute filters

When several filter lines are added they combine with **AND** — every line must match.

| Operator           | Meaning                | Example                               |
| ------------------ | ---------------------- | ------------------------------------- |
| Equals             | Exact match            | Name = `João Silva`                   |
| Not equal to       | Anything but the value | Department ≠ `IT`                     |
| In…                | The value is in a list | Role in `[Admin, Manager]`            |
| Contains           | Contains the substring | Name contains `Silva`                 |
| Starts with…       | Begins with the text   | Email starts with `admin`             |
| Ending with…       | Ends with the text     | Email ends with `@company.com`        |
| Regular expression | A regex pattern        | Email matches `^[a-z]+@company\.com$` |

Some operators are case-sensitive. Test a regular expression before putting it into production — a pattern that matches nothing produces a rule that silently does nothing.

## Field reference

| Field           | What it does                                            |
| --------------- | ------------------------------------------------------- |
| Name            | Identifies the rule                                     |
| Priority        | Numeric, default 50. Lower is evaluated first           |
| Users           | All users, a specific list, or filtered by attribute    |
| Connect methods | The methods the rule covers. Multiple selection         |
| Action          | **Reject**, and only Reject                             |
| Active          | Whether the rule is in force. Changes apply immediately |
| Description     | Free text. Record the security rationale here           |

{% hint style="danger" %}
Deleting a rule is irreversible. Deactivate it first and confirm nothing breaks before removing it.
{% endhint %}

## Related pages

* [Authorizations](https://wiki.datadike.com/pam/administration/access/authorizations.md) — which assets, rather than how
* [SSH sessions](https://wiki.datadike.com/pam/administration/sessions/ssh.md)
* [RDP sessions](https://wiki.datadike.com/pam/administration/sessions/rdp.md)
* [Session recording](https://wiki.datadike.com/pam/administration/sessions/recording.md)
