Skip to content

Commit

Permalink
Clarify docs for multiple access controls
Browse files Browse the repository at this point in the history
  • Loading branch information
mosabua committed Jan 10, 2025
1 parent 29ae654 commit 533ac31
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 26 deletions.
37 changes: 33 additions & 4 deletions docs/src/main/sphinx/security/built-in-system-access-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,39 @@ cluster nodes:
access-control.name=allow-all
```

Multiple system access control implementations may be configured at once
using the `access-control.config-files` configuration property. It should
contain a comma separated list of the access control property files to use
(rather than the default `etc/access-control.properties`).
(multiple-access-control)=
## Multiple access control systems

Multiple system access control implementations may be configured at once using
the `access-control.config-files` configuration property. It must contain a
comma-separated list of the access control property files to use, rather than
the default `etc/access-control.properties`. Relative paths from the Trino
`INSTALL_PATH` or absolute paths are supported. Each system is configured in a
separate configuration file.

The configured access control systems are checked until access rights are denied
by a system. If no denies are issued by any system, the request is granted.
Therefore all configured access control systems are used and evaluated for each
request that is granted.

For example, you can combine `file` access control and `ranger` access control
with the two separate configuration files `file-based.properties` and
`ranger.properties`.

```properties
access-control.config-files=etc/file-based.properties,etc/ranger.properties
```

:::{warning}

Using multiple access control systems can be very complex to configure and
maintain. In addition, each system and policy within each system is
evaluated for each query, which can have a considerable, negative performance
impact.

:::

## Available access control systems

Trino offers the following built-in system access control implementations:

Expand Down
13 changes: 2 additions & 11 deletions docs/src/main/sphinx/security/opa-access-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,8 @@ access-control.name=opa
opa.policy.uri=https://opa.example.com/v1/data/trino/allow
```

To combine OPA access control with file-based or other access control systems,
configure multiple access control configuration file paths in
`etc/config.properties`:

```properties
access-control.config-files=etc/trino/file-based.properties,etc/trino/opa.properties
```

Order the configuration files list in the desired order of the different systems
for overall access control. Configure each access-control system in the
specified files.
To combine OPA access control with file-based or other access control
systems, follow the instructions about [](multiple-access-control).

The following table lists the configuration properties for the OPA access control:

Expand Down
12 changes: 1 addition & 11 deletions docs/src/main/sphinx/security/ranger-access-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,7 @@ access-control.name=ranger
```

To combine Ranger access control with file-based or other access control
systems, create the file `etc/access-control.properties` on the coordinator,
with the following configuration that lists multiple access control
configuration file paths:

```properties
access-control.config-files=etc/trino/file-based.properties,etc/trino/ranger.properties
```

Order the configuration files list in the desired order of the different systems
for overall access control. Configure each access-control system in the
specified files.
systems, follow the instructions about [](multiple-access-control).

The following table lists the configuration properties for the Ranger access control:

Expand Down

0 comments on commit 533ac31

Please sign in to comment.