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
rootCmd.Flags().BoolVar(&options.enableMiddleware, "enable-middleware", false, "turn on middleware for allowlisting")
76
+
rootCmd.Flags().BoolVar(&options.skipRegoPermCheck, "skip-rego-perm-check", false, "skip the rego file permission check (allows permissions more permissive than 0600)")
return"", fmt.Errorf("rego file path was provided without the --enable-middleware flag, please provide the --enable-middleware flag") // todo, can we default to setting this flag ourselves is this better UX?
The daemon enforces strict permissions (0600 or more restrictive) on the Rego policy file to prevent unauthorized modifications. You can bypass this check using the `--skip-rego-perm-check` flag.
By default, the daemon requires the Rego policy file to have permissions no more permissive than 0600 (readable and writable only by the owner). This restriction helps prevent unauthorized modifications to the policy file.
127
+
128
+
The `--skip-rego-perm-check` flag can be used to bypass this permission check. However, using this flag comes with significant security risks:
129
+
- More permissive file permissions could allow unauthorized users to modify the policy
130
+
- Changes to the policy file could go unnoticed
131
+
- Security controls could be weakened without proper oversight
132
+
133
+
It is strongly recommended to:
134
+
- Avoid using `--skip-rego-perm-check` in production environments
135
+
- Always use proper file permissions (0600 or more restrictive)
136
+
- Implement additional monitoring if the flag must be used
137
+
113
138
The Rego policy file is a critical security control.
114
139
Any user with sudo privileges can:
115
140
@@ -123,4 +148,4 @@ Any user with sudo privileges can:
0 commit comments