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
Copy file name to clipboardExpand all lines: README.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@
16
16
<!-- The project version is managed on json file in resources/rootasrole.json -->
17
17
<!-- markdownlint-restore -->
18
18
19
-
# RootAsRole (V3.0.3) : A memory-safe and security-oriented alternative to sudo/su commands
19
+
# RootAsRole (V3.0.4) : A memory-safe and security-oriented alternative to sudo/su commands
20
20
21
21
**RootAsRole** is a project to allow Linux/Unix administrators to delegate their administrative tasks access rights to users. Its main features are :
22
22
@@ -33,6 +33,12 @@
33
33
*[glob](https://docs.rs/glob/latest/glob/) for binary path
34
34
*[PCRE2](https://www.pcre.org/) for command arguments
35
35
36
+
If you need help to configure a RootAsRole policy, you can use our **[capable tool](https://github.com/LeChatP/RootAsRole-capable)**. This tool identifies the rights required by specific commands, making it easier to define a precise policy.
37
+
38
+
For administrators who already use **Ansible playbooks** for their tasks and wish to implement **RootAsRole**, our tool [gensr](https://github.com/LeChatP/RootAsRole-utils) can generate an initial draft of a **RootAsRole policy**. The `gensr` tool works by running your Ansible playbook alongside the [capable tool](https://github.com/LeChatP/RootAsRole-capable), creating a draft policy based on the observed required rights. This process helps administrators to harden their Ansible tasks. It helps to verify eventual third-party supply-chain attacks.
39
+
40
+
**Note:** The `gensr` tool is still in development and may not work with all playbooks. If you wish to contribute to this project, feel free to make issues and pull requests.
41
+
36
42
## <imgsrc="https://lechatp.github.io/RootAsRole/favicon.svg"width="20px"/> You can find every interesting resources using [the RootAsRole User/Knowledge/Reference Guide Book](https://lechatp.github.io/RootAsRole/).</h2>
@@ -43,7 +43,7 @@ The following example shows a RootAsRole config without plugins when almost ever
43
43
]
44
44
},
45
45
"env": { // Environment options
46
-
"default": "delete", // Default policy for environment, delete-all, keep-all, inherit
46
+
"default": "delete", // Default policy for environment, delete, keep, inherit
47
47
"keep": [ // Environment variables to keep
48
48
"env1",
49
49
"env2"
@@ -57,25 +57,25 @@ The following example shows a RootAsRole config without plugins when almost ever
57
57
"env6"
58
58
]
59
59
},
60
-
"root": "privileged", // Default policy for root, privileged, user, inherit
61
-
"bounding": "ignore", // Default policy for bounding, strict, ignore, inherit
60
+
"root": "privileged", // Default policy for root: privileged, user, inherit
61
+
"bounding": "ignore", // Default policy for bounding: strict, ignore, inherit
62
62
"wildcard-denied": "*", // Characters denied in any binary path
63
63
"timeout": {
64
-
"type": "ppid", // Type of timeout, tty, ppid, uid
65
-
"duration": "15:30:30", // Duration of the timeout
64
+
"type": "ppid", // Type of timeout: tty, ppid, uid
65
+
"duration": "15:30:30", // Duration of the timeout in HH:MM:SS format
66
66
"max_usage": 1// Maximum usage before timeout expires
67
67
}
68
68
},
69
69
"roles": [ // Role list
70
70
{
71
71
"name": "complete", // Role name
72
-
"actors": [ // Actors granted
72
+
"actors": [ // Actors granted to the role
73
73
{
74
74
"id": 0, // ID of the actor, could be a name
75
-
"type": "user"// Type of actor, user, group
75
+
"type": "user"// Type of actor: user, group
76
76
},
77
77
{
78
-
"groups": 0, // ID of the group, could be a name
78
+
"groups": 0, // ID of the group or a list of ID for AND condition
79
79
"type": "group"
80
80
},
81
81
{
@@ -106,6 +106,14 @@ The following example shows a RootAsRole config without plugins when almost ever
106
106
"CAP_SYS_ADMIN",
107
107
"CAP_SYS_BOOT"
108
108
]
109
+
},
110
+
// Dbus credentials are relied to Dbus and Polkit policies. They can be enforced using `gensr` tool
111
+
"dbus": [
112
+
"org.freedesktop.login1.Reboot", // DBus method to allow
113
+
],
114
+
// File credentials are relied to file permissions. They can be enforced using `gensr` tool
115
+
"file": {
116
+
"/path/to/file": "R", // File path and permission, r for read, w for write, x for execute
109
117
}
110
118
},
111
119
"commands": {
@@ -648,3 +656,7 @@ Here is an example global configuration:
648
656
```
649
657
650
658
The `check` list is a list of environment variables that will be checked for unsafe characters. If an environment variable contains unsafe characters, it will be removed from the environment.
659
+
660
+
## What are dbus and file credentials fields?
661
+
662
+
the `dbus` and `file` fields are used for gensr tool from RootAsRole-utils repository. They are enforced to the DBus and file permissions. The `dbus` field is used to allow DBus methods. The `file` field is used to allow file permissions. The gensr tool will generate the DBus and file permissions in according to the `setuid` credentials. So gensr tool requires the `setuid` field to be set.
0 commit comments