Files
opencloud/ocis/pkg/command/policies.go
Florian Schade f38a9f4385 Introduce Policies-Service (#5716)
* add policies service
add policies proxy middleware
add policies event service
add policies grpc service
prepare ci and git environments (ci, make, readme, doc)

* add webfinger to the drone conf

* fix docs
remove not used virus scan postprocessing step

* relocate example rego file
implicitly enable and disable proxy and postprocessing policy checking by setting the query.
update configuration descriptions

* move policies
update readme

* use converter func to convert pp environment to actual environment
expose and test custom rego functions
add engine unit tests
add opa unit tests
update policies readme

Co-authored-by: Martin <github@diemattels.at>

* relocate sample policies to the deployments folder
change and document policies service port

* update index.md and small fix

* add health command
add version command
add debug server

---------

Co-authored-by: Martin <github@diemattels.at>
2023-03-14 16:08:22 +01:00

31 lines
909 B
Go

package command
import (
"github.com/owncloud/ocis/v2/ocis-pkg/config"
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
"github.com/owncloud/ocis/v2/ocis/pkg/register"
"github.com/owncloud/ocis/v2/services/policies/pkg/command"
"github.com/urfave/cli/v2"
)
// PoliciesCommand is the entrypoint for the policies service.
func PoliciesCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: cfg.Policies.Service.Name,
Usage: helper.SubcommandDescription(cfg.Policies.Service.Name),
Category: "services",
Before: func(c *cli.Context) error {
configlog.Error(parser.ParseConfig(cfg, true))
cfg.Policies.Commons = cfg.Commons
return nil
},
Subcommands: command.GetCommands(cfg.Policies),
}
}
func init() {
register.AddCommand(PoliciesCommand)
}