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

Consider Satisfy all in data/.htaccess #14356

Closed
LukasReschke opened this issue Feb 19, 2015 · 12 comments · Fixed by #14359
Closed

Consider Satisfy all in data/.htaccess #14356

LukasReschke opened this issue Feb 19, 2015 · 12 comments · Fixed by #14359

Comments

@LukasReschke
Copy link
Member

Should we add Satisfy all in data/.htaccess to prevent potential mistakes where somebody protected their ownCloud instance with a Basic Auth login and forgot to properly configure the data dir manually again?

As per https://wiki.apache.org/httpd/BypassAuthenticationOrAuthorizationRequirements:

Satisfy All Allows the request only if both requirements are met (authentication AND access).

From my PoV this wouldn't really hurt and it seems to work locally.

Opinions?

@LukasReschke LukasReschke self-assigned this Feb 19, 2015
@LukasReschke LukasReschke added this to the 8.1-next milestone Feb 19, 2015
@LukasReschke
Copy link
Member Author

Related #14280 and #13731

LukasReschke added a commit that referenced this issue Feb 19, 2015
@LukasReschke
Copy link
Member Author

Proposal at #14359

@LukasReschke
Copy link
Member Author

That said I don't have any strong feelings towards or against this…

@LukasReschke
Copy link
Member Author

@jnweiger This was reported by somebody to our security ML who had basically the following additional config to what we have in our Debian 7 packages for 8.0:

<Directory /var/www/>
  Options Indexes FollowSymLinks MultiViews
  AllowOverride All
  Order allow,deny
  allow from all
  AuthUserFile /var/www/.htpasswd
  AuthType Basic
  AuthName "Authenticated users only"
  Require valid-user
</Directory>
<Directory /var/www/owncloud/>
  Satisfy any
</Directory>

The Satisfy Any here obviously caused the problems and in my opinion this is a misconfiguration and not a direct security problem of ownCloud.

However, to make the life of future users easier and make the risk of misconfiguration as low as possible I proposed this change here.

What do you think? Makes this sense?

@jnweiger
Copy link
Contributor

@LukasReschke where did the 'Satisfy Any' come from? I don't see it Linux packages.
I agree, 'Satisfy All' is definitly better. Aka much more robust.

@LukasReschke
Copy link
Member Author

That's the user's own setting in addition with the packages.

@RobinMcCorkell
Copy link
Member

Only question is, what if someone puts their auth code in the server configs, not in the .htaccess, and installs ownCloud expecting it to honour that? A .htaccess always overwrites the server configuration (unless disabled ofc), and it might catch some people out. Or are we expecting people to edit the .htaccess if they want to implement Basic auth or something?

@LukasReschke
Copy link
Member Author

Well.. It's kinda the purpose that /data/ is never accessible even if you configure it like that by mistake in your server config ;)

@LukasReschke
Copy link
Member Author

See #14359 for the actual change.

@RobinMcCorkell
Copy link
Member

Wait, data/.htaccess, not just .htaccess. Doh!

@LukasReschke
Copy link
Member Author

😄

@jnweiger
Copy link
Contributor

For best security I'd recommend to configure the data folder somewhere outside of any webserver tree.
It is never directly accessed by the webserver.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants