1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-12-22 07:15:47 +01:00
Commit graph

114 commits

Author SHA1 Message Date
Juliusz Chroboczek
6e10da0116 Don't attempt to special-case worker CSP.
It doesn't work.
2024-12-13 13:58:26 +01:00
Juliusz Chroboczek
a70a9a13ed Implement background blur. 2024-12-13 11:27:16 +01:00
Juliusz Chroboczek
9a6ed2c8c8 Return 404 errors for tokens in unknown groups. 2024-12-04 13:32:51 +01:00
Juliusz Chroboczek
ee4174a4d6 Rename external directory to third-party. 2024-11-16 18:12:15 +01:00
Juliusz Chroboczek
a73c42ce08 Improve HTTP error for unknown permissions. 2024-11-08 17:07:11 +01:00
Juliusz Chroboczek
1db15045a3 Fix incorrect parsing of wildcard user password. 2024-10-25 15:41:05 +02:00
Juliusz Chroboczek
df274ad6ea Split out SDP fragment parsing, add test. 2024-09-30 00:24:12 +02:00
Juliusz Chroboczek
cb7a087ea2 Use mime.ParseMediaType instead of our version. 2024-08-15 00:41:27 +02:00
Juliusz Chroboczek
1bb7172515 Fix api_test.go under Go 1.20. 2024-08-13 16:26:08 +02:00
Juliusz Chroboczek
3e5b5c3033 Remove left over debugging message. 2024-06-08 14:34:51 +02:00
Juliusz Chroboczek
8db2e92cb9 More API tests. 2024-06-01 17:04:28 +02:00
Juliusz Chroboczek
f3ceb05033 Add Accept header to 415 replies.
Also fix return code in WHIP.
2024-05-09 17:48:17 +02:00
Juliusz Chroboczek
c1915cf3fc Don't include group and name in token API.
The group and name are in the path, this avoids redundancies.
2024-05-09 00:46:52 +02:00
Juliusz Chroboczek
ef6cff1d24 Add HTTP API for wildcard and empty users. 2024-05-08 14:53:45 +02:00
Juliusz Chroboczek
d29d14da16 Add low-level support for managing wildcard user. 2024-05-08 14:28:28 +02:00
Juliusz Chroboczek
46ed942300 Split out userHandler. 2024-05-03 20:36:51 +02:00
Juliusz Chroboczek
dc0610dc59 Fix 405 result in usersHandler. 2024-05-03 20:30:46 +02:00
Juliusz Chroboczek
9eb0364016 Allow a single wildcard user.
Rename the fallback-users entry to wildcard-user, and only
allow a single fallback user.  This is missing the HTTP API.
2024-05-03 20:24:32 +02:00
Juliusz Chroboczek
f5279022ce Minor refactoring in api.go. 2024-05-03 20:11:36 +02:00
Juliusz Chroboczek
a12331ee09 Use JSON arrays instead of plain text in API.
Suggested by Dianne Skoll.
2024-05-03 18:54:22 +02:00
Juliusz Chroboczek
aa35408dba Rename /galene-api/0/ to /v0/. 2024-05-03 18:33:37 +02:00
Juliusz Chroboczek
d7a2a2e8e0 Check for mismatched token in API. 2024-05-02 18:29:03 +02:00
Juliusz Chroboczek
a76f225bc0 Implement command /identify. 2024-05-01 23:38:31 +02:00
Juliusz Chroboczek
b7f9ef00b6 Token API. 2024-05-01 23:12:20 +02:00
Juliusz Chroboczek
fe15057252 Check for empty path in api. 2024-05-01 22:20:51 +02:00
Juliusz Chroboczek
3409f5a27f Replace uses of os.IsExist and os.IsNotExist with errors.Is.
The former don't properly unwrap errors.
2024-04-14 13:34:32 +02:00
Juliusz Chroboczek
31f89163a2 Simplify server startup.
We now create the server and the listener in the calling thread,
and only create a new goroutine before calling server.Serve.
2024-04-14 02:12:46 +02:00
Juliusz Chroboczek
8fb1c1556e Fix typo in usersHandler. 2024-04-14 01:10:02 +02:00
Juliusz Chroboczek
df46e6df21 Rename usersHandler. 2024-04-14 01:04:44 +02:00
Juliusz Chroboczek
695c379a6c Distinguish empty key in password from absence of key. 2024-04-12 01:05:48 +02:00
Juliusz Chroboczek
7673a95b05 Implement FallbackUsers in API. 2024-04-11 17:53:48 +02:00
Juliusz Chroboczek
31a18bcf44 Implement keys handling in API. 2024-04-11 14:30:44 +02:00
Juliusz Chroboczek
cc38c53075 Implement administrative API. 2024-04-11 13:27:08 +02:00
Juliusz Chroboczek
5753c46910 Use methodNotAllowed in whip. 2024-04-10 14:45:04 +02:00
Juliusz Chroboczek
f646191e01 Implement methodNotAllowed. 2024-04-10 14:44:03 +02:00
Juliusz Chroboczek
e14eec86d3 Implement parseContentType. 2024-04-09 22:49:03 +02:00
Juliusz Chroboczek
c4c7d0b60d More tests for splitPath. 2024-04-09 22:49:03 +02:00
Juliusz Chroboczek
eee6650336 Add precondition.go. 2024-04-09 22:49:03 +02:00
Juliusz Chroboczek
b7094fc373 Beginnings of administrative API.
The "stats.json" file is moved under "galene-api", where the rest
of the API will live.
2024-04-09 22:49:03 +02:00
Juliusz Chroboczek
d887a216f0 Rework configuration file format.
The "users" entry is now a dictionary mapping user names to
passwords and permissions.  In order to allow for wildcards,
there is a new type of password, the wildcard password, and
an extra array called "fallback-users".

