@@ -37,12 +37,13 @@ var (
3737)
3838
3939type Config struct {
40- LogLevel string `long:"loglevel" description:"Logging level for all subsystems" choice:"trace" choice:"debug" choice:"info" choice:"warn" choice:"error" choice:"fatal"`
41- KeyringBackend string `long:"keyring-type" description:"Type of keyring to use"`
42- RPCListener string `long:"rpclistener" description:"the listener for RPC connections, e.g., 127.0.0.1:1234"`
43- HMACKey string `long:"hmackey" description:"The HMAC key for authentication with FPD. If not provided, will use HMAC_KEY environment variable."`
44- Metrics * metrics.Config `group:"metrics" namespace:"metrics"`
45- GRPCMaxContentLength int `long:"grpcmaxcontentlength" description:"The maximum size of the gRPC message in bytes."`
40+ LogLevel string `long:"loglevel" description:"Logging level for all subsystems" choice:"trace" choice:"debug" choice:"info" choice:"warn" choice:"error" choice:"fatal"`
41+ KeyringBackend string `long:"keyring-type" description:"Type of keyring to use"`
42+ RPCListener string `long:"rpclistener" description:"the listener for RPC connections, e.g., 127.0.0.1:1234"`
43+ HMACKey string `long:"hmackey" description:"The HMAC key for authentication with FPD. If not provided, will use HMAC_KEY environment variable."`
44+ DisableUnsafeEndpoints bool `long:"disable-unsafe-endpoints" description:"Disable unsafe RPC endpoints (e.g., UnsafeSignEOTS) that bypass slashing protection. Recommended for production."`
45+ Metrics * metrics.Config `group:"metrics" namespace:"metrics"`
46+ GRPCMaxContentLength int `long:"grpcmaxcontentlength" description:"The maximum size of the gRPC message in bytes."`
4647
4748 DatabaseConfig * DBConfig `group:"dbconfig" namespace:"dbconfig"`
4849}
@@ -138,12 +139,13 @@ func DefaultConfigWithHomePath(homePath string) *Config {
138139
139140func DefaultConfigWithHomePathAndPorts (homePath string , rpcPort , metricsPort int ) * Config {
140141 cfg := & Config {
141- LogLevel : defaultLogLevel ,
142- KeyringBackend : defaultKeyringBackend ,
143- DatabaseConfig : DefaultDBConfigWithHomePath (homePath ),
144- RPCListener : defaultRpcListener ,
145- Metrics : metrics .DefaultEotsConfig (),
146- GRPCMaxContentLength : defaultMaxGRPCContentLength ,
142+ LogLevel : defaultLogLevel ,
143+ KeyringBackend : defaultKeyringBackend ,
144+ DatabaseConfig : DefaultDBConfigWithHomePath (homePath ),
145+ RPCListener : defaultRpcListener ,
146+ DisableUnsafeEndpoints : false , // default to false for backward compatibility
147+ Metrics : metrics .DefaultEotsConfig (),
148+ GRPCMaxContentLength : defaultMaxGRPCContentLength ,
147149 }
148150 cfg .RPCListener = fmt .Sprintf ("%s:%d" , DefaultRPCHost , rpcPort )
149151 cfg .Metrics .Port = metricsPort
0 commit comments