Remove 'OCM_OCM_PROVIDER_AUTHORIZER_VERIFY_REQUEST_HOSTNAME' setting

The feature never really worked correctly and it's added value is at least
arguable.

Fixes #10355
This commit is contained in:
Ralf Haferkamp
2024-10-28 11:29:35 +01:00
parent 04c2dcd427
commit f48e549929
3 changed files with 14 additions and 4 deletions

View File

@@ -0,0 +1,12 @@
Bugfix: Removed 'OCM_OCM_PROVIDER_AUTHORIZER_VERIFY_REQUEST_HOSTNAME' setting
The config option 'OCM_OCM_PROVIDER_AUTHORIZER_VERIFY_REQUEST_HOSTNAME' was
removed from the OCM service. The additional security provided by this setting
is somewhat questionable and only provided in very specific setups.
We are not going through the normal deprecation process for this setting, as it
was never really working anyway. If you have this setting in your configuration,
it will be ignored. You can safely remove it.
https://github.com/owncloud/ocis/pull/104xx
https://github.com/owncloud/ocis/issues/10355

View File

@@ -114,8 +114,7 @@ type OCMProviderAuthorizerDrivers struct {
}
type OCMProviderAuthorizerJSONDriver struct {
Providers string `yaml:"providers" env:"OCM_OCM_PROVIDER_AUTHORIZER_PROVIDERS_FILE" desc:"Path to the JSON file where ocm invite data will be stored. Defaults to $OCIS_CONFIG_DIR/ocmproviders.json." introductionVersion:"5.0"`
VerifyRequestHostname bool `yaml:"verify_request_hostname" env:"OCM_OCM_PROVIDER_AUTHORIZER_VERIFY_REQUEST_HOSTNAME" desc:"Verify the hostname of the incoming request against the hostname of the OCM provider." introductionVersion:"5.0"`
Providers string `yaml:"providers" env:"OCM_OCM_PROVIDER_AUTHORIZER_PROVIDERS_FILE" desc:"Path to the JSON file where ocm invite data will be stored. Defaults to $OCIS_CONFIG_DIR/ocmproviders.json." introductionVersion:"5.0"`
}
type OCMCore struct {

View File

@@ -130,8 +130,7 @@ func OCMConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]inter
"driver": cfg.OCMProviderAuthorizerDriver,
"drivers": map[string]interface{}{
"json": map[string]interface{}{
"providers": cfg.OCMProviderAuthorizerDrivers.JSON.Providers,
"verify_request_hostname": cfg.OCMProviderAuthorizerDrivers.JSON.VerifyRequestHostname,
"providers": cfg.OCMProviderAuthorizerDrivers.JSON.Providers,
},
},
},