diff --git a/services/auth-app/pkg/config/defaults/defaultconfig.go b/services/auth-app/pkg/config/defaults/defaultconfig.go index efc4028f3..636ab9380 100644 --- a/services/auth-app/pkg/config/defaults/defaultconfig.go +++ b/services/auth-app/pkg/config/defaults/defaultconfig.go @@ -18,13 +18,13 @@ func FullDefaultConfig() *config.Config { func DefaultConfig() *config.Config { return &config.Config{ Debug: config.Debug{ - Addr: "127.0.0.1:9197", + Addr: "127.0.0.1:9245", Token: "", Pprof: false, Zpages: false, }, GRPC: config.GRPCConfig{ - Addr: "127.0.0.1:9195", + Addr: "127.0.0.1:9246", Namespace: "com.owncloud.api", Protocol: "tcp", }, diff --git a/services/proxy/pkg/command/server.go b/services/proxy/pkg/command/server.go index 9bf9245ac..ebc388104 100644 --- a/services/proxy/pkg/command/server.go +++ b/services/proxy/pkg/command/server.go @@ -247,14 +247,10 @@ func Server(cfg *config.Config) *cli.Command { } } -<<<<<<< HEAD func loadMiddlewares(logger log.Logger, cfg *config.Config, userInfoCache, signingKeyStore microstore.Store, traceProvider trace.TracerProvider, metrics metrics.Metrics, userProvider backend.UserBackend, gatewaySelector pool.Selectable[gateway.GatewayAPIClient]) alice.Chain { -======= -func loadMiddlewares(logger log.Logger, cfg *config.Config, userInfoCache, signingKeyStore microstore.Store, traceProvider trace.TracerProvider, metrics metrics.Metrics) alice.Chain { ->>>>>>> a9df2a66b1 (feat: reva app auth) rolesClient := settingssvc.NewRoleService("com.owncloud.api.settings", cfg.GrpcClient) policiesProviderClient := policiessvc.NewPoliciesProviderService("com.owncloud.api.policies", cfg.GrpcClient) @@ -298,8 +294,6 @@ func loadMiddlewares(logger log.Logger, cfg *config.Config, userInfoCache, signi }) } -<<<<<<< HEAD -======= authenticators = append(authenticators, middleware.AppAuthAuthenticator{ Logger: logger, RevaGatewaySelector: gatewaySelector, @@ -308,7 +302,6 @@ func loadMiddlewares(logger log.Logger, cfg *config.Config, userInfoCache, signi Logger: logger, RevaGatewaySelector: gatewaySelector, }) ->>>>>>> a9df2a66b1 (feat: reva app auth) authenticators = append(authenticators, middleware.NewOIDCAuthenticator( middleware.Logger(logger), middleware.UserInfoCache(userInfoCache), diff --git a/services/proxy/pkg/middleware/app_auth.go b/services/proxy/pkg/middleware/app_auth.go index 815e9a457..b828af4b4 100644 --- a/services/proxy/pkg/middleware/app_auth.go +++ b/services/proxy/pkg/middleware/app_auth.go @@ -13,7 +13,7 @@ import ( // AppAuthAuthenticator defines the app auth authenticator type AppAuthAuthenticator struct { Logger log.Logger - RevaGatewaySelector *pool.Selector[gateway.GatewayAPIClient] + RevaGatewaySelector pool.Selectable[gateway.GatewayAPIClient] } // Authenticate implements the authenticator interface to authenticate requests via app auth. diff --git a/services/proxy/pkg/middleware/app_auth_test.go b/services/proxy/pkg/middleware/app_auth_test.go index f2e4d8d6a..79d857019 100644 --- a/services/proxy/pkg/middleware/app_auth_test.go +++ b/services/proxy/pkg/middleware/app_auth_test.go @@ -1,12 +1,13 @@ package middleware import ( + "net/http" + "net/http/httptest" + gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1" rpcv1beta1 "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" "github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool" "google.golang.org/grpc" - "net/http" - "net/http/httptest" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -22,7 +23,7 @@ var _ = Describe("Authenticating requests", Label("AppAuthAuthenticator"), func( RevaGatewaySelector: pool.GetSelector[gateway.GatewayAPIClient]( "GatewaySelector", "com.owncloud.api.gateway", - func(cc *grpc.ClientConn) gateway.GatewayAPIClient { + func(cc grpc.ClientConnInterface) gateway.GatewayAPIClient { return mockGatewayClient{ AuthenticateFunc: func(authType, clientID, clientSecret string) (string, rpcv1beta1.Code) { if authType != "appauth" {