* fix: [ocisdev-1433] fix public share, add The grpc clients keepalive and more (#13020) * fix: the public share configuration and fixed graceful shutdown * fix: [OCISDEV-1433] remove GRPC_MAX_CONNECTION_AGE The setting closed healthy grpc connections on a timer so that clients would redo their DNS lookup. It never helped against the failure it was reached for - a connection whose peer stopped answering - because the age limit is enforced by the server, the grace period was left at infinity so a request already in flight was never ended, and any value without a unit suffix silently disabled it again. Detecting a peer that stops answering is now the job of the grpc clients, which ping the peer while a request is in flight. The servers here got the matching enforcement policy so they accept those pings; the client side arrives with the next reva bump. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix: Added the new variable OCDAV_DISABLE_PROPFIND_PUBLIC_LINK_RESOLUTION that disable the resolution of public link shares when answering PROPFIND requests. * chore: bump reva * fix: The keepalive added to grpc clinet * chore: bump reva * build(deps): bump go 1.26.8, grpc-go dependency --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com> * chore: bump pnpm dependencies * fix: avoid go vet false positive in userlog conversion.go The go.mod bump to go 1.26.8 made go vet flag loadTemplates' calls to t.Get(nt.Subject/nt.Message) as non-constant format strings, breaking the build for services/userlog/pkg/service. These are translation lookup keys, not printf format strings, so route the call through a local func value to defeat vet's static trace. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
45 lines
3.1 KiB
Go
45 lines
3.1 KiB
Go
package config
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
|
|
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
|
|
"go-micro.dev/v4/client"
|
|
)
|
|
|
|
// Config combines all available configuration parts.
|
|
type Config struct {
|
|
Commons *shared.Commons `yaml:"-"` // don't use this directly as configuration for a service
|
|
|
|
Service Service `yaml:"-"`
|
|
|
|
Tracing *Tracing `yaml:"tracing"`
|
|
Log *Log `yaml:"log"`
|
|
Debug Debug `yaml:"debug"`
|
|
|
|
HTTP HTTP `yaml:"http"`
|
|
|
|
GRPCClientTLS *shared.GRPCClientTLS `yaml:"grpc_client_tls"`
|
|
GRPCClientOptions *shared.GRPCClientOptions `yaml:"grpc_client_options"`
|
|
GrpcClient client.Client `yaml:"-"`
|
|
|
|
SigningKeys *SigningKeys `yaml:"signing_keys"`
|
|
|
|
TokenManager *TokenManager `yaml:"token_manager"`
|
|
|
|
Context context.Context `yaml:"-"`
|
|
}
|
|
|
|
// SigningKeys is a store configuration.
|
|
type SigningKeys struct {
|
|
Store string `yaml:"store" env:"OCIS_CACHE_STORE;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE" desc:"The type of the signing key store. Supported values are: 'redis-sentinel' and 'nats-js-kv'. See the text description for details." introductionVersion:"5.0"`
|
|
Nodes []string `yaml:"addresses" env:"OCIS_CACHE_STORE_NODES;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_NODES" desc:"A list of nodes to access the configured store. Note that the behaviour how nodes are used is dependent on the library of the configured store. See the Environment Variable Types description for more details." introductionVersion:"5.0"`
|
|
TTL time.Duration `yaml:"ttl" env:"OCIS_CACHE_TTL;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_TTL" desc:"Default time to live for signing keys. See the Environment Variable Types description for more details." introductionVersion:"5.0"`
|
|
AuthUsername string `yaml:"username" env:"OCIS_CACHE_AUTH_USERNAME;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
|
AuthPassword string `yaml:"password" env:"OCIS_CACHE_AUTH_PASSWORD;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
|
EnableTLS bool `yaml:"enable_tls" env:"OCIS_CACHE_ENABLE_TLS;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_ENABLE_TLS" desc:"Activate TLS for the connection to the signing key store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
|
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_CACHE_TLS_INSECURE;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_TLS_INSECURE" desc:"Disable TLS certificate verification for the signing key store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
|
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the signing key store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
|
}
|