|
| 1 | +--- |
| 2 | +# |
| 3 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 4 | +# or more contributor license agreements. See the NOTICE file |
| 5 | +# distributed with this work for additional information |
| 6 | +# regarding copyright ownership. The ASF licenses this file |
| 7 | +# to you under the Apache License, Version 2.0 (the |
| 8 | +# "License"); you may not use this file except in compliance |
| 9 | +# with the License. You may obtain a copy of the License at |
| 10 | +# |
| 11 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | +# |
| 13 | +# Unless required by applicable law or agreed to in writing, |
| 14 | +# software distributed under the License is distributed on an |
| 15 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 16 | +# KIND, either express or implied. See the License for the |
| 17 | +# specific language governing permissions and limitations |
| 18 | +# under the License. |
| 19 | +# |
| 20 | +title: External Policy Decision Point |
| 21 | +linkTitle: External PDP |
| 22 | +type: docs |
| 23 | +weight: 300 |
| 24 | +--- |
| 25 | + |
| 26 | +This section provides information about integrating Apache Polaris (Incubating) with external Policy Decision Points (PDPs) for authorization. |
| 27 | + |
| 28 | +## Overview |
| 29 | + |
| 30 | +By default, Apache Polaris uses an internal authorization system based on role-based access control (RBAC). For advanced use cases requiring external policy management, centralized authorization, or integration with existing policy infrastructure, Polaris supports integration with external Policy Decision Points (PDPs). |
| 31 | + |
| 32 | +## What is a Policy Decision Point? |
| 33 | + |
| 34 | +A Policy Decision Point (PDP) is a component that evaluates authorization requests against defined policies and returns authorization decisions (allow/deny). |
| 35 | + |
| 36 | +Organizations may choose to use an external PDP instead of Polaris's internal authorization in order to leverage a centralized policy store that manages authorization policies across multiple services and applications. |
| 37 | + |
| 38 | +## Architecture |
| 39 | + |
| 40 | +When using an external PDP, Polaris delegates authorization decisions as follows: |
| 41 | + |
| 42 | +1. **Client request**: A client makes a request to Polaris (e.g., read a table) |
| 43 | +2. **Authorization check**: Polaris sends an authorization request to the external PDP |
| 44 | +3. **Policy evaluation**: The PDP evaluates the request against configured policies |
| 45 | +4. **Decision**: The PDP returns an allow/deny decision |
| 46 | +5. **Enforcement**: Polaris enforces the decision and proceeds or rejects the request |
| 47 | + |
| 48 | +``` |
| 49 | +┌─────────┐ ┌─────────────┐ ┌──────────────┐ |
| 50 | +│ Client │─────────>│ Polaris │────────>│ External PDP │ |
| 51 | +│ │ Request │ │ AuthZ │ │ |
| 52 | +│ │ │ │ Request │ │ |
| 53 | +│ │<─────────│ │<────────│ │ |
| 54 | +│ │ Response │ │ Decision│ │ |
| 55 | +└─────────┘ └─────────────┘ └──────────────┘ |
| 56 | +``` |
| 57 | + |
| 58 | +## Available Implementations |
| 59 | + |
| 60 | +Apache Polaris currently supports the following external PDP integrations: |
| 61 | + |
| 62 | +- **[Open Policy Agent (OPA)]({{< relref "opa.md" >}})**: A general-purpose policy engine with a rich ecosystem and flexible policy language (Rego) |
| 63 | + |
| 64 | +## Configuration |
| 65 | + |
| 66 | +To enable external PDP integration, set the following configuration property: |
| 67 | + |
| 68 | +```properties |
| 69 | +polaris.authorization.type=<pdp-type> |
| 70 | +``` |
| 71 | + |
| 72 | +Where `<pdp-type>` is the identifier for the PDP implementation (e.g., `opa`). The default value is `internal`. |
| 73 | + |
| 74 | +See the specific PDP documentation for detailed configuration options: |
| 75 | + |
| 76 | +- [OPA Configuration]({{< relref "opa.md#configuration-reference" >}}) |
0 commit comments