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

CORS configuration too much #8393

Open
DeepDiver1975 opened this issue Feb 7, 2024 · 6 comments
Open

CORS configuration too much #8393

DeepDiver1975 opened this issue Feb 7, 2024 · 6 comments
Labels

Comments

@DeepDiver1975
Copy link
Member

Describe the bug

As of now some CORS parameters are configurable via env vars e.g. OCIS_CORS_ALLOW_METHODS, OCIS_CORS_ALLOW_HEADERS (and OCIS_CORS_EXPOSE_HEADERS - see upcoming PR by @butonic )

Besides the fact that different services require different methods and headers and need to be configured on service level - changing the working default to anything different will most probably break some services partially.

Proposal

Do not configure allow methods, allow headers, expose headers and max ago but leave this to the individual services.

@butonic
Copy link
Member

butonic commented Feb 7, 2024

I agree, the only 'global' CORS config should be the allowed origin. the rest should IMO be hardcoded. At least we should drop the OCIS_CORS* env vars (save OCIS_CORS_ALLOW_ORIGINS)

@micbar
Copy link
Contributor

micbar commented Feb 7, 2024

At least we should drop the OCIS_CORS* env vars (save OCIS_CORS_ALLOW_ORIGINS)

I agree generally, but on a higher level we need to really change our attitude towards config.

We are getting more and more feedback, that our todays practise leads to broken deployments on every release.

The reality is, nobody reads the docs.

The biggest problem is exactly what we have here: Removals of config which was working before.

@wkloucek
Copy link
Contributor

The Helm Chart currently only exposes the CORS allow origins setting:

https://github.com/owncloud/ocis-charts/blob/d43e44276efffc37cc8e62621d99a255da7c4cb5/charts/ocis/values.yaml#L57-L61

@tailnet-h-usky-io

This comment was marked as off-topic.

@wkloucek
Copy link
Contributor

The OIDC server is hosted at: https://sso.[my domain].io
OCIS is hosted at: https://oc.[my domain].io

Expected behaviour

Browser Javascript requests to https://sso.[some domain].io should be allowed from OwnCloud

Actual behaviour

Browser Javascript requests to https://sso.[some domain].io are blocked by CORS configuration. :(

Actually you need to configure CORS on your SSO for this to work.

@tailnet-h-usky-io
Copy link

Thanks for the clarification, @wkloucek . Disregard the above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Qualification
Development

No branches or pull requests

5 participants