mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 19:17:32 +00:00
feat: port reduction (#323)
* move mgmt pkg * begin package restructure * rename auth package to authz * begin start api * move auth * move admin * fix merge * configs and interceptors * interceptor * revert generate-grpc.sh * some cleanups * console * move console * fix tests and merging * js linting * merge * merging and configs * change k8s base to current ports * fixes * cleanup * regenerate proto * remove unnecessary whitespace * missing param * go mod tidy * fix merging * move login pkg * cleanup * move api pkgs again * fix pkg naming * fix generate-static.sh for login * update workflow * fixes * logging * remove duplicate * comment for optional gateway interfaces * regenerate protos * fix proto imports for grpc web * protos * grpc web generate * grpc web generate * fix changes * add translation interceptor * fix merging * regenerate mgmt proto
This commit is contained in:
@@ -68,7 +68,7 @@ func (fi bindataFileInfo) Sys() interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
var _templatesAuth_method_mappingGoTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8c\x92\xc1\x6e\xdb\x30\x0c\x86\xcf\xd5\x53\x10\x86\x0f\x4d\x90\x4a\xd8\x35\x40\x0f\x43\xba\x0e\x3d\xb4\x09\xd0\x6c\xd7\x40\xb5\x19\x45\x88\x2d\x09\x94\x9c\xa1\x15\xf4\xee\x83\x6c\x77\x71\xd6\x0e\x98\x4f\x32\x45\xf2\xe7\x47\xfd\x42\xc0\xca\xd6\x08\x0a\x0d\x92\x0c\x58\xc3\xcb\x2b\x38\xb2\xc1\x56\x37\x0a\xcd\x8d\xec\xc2\xa1\xc5\x70\xb0\x35\x87\xbb\x35\x3c\xad\xb7\xf0\xed\xee\x61\xcb\x19\x73\xb2\x3a\x4a\x85\x10\x23\xbf\xd7\x0d\xf2\xef\x76\x73\x54\xfc\x49\xb6\x98\x12\x63\x4c\xb7\xce\x52\x80\x6b\x06\x00\x50\x28\x6b\x55\x83\x5c\xd9\x46\x1a\xc5\x2d\x29\xa1\xc8\x55\x45\x7f\xc9\xae\xba\xa0\x1b\xbf\xcb\x52\x50\x28\x1d\x0e\xdd\x0b\xaf\x6c\x2b\x2a\x69\xbd\x78\xd3\x41\xd6\xd8\x08\x6d\x02\x92\x91\x8d\x90\x4e\x8b\x9c\x5a\xb0\xab\xff\x4b\xce\x4a\xc2\x23\x9d\x90\x44\xab\xeb\xba\xc1\x5f\x92\xb0\x60\x33\xc6\x62\x04\x92\x46\x21\x94\x1e\x96\xb7\x30\x80\x3c\x23\x9d\x74\x85\x1e\x32\x87\x98\xcf\x19\xcc\x21\xc6\xd2\xbf\xb3\xc1\x5c\x30\x76\x92\x34\x0d\xee\xbe\x76\xe1\xf0\xd8\xef\xc9\xc3\x2d\x9c\x81\xf8\x10\x7c\x94\xce\x69\xa3\x20\xf6\xc4\x67\xd9\x36\xcb\x96\x7e\xcc\xca\xcd\xc7\x2f\x46\x28\xdb\xdc\x74\xed\x42\xce\xb1\x2e\x68\x6b\xa0\x6c\xf9\xba\x3f\x79\x28\x32\x31\x1f\x89\x79\xaf\xc8\x4f\x5f\x78\x16\xdd\x0d\xd9\x05\x5c\x36\xd4\x7b\x90\xa6\x9e\xf4\xfd\x73\xe2\x1b\xa4\x56\x7b\x9f\x25\x26\x35\xfd\xd3\x89\x18\xcb\x61\x31\x9b\xe1\xc5\x53\xe2\x13\x72\x11\xe3\x78\x2a\x96\x53\xee\x61\xcc\x78\xd1\x2b\x7f\x67\xa5\x25\x14\x31\x7e\x36\x42\x4a\xc5\xe2\x43\xdd\xea\x80\xd5\x71\x23\x49\xb6\x7f\xd5\xf5\x17\xf7\x1a\x9b\x7a\x1c\xe3\xb2\x36\x2d\x26\x2b\x40\xf3\xbe\xe3\x18\x61\xf8\x49\x8c\xed\x3b\x53\x7d\x78\x4c\x4b\xfa\x4d\x66\x84\xdd\x43\x36\x53\x85\x2e\x58\xba\x3e\x21\xe9\xbd\x46\x9a\x92\x6e\xed\x11\xcd\xcf\xf1\x62\x01\x39\xb6\xb2\x66\x0f\xf3\x49\x4e\x0e\x68\x35\x83\xec\x45\xfe\xc3\x48\x7a\x7d\xee\x0d\x39\xe9\x3d\x7a\x83\x30\x74\x64\xe0\x6c\x54\x7e\x31\xcd\x67\xc3\x9c\x35\x17\xff\xf2\xe4\x2c\x73\x0e\xcc\x90\xd2\xef\x00\x00\x00\xff\xff\xf3\xc0\x3d\x9c\xf5\x03\x00\x00")
|
||||
var _templatesAuth_method_mappingGoTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8c\x92\x4f\x6f\xdc\x2c\x10\xc6\xcf\x2f\x9f\x62\x84\x7c\x78\xbb\x4a\x40\xbd\xae\xb4\x87\x2a\x69\xaa\x1e\x92\xb5\xd4\xdc\x23\x62\x26\x18\xad\xf9\x23\x60\xb7\x6d\x10\xdf\xbd\x02\x7b\x1b\x6f\x5b\x55\xe5\x04\xe6\x99\x67\x9e\xf9\x19\xce\xe1\xc6\x49\x04\x85\x16\x83\x48\x28\xe1\xf9\x3b\xf8\xe0\x92\x1b\xae\x15\xda\x6b\x71\x4c\xa3\xc1\x34\x3a\xc9\xe0\x76\x0f\x0f\xfb\x47\xf8\x78\xfb\xf9\x91\x11\xe2\xc5\x70\x10\x0a\x21\x67\x76\xa7\x27\x64\x9f\x5c\x7f\x50\xec\x41\x18\x2c\x85\x10\xa2\x8d\x77\x21\xc1\xff\x04\x00\x80\x2a\xe7\xd4\x84\x4c\xb9\x49\x58\xc5\x5c\x50\x5c\x05\x3f\xd0\x76\x49\xfe\xa3\x4a\xa7\xf1\xf8\xcc\x06\x67\xf8\x20\x5c\xe4\xaf\x3a\x09\x89\x13\xd7\x36\x61\xb0\x62\xe2\xc2\x6b\x5e\xa3\xbc\xd2\x7f\x55\x57\x7f\x1e\x31\x9c\x30\x70\xa3\xa5\x9c\xf0\xab\x08\x48\xc9\x3b\x42\x72\x86\x20\xac\x42\xe8\x22\x6c\x77\x30\xc7\xff\x82\xe1\xa4\x07\x8c\x50\xd3\xf3\xcd\x86\xc0\x06\x72\xee\xe2\x79\x22\xd8\x70\x42\x06\x67\x63\x5a\x7f\x7e\xba\x6f\x6c\xfa\x80\x2f\xfa\x1b\xec\x80\xe6\xdc\xcd\x7e\xfd\x8c\xa7\x14\xb6\x92\x53\x42\x4e\x22\x5c\x18\x7c\x38\xa6\x71\x36\x89\xb0\x83\x36\x23\x9b\xcf\xf7\xc2\x7b\x6d\x15\xe4\x46\xe9\x2d\xb4\xa9\xa1\xbb\xb8\xa8\x6a\xb4\x65\xe5\x0c\x9d\xa9\x7e\x7b\x9f\xaa\xc6\xf9\xa4\x9d\x85\xce\xb0\x7d\xdb\x45\xa0\x95\x17\x5b\x78\xb1\x63\xd2\x53\x64\xa7\xf7\xac\x76\x7d\x9a\xd5\x14\x2e\x0d\xf5\x0b\x08\x2b\x57\xbe\x3f\x77\xac\xc7\x60\x74\x8c\xb5\xc5\xaa\xa6\xfd\x6e\xfe\x77\x0c\x3c\xe7\x33\x90\xed\x32\xf2\x9c\x30\x5f\xd8\xd4\xf5\xd6\x64\xdb\xe0\xfe\xa1\x7b\x29\xf4\xea\xb7\xba\x9b\x11\x87\x43\x2f\x82\x30\xbf\xd4\xb5\x8b\x3b\x8d\x93\x5c\x12\x5c\xd6\x96\xab\xd5\xf4\x68\xcf\x78\x73\x86\xf9\x50\xda\xf3\x41\x2b\xa1\x94\x1f\x01\x00\x00\xff\xff\xf7\x3b\xde\xd5\x3c\x03\x00\x00")
|
||||
|
||||
func templatesAuth_method_mappingGoTmplBytes() ([]byte, error) {
|
||||
return bindataRead(
|
||||
@@ -83,7 +83,7 @@ func templatesAuth_method_mappingGoTmpl() (*asset, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "templates/auth_method_mapping.go.tmpl", size: 1013, mode: os.FileMode(420), modTime: time.Unix(1587570988, 0)}
|
||||
info := bindataFileInfo{name: "templates/auth_method_mapping.go.tmpl", size: 828, mode: os.FileMode(420), modTime: time.Unix(1594194900, 0)}
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
return a, nil
|
||||
}
|
||||
@@ -182,6 +182,7 @@ type bintree struct {
|
||||
Func func() (*asset, error)
|
||||
Children map[string]*bintree
|
||||
}
|
||||
|
||||
var _bintree = &bintree{nil, map[string]*bintree{
|
||||
"templates": &bintree{nil, map[string]*bintree{
|
||||
"auth_method_mapping.go.tmpl": &bintree{templatesAuth_method_mappingGoTmpl, map[string]*bintree{}},
|
||||
@@ -234,4 +235,3 @@ func _filePath(dir, name string) string {
|
||||
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
||||
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
|
||||
}
|
||||
|
||||
|
@@ -6,7 +6,7 @@ package {{.File.GoPkg.Name}}
|
||||
import (
|
||||
"google.golang.org/grpc"
|
||||
|
||||
utils_auth "github.com/caos/zitadel/internal/api/auth"
|
||||
"github.com/caos/zitadel/internal/api/authz"
|
||||
"github.com/caos/zitadel/internal/api/grpc/server/middleware"
|
||||
)
|
||||
|
||||
@@ -16,11 +16,13 @@ import (
|
||||
* {{$s.Name}}
|
||||
*/
|
||||
|
||||
var {{$s.Name}}_AuthMethods = utils_auth.MethodMapping {
|
||||
const {{$s.Name}}_MethodPrefix = "{{$.File.Package}}.{{$s.Name}}"
|
||||
|
||||
var {{$s.Name}}_AuthMethods = authz.MethodMapping {
|
||||
{{ range $m := $s.Method}}
|
||||
{{ $mAuthOpt := option $m.Options "caos.zitadel.utils.v1.auth_option" }}
|
||||
{{ if and $mAuthOpt $mAuthOpt.Permission }}
|
||||
"/{{$.File.Package}}.{{$s.Name}}/{{.Name}}": utils_auth.Option{
|
||||
"/{{$.File.Package}}.{{$s.Name}}/{{.Name}}": authz.Option{
|
||||
Permission: "{{$mAuthOpt.Permission}}",
|
||||
CheckParam: "{{$mAuthOpt.CheckFieldName}}",
|
||||
},
|
||||
@@ -28,8 +30,4 @@ var {{$s.Name}}_AuthMethods = utils_auth.MethodMapping {
|
||||
{{ end}}
|
||||
}
|
||||
|
||||
func {{$s.Name}}_Authorization_Interceptor(verifier utils_auth.TokenVerifier, authConf *utils_auth.Config) grpc.UnaryServerInterceptor {
|
||||
return middleware.AuthorizationInterceptor(verifier, authConf, {{$s.Name}}_AuthMethods)
|
||||
}
|
||||
|
||||
{{ end }}
|
Reference in New Issue
Block a user