Update jo-micro/router
continuous-integration/drone/tag Build is passing Details

main v0.5.1
René Jochum 1 year ago
parent 0a7672adcf
commit b6037cd264
Signed by: jochum
GPG Key ID: F7D906F5E51E8E5E

@ -128,7 +128,6 @@ func (h *Handler) Init(cReg *components.Registry, c InitConfig) error {
endpointroles.WithLogrus(logruscomponent.MustReg(h.cReg).Logger()),
)
authVerifier.AddRules(
endpointroles.RouterRule,
endpointroles.NewRule(
endpointroles.Endpoint(authpb.AuthService.Delete),
endpointroles.RolesAllow(auth2.RolesServiceAndAdmin),

@ -19,7 +19,7 @@ require (
jochum.dev/jo-micro/buncomponent v0.0.5
jochum.dev/jo-micro/components v0.3.0
jochum.dev/jo-micro/logruscomponent v0.0.4
jochum.dev/jo-micro/router v0.4.5
jochum.dev/jo-micro/router v0.4.7
)
require (

@ -1927,6 +1927,10 @@ jochum.dev/jo-micro/router v0.4.3 h1:bhukSjECazxt00ENhz79Pb6EQUh16rHWL6dqiqueVOo
jochum.dev/jo-micro/router v0.4.3/go.mod h1:di9nC/mnwkrSQd/HzBH1YVl3KEL+xrQ+3ASfC3fA7Rw=
jochum.dev/jo-micro/router v0.4.5 h1:wG1inQinS9zFaordMHPLkKBLfNpJqys3mwBH8QBYfJQ=
jochum.dev/jo-micro/router v0.4.5/go.mod h1:l7Jf1lRXXOgi3LMqJXgMLKSpwaA59paBAZiETq5zeNI=
jochum.dev/jo-micro/router v0.4.6 h1:LIdGffId6zZpcX0jlp/HumrmKfRbGVefIUfmXwmtlNI=
jochum.dev/jo-micro/router v0.4.6/go.mod h1:VXYQG7CX7ZAE1qHz4PfRfmvHLLVZ5T8rPOiBbzF7Xsk=
jochum.dev/jo-micro/router v0.4.7 h1:AyoH9xvtngwgmQvJmGyZWuJ6nrBX4ot87KTBjGQNV0s=
jochum.dev/jo-micro/router v0.4.7/go.mod h1:VXYQG7CX7ZAE1qHz4PfRfmvHLLVZ5T8rPOiBbzF7Xsk=
k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo=
k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ=
k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8=

@ -1,16 +1,9 @@
package endpointroles
import (
"jochum.dev/jo-micro/auth2"
"jochum.dev/jo-micro/auth2/shared/sutil"
)
// Add this on every Server that exposes RouterClientService
var RouterRule = NewRule(
Endpoint("RouterClientService.Routes"),
RolesAllow([]string{auth2.ROLE_SERVICE}),
)
type Rule struct {
Endpoint string
RolesAllow []string

Loading…
Cancel
Save