CAS: Difference between revisions
(New page: ===Using CAS in the CSC webhost environment=== IST provides a service called CAS that can be used to authenticate UW accounts. Relevant docs from IST are http://ist.uwaterloo.ca/~mpatters...) |
(s/_ENV/_SERVER) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
⚫ | |||
⚫ | |||
CSC also provides WebAuth for authenticating against CSC accounts instead of UW accounts. |
|||
===Using CAS in the CSC webhost environment=== |
===Using CAS in the CSC webhost environment=== |
||
We've got the CAS module installed on the CSC webserver. |
|||
You can use Authtype CAS in your .htaccess files |
|||
⚫ | |||
For the simplest case, just require any UW password: |
|||
⚫ | |||
AuthType CAS |
|||
require valid-user |
|||
If you put that in an .htaccess, anything in that folder will require a username to log in. |
|||
If you want to require a few specific users, try this: |
|||
Authtype CAS |
|||
require user ctdalek dbelange mimcpher |
|||
== CGI apps with CAS == |
|||
Apache puts the $REMOTE_USER variable into your application's environment, so you can use that to |
|||
get the username. For example, in PHP, use $_SERVER['REMOTE_USER'], or os.environ['REMOTE_USER'] in a Python cgi. |
Latest revision as of 17:20, 10 May 2017
IST provides a service called CAS that can be used to authenticate UW accounts. Relevant docs from IST are http://ist.uwaterloo.ca/~mpatters/cas/user.html and https://strobe.uwaterloo.ca/~twiki/bin/view/ISTCSS/CASClientAuth
CSC also provides WebAuth for authenticating against CSC accounts instead of UW accounts.
Using CAS in the CSC webhost environment
We've got the CAS module installed on the CSC webserver.
You can use Authtype CAS in your .htaccess files For the simplest case, just require any UW password:
AuthType CAS require valid-user
If you put that in an .htaccess, anything in that folder will require a username to log in.
If you want to require a few specific users, try this:
Authtype CAS require user ctdalek dbelange mimcpher
CGI apps with CAS
Apache puts the $REMOTE_USER variable into your application's environment, so you can use that to get the username. For example, in PHP, use $_SERVER['REMOTE_USER'], or os.environ['REMOTE_USER'] in a Python cgi.