The field "allow-anonymous" no longer exists, this is now
the default behaviour.  The field "allow-subgroups" has been
renamed to "auto-subgroups".

We provide backwards compatibility for group definition files,
but not for the config.json file, where the old "admin" array
is simply ignored.
2024-04-09 22:49:03 +02:00
Juliusz Chroboczek
89f947df1f Rework handling of authorisation errors.
We'd sometimes return "Internal server error" on authentication
failures.  This should be gone now.
2024-03-03 13:43:50 +01:00
Juliusz Chroboczek
29e006037c Allow proxyURL to contain a path.
We now support or reasonable values for proxyURL, such as "http:"
or "/galene".
2024-02-24 12:46:30 +01:00
Juliusz Chroboczek
6756e7f7cc Add test for groupBase. 2024-02-24 12:27:19 +01:00
Juliusz Chroboczek
923d78eaa3 Fix handling of WHIP URLs.
We broke WHIP when we introduced splitPath.  Thanks to Tim Panton.
2024-02-22 23:31:03 +01:00
Juliusz Chroboczek
0f53bf0373 More tweaks to webserver error handling. 2024-01-18 01:02:56 +01:00
Juliusz Chroboczek
3ad6f27b17 Move .status.json to .status.
Keep a redirect for backwards compatibility.
2024-01-18 00:39:32 +01:00
Juliusz Chroboczek
b92cf0480a Implement splitPath.
Use it for parsing special paths instead of ad hoc code.
2024-01-17 22:28:21 +01:00
Juliusz Chroboczek
6455ae3a4c Fix error handling in groupBase. 2024-01-17 22:22:47 +01:00
Juliusz Chroboczek
a612e4d869 Use httpError in groupHandler. 2024-01-11 23:10:15 +01:00
Juliusz Chroboczek
03038eaf45 Obfuscate WHIP ids.
If the WHIP session is not authenticated, then the only thing
preventing an attacker from DELETEing the session is the session
URL.  Since client ids are known, obfuscate the id before using
it in the session URL.
2024-01-11 22:05:07 +01:00