Hello team, I am trying to prevent regular users (...
# help
j
Hello team, I am trying to prevent regular users (non-admin) to write and delete objects under
_lakefs_actions
as it seems legitimate to enforce company wide data policies. Can a strategy based on RBAC and policies allow this, typically
Copy code
{
  "statement": [
    {
      "action": [
        "fs:WriteObject",
        "fs:DeleteObject"
      ],
      "effect": "deny",
      "resource": "arn:lakefs:fs:::repository/<repository-name>/object/_lakefs_actions*"
    }
  ]
}
?
i
Hi @J茅r么me Viveret happy to take a look at this.
If you are available, we can jump on a quick call?
Seems like we missed you 馃檪 Generally speaking, you are correct. You can find a similar example here. Notice this code there:
Copy code
admin1Client.auth.create_policy(
    policy=models.Policy(
        id='FSBlockAccessToPIIData',
        statement=[models.Statement(
            effect="deny",
            resource="arn:lakefs:fs:::repository/"+repo+"/object/PII/*",
            action=["fs:*"],
        ),
        ]
    )
)
The only difference @Amit Kesarwani and I noticed is that there is a
/
before the
*
. You might want to add that.
j
Amazing @Iddo Avneri, thanks a lot !
I mostly wanted to ensure that we were going in the right direction and that objects were matched by path and not HMACs 馃檪
a
Objects are matched by path, not by digest