You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: "Learn about allowlists and access control in the Polygon CDK."
6
-
keywords:
7
-
- docs
8
-
- polygon
9
-
- layer 2
10
-
- validium
11
-
- allowlist
12
-
- access
13
-
- access control
14
-
- acl
15
-
---
16
-
17
-
The CDK Validium node offers policy management features, including allowlisting and Access Control Lists (ACLs). These features are particularly beneficial for Validium-based app-chains that require fine-grained control over transaction pools. It is the Sequencer node that enforces these policies, and any change operations should be applied directly through the Sequencer. This document provides an overview on these administrative capabilities and explains how to use them.
18
-
19
-
## Key Concepts
20
-
21
-
-**Policy**: A set of rules that govern what actions are allowed or denied in the transaction pool. Currently, there are two defined policies:
22
-
-**SendTx**: Governs whether an address may send transactions to the pool.
23
-
-**Deploy**: Governs whether an address may deploy a contract.
24
-
-**ACL (Access Control List)**: A list of addresses that are exceptions to a given policy.
25
-
-**Allowlisting**: The process of explicitly allowing addresses to perform certain actions.
26
-
-**Denylisting**: The process of explicitly denying addresses from performing certain actions.
1
+
## Validium node
2
+
3
+
A **policy** is a set of rules that govern what actions are allowed or denied in the transaction pool. Currently, there are two defined policies:
4
+
5
+
-**SendTx**: governs whether an address may send transactions to the pool.
6
+
-**Deploy**: governs whether an address may deploy a contract.
7
+
8
+
The CDK validium node offers policy management features that include allowlisting[^1], denylisting[^2], and access control lists (ACLs)[^3]. These features are beneficial for validium-based app-chains that require fine-grained control over transaction pools.
27
9
28
10
## Architecture
29
11
30
12
The architecture is divided into the following main components:
31
13
32
-
-**Policy Management Layer**: Defined in `policy.go`, this layer is responsible for the core logic of policy management.
33
-
-**Data Layer**: Defined in `pgpoolstorage/policy.go`, this layer interacts with the data layer (PostgreSQL database) to store and retrieve policy and ACL data.
34
-
-**Policy Definitions**: Defined in `pool/policy.go`, this layer contains the data structures and utility functions for policies and ACLs.
35
-
-**Policy Interface**: Defined in `pool/interfaces.go`, this interface outlines the methods that any concrete type must implement to be considered a policy in the system.
14
+
-**Policy management layer**: Defined in `policy.go`, this layer is responsible for the core logic of policy management.
15
+
-**Data layer**: Defined in `pgpoolstorage/policy.go`, this layer interacts with the data layer (PostgreSQL database) to store and retrieve policy and ACL data.
16
+
-**Policy definitions**: Defined in `pool/policy.go`, this layer contains the data structures and utility functions for policies and ACLs.
17
+
-**Policy interface**: Defined in `pool/interfaces.go`, this interface outlines the methods that any concrete type must implement to be considered a policy in the system.
36
18
37
-
## Capabilities
19
+
## Policy features
38
20
39
-
-**Fine-Grained Control**: Developers can specify policies at a granular level, allowing or denying specific actions for specific addresses.
40
-
-**Dynamic Updates**: Policies and ACLs can be updated on-the-fly without requiring a node restart.
41
-
-**Database-Backed**: All policy data is stored in a PostgreSQL database.
21
+
-**Fine-grained control**: Developers can specify policies at a granular level, allowing or denying specific actions for specific addresses.
22
+
-**Dynamic updates**: Policies and ACLs can be updated on-the-fly without requiring a node restart.
23
+
-**Database-backed**: All policy data is stored in a PostgreSQL database.
42
24
-**Extensible**: New policies can be easily added to the system.
|`policy add`| Add address(es) to a policy exclusion list |`--policy` (or `-p`): Policy name<br/>`--csv`: CSV file with addresses |
49
31
|`policy remove`| Remove address(es) from a policy exclusion list |`--policy` (or `-p`): Policy name<br/>`--csv`: CSV file with addresses to remove |
50
32
|`policy clear`| Clear all addresses from a policy's exclusion list |`--policy` (or `-p`): Policy name |
51
33
|`policy describe`| Describe the default actions for the policies or a specific policy |`--policy` (or `-p`): Policy name (optional)<br/>`--no-header`: Omit header in output (optional) |
52
34
|`policy update`| Update the default action for a policy |`--policy` (or `-p`): Policy name<br/>`--allow`: Set policy to 'allow'<br/>`--deny`: Set policy to 'deny' |
53
35
54
-
We will use the "deploy" policy as an example.
36
+
!!! note
37
+
For the examples, we are using a `deploy` policy.
55
38
56
-
### Adding Addresses to a Policy
39
+
### Add addresses to a policy
57
40
58
41
To add one or more addresses to a specific policy, you can use the `policy add` command. If you have a CSV file containing the addresses, you can use the --csv` flag.
0 commit comments