mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 12:58:02 +08:00
feat(authz): introduce conditional access control via CEL (#4040)
This commit is contained in:
@@ -60,6 +60,22 @@
|
||||
}
|
||||
],
|
||||
"defaultPolicy": ["read"]
|
||||
},
|
||||
"prod/**": {
|
||||
"policies": [{
|
||||
"users": ["alice"],
|
||||
"actions": ["read", "create", "update"],
|
||||
"conditions": [{
|
||||
"expression": "req.time < timestamp(\"2099-12-31T23:59:59Z\")",
|
||||
"message": "alice's prod access expires end of 2099"
|
||||
},
|
||||
{
|
||||
"expression": "req.referenceType == \"digest\"",
|
||||
"message": "prod pushes must use digest references, not mutable tags"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"adminPolicy": {
|
||||
|
||||
Reference in New Issue
Block a user