-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Review the NAC restrictions and enforcements including second-level enforcement in the NonAdminBackup, NonAdminRestore and NonAdminBackupStorageLocation specifications #151
Comments
@shubham-pampattiwar @mateusoliveira43 @weshayutin We should revisit restrictions and enforcement for Non Admin Objects. While looking at our discussion around second-level enforcement of the NABSL I looked into that area and I think we have to double check if any of the values which user may set won't allow user to access data which the user should not have permissions to access. An example would be the Backup Hook which uses Resouces that are in fact allowing to use IncludedNamespaes or even going further they do allow to use PreHooks that actually allows to define any executable in a process which is owned by Velero pod not a non-admin user. This could potentially result in users performing actions with elevated privileges. I think the IncludedNamespaces are the top level filter and what is above will limit the use of resources outside of namespaces within that filter, but it would be great to go on every spec field and see which ones can do harm when overriden by the user. Here is my suggestion which we should take action on: Restrictions and Enforcement for Non-Admin ObjectsThe following objects should have well-defined validation, restriction, and enforcement mechanisms:
1. CRD LevelContext: These CRDs specs are used from Velero objects, so direct control is limited to what Velero provides.
2. NAC Controller LevelContext: The controller applies additional runtime restrictions and enforcement for Non-Admin objects.
3. Cluster Admin LevelContext: Cluster administrators define global policies that users cannot override.
|
I think we are on the right track. We just need to review the spec sheets for these objects and see which ones need more restrictions/validations and which ones don't. |
Implementing enforcement for the NonAdminBackupStorageLocation requires revisit of the enforcement behavior. This design should align with it's requirements and allow other parts of the enforcement functionality. The enforcement levels are described in the: migtools#151 Signed-off-by: Michal Pryc <[email protected]>
Implementing enforcement for the NonAdminBackupStorageLocation requires revisit of the enforcement behavior. This design should align with it's requirements and allow other parts of the enforcement functionality. The enforcement levels are described in the: migtools#151 Signed-off-by: Michal Pryc <[email protected]>
Implementing enforcement for the NonAdminBackupStorageLocation requires revisit of the enforcement behavior. This design should align with it's requirements and allow other parts of the enforcement functionality. The enforcement levels are described in the: migtools#151 Signed-off-by: Michal Pryc <[email protected]>
If I may ask to review the design change proposal: |
Implementing enforcement for the NonAdminBackupStorageLocation requires revisit of the enforcement behavior. This design should align with it's requirements and allow other parts of the enforcement functionality. The enforcement levels are described in the: migtools#151 Signed-off-by: Michal Pryc <[email protected]>
Implementing enforcement for the NonAdminBackupStorageLocation requires revisit of the enforcement behavior. This design should align with it's requirements and allow other parts of the enforcement functionality. The enforcement levels are described in the: migtools#151 Signed-off-by: Michal Pryc <[email protected]>
Implementing enforcement for the NonAdminBackupStorageLocation requires revisit of the enforcement behavior. This design should align with it's requirements and allow other parts of the enforcement functionality. The enforcement levels are described in the: migtools#151 Signed-off-by: Michal Pryc <[email protected]>
Backup API Review:
|
@stillalearner tested scenarios with Scenario 1: (Namespace mapping , No label selectors)Create non admin user user1 Result: nan2 got created, restore successful, Scenario 2: (Namespace mapping + label selectors)Create non admin user user1 Result: nan3 got created, restore successful, Problemif non admin user can use |
Problem statement:
The current design and implementation for admin user enforcement of the spec values in
NonAdminBackup
andNonAdminRestore
do not support second-level configuration options:oadp-non-admin/docs/design/admin_control_over_spec.md
Line 27 in 019bb2a
It is necessary to review the need for second-level enforcement for these objects and adjust the design and implementation accordingly if required.
As an example, the
NonAdminBackupStorageLocation
object requires second-level enforcement to allow the admin user to restrict users to a specific S3 region while still permitting them to use their own buckets within that region. This enforcement must be implemented through the second-level configuration in the spec. This is explained in the: #139 (comment)The text was updated successfully, but these errors were encountered: