mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-31 18:07:17 +02:00
custom rego in databroker (#1124)
* add support for sub policies * add support for sub policies * update authz rego policy to support sub policies
This commit is contained in:
parent
1d82be2c0e
commit
504197d83b
10 changed files with 576 additions and 277 deletions
|
@ -91,8 +91,8 @@ func (src *ConfigSource) rebuild(firstTime bool) {
|
|||
|
||||
// add all the config policies to the list
|
||||
for _, cfgpb := range src.dbConfigs {
|
||||
for _, policypb := range cfgpb.GetPolicies() {
|
||||
policy, err := config.NewPolicyFromProto(policypb)
|
||||
for _, routepb := range cfgpb.GetRoutes() {
|
||||
policy, err := config.NewPolicyFromProto(routepb)
|
||||
if err != nil {
|
||||
log.Warn().Err(err).Msg("databroker: error converting protobuf into policy")
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue