mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 21:17:58 +08:00
feat(authz): introduce conditional access control via CEL (#4040)
This commit is contained in:
@@ -792,6 +792,12 @@ func validateAuthzPolicies(config *config.Config, logger zlog.Logger) error {
|
||||
return fmt.Errorf("%w: %s", zerr.ErrBadConfig, msg)
|
||||
}
|
||||
|
||||
if _, err := api.CompileAccessControl(accessControlConfig); err != nil {
|
||||
logger.Error().Err(err).Msg("failed to compile access control policy conditions")
|
||||
|
||||
return fmt.Errorf("%w: %w", zerr.ErrBadConfig, err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user