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

setting up authentication for static files on farm #48

Open
ctb opened this issue Oct 14, 2022 · 0 comments
Open

setting up authentication for static files on farm #48

ctb opened this issue Oct 14, 2022 · 0 comments

Comments

@ctb
Copy link
Member

ctb commented Oct 14, 2022

farm supports static file hosting per #43, and it also supports Apache style auth:

https://httpd.apache.org/docs/2.4/howto/auth.html

so you can set up authentication for static file hosting!

important note: the way I've set it up below, anyone with an account on farm will be able to see your stuff. so this is really only useful for things you want to keep secret through obscurity and/or from people outside of UC Davis who won't have farm accounts

I've put an example in /home/ctbrown/public_html/auth; the file .htaccess there contains:

AuthType Basic
AuthName "Restricted Files"
# (Following line optional)
AuthBasicProvider file
AuthUserFile "/home/ctbrown/.apache/passwd.txt"
Require user titus

The file /home/ctbrown/.apache/passwd.txt was created with:

htpasswd -c /home/ctbrown/.apache/passwd.txt titus

et voila! When you go to http://farm.cse.ucdavis.edu/~ctbrown/auth/ you get asked to enter a username and password! (the password is titus - super secure!)

other notes

I don't think it will be possible to support kerberos style UC Davis authentication but could look into it!

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

No branches or pull requests

1 participant