From 3afa654179db1ccafcfc89a2f4f894b2b9196a05 Mon Sep 17 00:00:00 2001 From: godcong Date: Tue, 24 Dec 2024 20:00:16 +0800 Subject: [PATCH] feat(runtime): add service configuration and discovery support - Add support for service-specific configuration in runtime.Config - Implement registry and service configuration binding - Update runtime.Runtime to use new service configuration methods - Refactor config.Scan to use the new cfg field --- agent/middleware/security/authn.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/agent/middleware/security/authn.go b/agent/middleware/security/authn.go index a50f057..dc77075 100644 --- a/agent/middleware/security/authn.go +++ b/agent/middleware/security/authn.go @@ -122,17 +122,12 @@ func NewAuthNServer(cfg *configv1.Security, ss ...OptionSetting) (middleware.Mid func NewAuthN(cfg *configv1.Security, ss ...OptionSetting) (middleware.Middleware, error) { log.Debugf("NewAuthN: creating server authenticator middleware with config: %+v", cfg) option := settings.ApplyDefaultsOrZero(ss...) - if option == nil || option.Authenticator == nil { + if option.Authenticator == nil { log.Errorf("NewAuthN: option or authenticator is nil, returning error") return nil, ErrorCreateOptionNil } log.Debugf("NewAuthN: applying defaults and creating token parser") - //tokenParsers := aggregateTokenParsers( - // option.TokenParser, - // FromTransportClient(option.HeaderAuthorize, option.Scheme), - // FromTransportServer(option.HeaderAuthorize, option.Scheme)) - return func(handler middleware.Handler) middleware.Handler { return func(ctx context.Context, req interface{}) (interface{}, error) { log.Debugf("NewAuthN: handling request: %+v", req)