Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove 'OCM_OCM_PROVIDER_AUTHORIZER_VERIFY_REQUEST_HOSTNAME' setting #10425

Merged
merged 2 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions changelog/unreleased/fix-remove-non-working-ocm-setting.md
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions services/ocm/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions services/ocm/pkg/config/defaults/defaultconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ func DefaultConfig() *config.Config {
OCMProviderAuthorizerDriver: "json",
OCMProviderAuthorizerDrivers: config.OCMProviderAuthorizerDrivers{
JSON: config.OCMProviderAuthorizerJSONDriver{
Providers: filepath.Join(defaults.BaseConfigPath(), "ocmproviders.json"),
VerifyRequestHostname: true,
Providers: filepath.Join(defaults.BaseConfigPath(), "ocmproviders.json"),
},
},
OCMShareProvider: config.OCMShareProvider{
Expand Down
3 changes: 1 addition & 2 deletions services/ocm/pkg/revaconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
},
},
Expand Down