From d5504093e8a5e7547a51baaf333044812aec575f Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Fri, 17 Dec 2021 17:59:26 +0100 Subject: [PATCH] fix some TODOs --- idp/pkg/config/config.go | 18 +++++++++--------- ocis-pkg/indexer/index/cs3/config.go | 1 - proxy/pkg/cs3/client.go | 3 ++- webdav/pkg/config/config.go | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/idp/pkg/config/config.go b/idp/pkg/config/config.go index 426c34dd48..420dc78886 100644 --- a/idp/pkg/config/config.go +++ b/idp/pkg/config/config.go @@ -76,23 +76,23 @@ type Settings struct { EncryptionSecretFile string `ocisConfig:"encrypt_secret_file" env:"IDP_ENCRYPTION_SECRET"` - Listen string `ocisConfig:"listen"` //TODO: is this even needed? + Listen string IdentifierClientDisabled bool `ocisConfig:"identifier_client_disabled" env:"IDP_DISABLE_IDENTIFIER_WEBAPP"` IdentifierClientPath string `ocisConfig:"identifier_client_path" env:"IDP_IDENTIFIER_CLIENT_PATH"` IdentifierRegistrationConf string `ocisConfig:"identifier_registration_conf" env:"IDP_IDENTIFIER_REGISTRATION_CONF"` IdentifierScopesConf string `ocisConfig:"identifier_scopes_conf" env:"IDP_IDENTIFIER_SCOPES_CONF"` - IdentifierDefaultBannerLogo string `ocisConfig:"identifier_default_banner_logo"` // TODO: is this even needed? - IdentifierDefaultSignInPageText string `ocisConfig:"identifier_default_sign_in_page_text"` // TODO: is this even needed? - IdentifierDefaultUsernameHintText string `ocisConfig:"identifier_default_username_hint_text"` // TODO: is this even needed? + IdentifierDefaultBannerLogo string + IdentifierDefaultSignInPageText string + IdentifierDefaultUsernameHintText string - SigningKid string `ocisConfig:"sign_in_kid" env:"IDP_SIGNING_KID"` - SigningMethod string `ocisConfig:"sign_in_method" env:"IDP_SIGNING_METHOD"` - SigningPrivateKeyFiles []string `ocisConfig:"sign_in_private_key_files"` // TODO: is this even needed? + SigningKid string `ocisConfig:"signing_kid" env:"IDP_SIGNING_KID"` + SigningMethod string `ocisConfig:"signing_method" env:"IDP_SIGNING_METHOD"` + SigningPrivateKeyFiles []string `ocisConfig:"signing_private_key_files"` // TODO: is this even needed? ValidationKeysPath string `ocisConfig:"validation_keys_path" env:"IDP_VALIDATION_KEYS_PATH"` - CookieBackendURI string `ocisConfig:"cookie_backend_uri"` // TODO: is this even needed? - CookieNames []string `ocisConfig:"cookie_names"` // TODO: is this even needed? + CookieBackendURI string + CookieNames []string AccessTokenDurationSeconds uint64 `ocisConfig:"access_token_duration_seconds" env:"IDP_ACCESS_TOKEN_EXPIRATION"` IDTokenDurationSeconds uint64 `ocisConfig:"id_token_duration_seconds" env:"IDP_ID_TOKEN_EXPIRATION"` diff --git a/ocis-pkg/indexer/index/cs3/config.go b/ocis-pkg/indexer/index/cs3/config.go index 9326de762e..430927d4c6 100644 --- a/ocis-pkg/indexer/index/cs3/config.go +++ b/ocis-pkg/indexer/index/cs3/config.go @@ -4,7 +4,6 @@ import ( acccfg "github.com/owncloud/ocis/accounts/pkg/config" ) -//TODO: remove? // Config represents cs3conf. Should be deprecated in favor of config.Config. type Config struct { ProviderAddr string diff --git a/proxy/pkg/cs3/client.go b/proxy/pkg/cs3/client.go index dbaaa03ae9..bf8d19871d 100644 --- a/proxy/pkg/cs3/client.go +++ b/proxy/pkg/cs3/client.go @@ -5,12 +5,13 @@ import ( proxytracing "github.com/owncloud/ocis/proxy/pkg/tracing" "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" ) func newConn(endpoint string) (*grpc.ClientConn, error) { conn, err := grpc.Dial( endpoint, - grpc.WithInsecure(), //TODO: depreciated + grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithUnaryInterceptor( otelgrpc.UnaryClientInterceptor( otelgrpc.WithTracerProvider( diff --git a/webdav/pkg/config/config.go b/webdav/pkg/config/config.go index 9739198d30..3a6bdb87c8 100644 --- a/webdav/pkg/config/config.go +++ b/webdav/pkg/config/config.go @@ -19,7 +19,7 @@ type Config struct { HTTP HTTP `ocisConfig:"http"` OcisPublicURL string `ocisConfig:"ocis_public_url" env:"OCIS_URL;OCIS_PUBLIC_URL"` - WebdavNamespace string `ocisConfig:"webdav_namespace" env:"STORAGE_WEBDAV_NAMESPACE"` //TODO: prevent this cross config + WebdavNamespace string `ocisConfig:"webdav_namespace" env:"STORAGE_WEBDAV_NAMESPACE"` Context context.Context Supervised bool