Skip to content

Commit

Permalink
Create acl.md (#89)
Browse files Browse the repository at this point in the history
* Create acl.md
  • Loading branch information
gkorland authored Dec 4, 2024
1 parent d439ea8 commit 58ede22
Show file tree
Hide file tree
Showing 2 changed files with 142 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .wordlist.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
ACL
AOF
AST
Aldis
Expand All @@ -16,6 +17,7 @@ ColumnType
Costanza
Cypher
DateTime
DELUSER
Ducati
FOF
FOREACH
Expand All @@ -25,6 +27,7 @@ FalkorDB's
FalkorDBQAChain
Gadepally
Geospatial
GETUSER
GPL
GrAPL
GraphBLAS
Expand Down Expand Up @@ -77,6 +80,7 @@ RedisGraph
RedisInsight
Roi
Rueian
SETUSER
SDK
SDKs
SLOWLOG
Expand All @@ -85,6 +89,7 @@ SSPLv
SSpaths
Sceat
Stopwords
Subcommands
TF
TTY
UNIQIE
Expand Down Expand Up @@ -220,6 +225,7 @@ startNode
stopwords
str
strList
subcommands
sublist
subqueries
subquery
Expand Down Expand Up @@ -292,4 +298,4 @@ urlencoded
userName
www
yourQuery
yourSourceName
yourSourceName
135 changes: 135 additions & 0 deletions commands/acl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
---
title: "ACL"
nav_order: 100
description: >
Managing Access Control Lists, enabling administrators to control user permissions at a granular level
parent: "Commands"
---

# ACL

The ACL command in FalkorDB provides tools for managing Access Control Lists,
enabling administrators to control user permissions at a granular level.
This command is crucial for maintaining secure access to your FalkorDB instances.

Usage: `ACL [SUBCOMMAND] [arg1] [arg2] ...`

## Subcommands

### ACL HELP

Returns a list of all available `ACL` subcommands and their syntax.

Usage: `ACL HELP`

#### Example

```
> ACL HELP
```

#### Output

```
1) "GETUSER"
2) "SETUSER"
3) "DELUSER"
4) "LIST"
...
```

### ACL SETUSER

Defines or updates a user's permissions.

Usage: `ACL SETUSER <username> [rule1] [rule2] ...`

#### Rules

* on / off: Enables or disables the user account.
* nopass: Allows access without a password.
* password:<password>: Sets a password for the user.
* ~<pattern>: Restricts access to graphs matching the given pattern.
* +<command>: Grants permission to execute specific commands.
* -<command>: Denies permission to execute specific commands.

#### Example

```
> ACL SETUSER john on >password123 +GRAPH.LIST +GRAPH.RO_QUERY ~*
```

### ACL GETUSER

Retrieves details about a specific user, including permissions and settings.
Syntax

Usage: `ACL GETUSER <username>`

#### Example

```
> ACL GETUSER john
```

#### Output

```
1) "on"
2) ">password123"
3) "+GRAPH.LIST"
4) "+GRAPH.RO_QUERY"
5) "~*"
```

### ACL DELUSER

Deletes a user from the ACL.

Usage: `ACL DELUSER <username>`

#### Example

```
> ACL DELUSER john
```

### ACL LIST

Lists all users currently configured in the ACL.

Usage: `ACL LIST`

#### Example

```
> ACL LIST
```

#### Output

```
1) "admin"
2) "john"
3) "guest"
```

### ACL LOG

Displays a log of recent ACL-related events, such as user authentication attempts or rule changes.

Usage: `ACL LOG [count]`

* count: (Optional) Limits the number of entries in the log.

#### Example

```
> ACL LOG 10
```

## Notes

The ACL command is available only to users with administrative privileges.
Be cautious when using the nopass rule, as it may compromise security.
Use specific patterns and commands to enforce the principle of least privilege.

0 comments on commit 58ede22

Please sign in to comment.