zitadel/internal/protoc/protoc-gen-authoption
Michael Waeger b9c938594c
feat: Policy (#79)
* policy added

* Make it executable

* Make it executable, corrections

* password age policy added

* password lockout policy added

* corrections

* policy added

* Make it executable

* Make it executable, corrections

* password age policy added

* password lockout policy added

* corrections

* fix(repository): remove second policy

* complaints corrected

* Init tests

* add some tests

* more tests added

* systemfefaults added

* default values load added

* check for default value added

* fixes

* fixed

* create policy if not exists

* eventstore tests added

Co-authored-by: adlerhurst <silvan.reusser@gmail.com>
2020-05-14 11:48:57 +02:00
..
authoption feat: add protoc pkg 2020-03-23 11:53:12 +01:00
templates fix: start server and gateway 2020-03-25 10:54:45 +01:00
generate.go feat: add protoc pkg 2020-03-23 11:53:12 +01:00
main.go feat: add protoc pkg 2020-03-23 11:53:12 +01:00
README.md feat: add protoc pkg 2020-03-23 11:53:12 +01:00
templates.go feat: Policy (#79) 2020-05-14 11:48:57 +02:00

protoc-gen-authoption

Proto options to annotate auth methods in protos

Generate protos/templates

protos: go generate authoption/generate.go
templates/install: go generate generate.go

Usage

// proto file
import "authoption/options.proto";

service MyService {

    rpc Hello(Hello) returns (google.protobuf.Empty) {
        option (google.api.http) = {
        get: "/hello"
        };

        option (caos.zitadel.utils.v1.auth_option) = {
            zitadel_permission: "hello.read"
            zitadel_check_param: "id"
        };
    }

    message Hello {
        string id = 1;
    }
}

Caos Auth Option is used for granting groups On each zitadel role is specified which auth methods are allowed to call

Get protoc-get-authoption: go get github.com/caos/zitadel/internal/protoc/protoc-gen-authoption

Protc-Flag: --authoption_out=.