Skip to content

Commit 23cc4dc

Browse files
authored
cleanup readme, apache conf (#647)
1 parent 0a6c2d0 commit 23cc4dc

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,16 @@ See the Docker Compose environment (`tools/docker-dev/`) for an (unsafe for prod
5858
- `npm install`
5959
- `npx copy-files-from-to`
6060
- `httpd` `DocumentRoot` set to `webroot/`
61-
- `httpd` Authentication
62-
- Any authentication will do as long as it defines `REMOTE_USER`, `givenName`, `sn`
61+
- `httpd` Authentication:
62+
- Unity uses Shibboleth SP and the Apache Shibboleth module (`apt install shibboleth-sp-utils libapache2-mod-shib` on Ubuntu)
63+
- Auth must define `$_SERVER["REMOTE_USER"]`, `$_SERVER["givenName"]`, `$_SERVER["sn"]` variables
6364
- `REMOTE_USER` must take the form `username@org`
6465
- `givenName` is first name, `sn` is last name
6566
- `mail` attribute is preferred, but `REMOTE_USER` will be used as an email address if `mail` is absent
66-
- Unity uses Shibboleth SP and the Apache Shibboleth module (`apt install shibboleth-sp-utils libapache2-mod-shib` on Ubuntu)
67-
- `httpd` Authorization
67+
- Auth must accept only the domain name(s) configured by the administrator
68+
- this is required because `$_SERVER["HTTP_HOST"]` is trusted internally
69+
- in Shibboleth SP, we enforce this using the `redirectLimit` setting
70+
- `httpd` Authorization:
6871
- Restricted access to `webroot/admin/`
6972
- Global access (with valid authentication) to `webroot/`
7073
- IP-based access (no authentication) to `lan/`

resources/lib/UnityHTTPD.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public static function die(?string $x = null): never
4141
public static function redirect(?string $dest = null): never
4242
{
4343
$dest ??= getRelativeURL($_SERVER["REQUEST_URI"]);
44+
// TODO check $_SERVER["REDIRECT_STATUS"]?
4445
header("Location: $dest");
4546
http_response_code(302);
4647
if (CONFIG["site"]["enable_redirect_message"]) {

tools/docker-dev/web/unity-apache.conf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<VirtualHost _default_:80>
2-
ServerName account-portal-docker-web
3-
UseCanonicalName On
42
DocumentRoot /var/www/unity-web-portal/webroot
53
<LocationMatch '^/(panel|admin)'>
64
AuthType Basic

0 commit comments

Comments
 (0)