Michael Mayer
db9b33ddea
Backend: Change alias name for map[string]interface{} from Value to Map
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-20 15:01:40 +01:00
Michael Mayer
01da5bdec7
CRC32: Move checksum generation to a dedicated package
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-20 14:56:07 +01:00
Michael Mayer
2df0b6e4b1
Server: Exclude .mp4 and .zip from compression and refactor vary #4018
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-20 12:48:42 +01:00
Michael Mayer
58bb52022f
Server: Refactor middleware registration #4018
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-20 11:47:39 +01:00
Michael Mayer
d98a1cb2ab
GZIP: Enable compression before API routes are registered #4018
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-19 22:46:31 +01:00
Michael Mayer
a4e2bb33b9
2FA: Rename "Auth Secret" to "App Password" for more clarity #782 #808
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-19 18:10:01 +01:00
graciousgrey
d3a67a6694
Tests: Add unit tests
2024-01-19 15:48:07 +01:00
graciousgrey
62ddac3142
Tests: Add unit tests
2024-01-19 15:29:09 +01:00
Michael Mayer
966c421cd4
Auth: Update internal/form/client_test.go #782 #808 #3943
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-19 15:12:47 +01:00
Michael Mayer
06a18f5818
Auth: Add "access_token" authentication provider type #782 #808 #3943
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-19 14:41:08 +01:00
Michael Mayer
4ba32a7220
2FA: Add two-factor authentication key model and tests #782 #808 #3943
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-19 13:45:30 +01:00
Michael Mayer
d70e7dd06d
Auth: Improve API authentication subcommand usage information #808
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-18 17:53:53 +01:00
Michael Mayer
f767f6a1d9
Auth: Rename "auth clear" command to "auth reset" for consistency #808
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-18 17:15:22 +01:00
Michael Mayer
7e7ba69982
Auth: Add client_uid and client_name to auth_sessions table #808 #3943
...
This also adds the ability to change the client role if needed and
improves the usage information and output of the CLI commands.
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-18 16:53:05 +01:00
Michael Mayer
271e7243db
Logs: Shorten the names of error log helper functions
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-18 11:23:59 +01:00
Michael Mayer
2ce272d60e
Auth: Add tests for "photoprism auth ls" terminal command #808
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-18 11:13:10 +01:00
Michael Mayer
2912ac9464
Security: Refactor cache headers, auth token validation & UI #782 #808
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-17 14:16:02 +01:00
Michael Mayer
d4317863f7
UX: Do not redirect users if they are already on the site root
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-16 21:56:26 +01:00
Michael Mayer
127b30dd31
Config: Allow CORS for additional file types when using a CDN #3931
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-16 21:25:29 +01:00
Michael Mayer
3946e2a16f
API: Refactor "404 Not Found" response handler #3931
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-16 20:56:43 +01:00
Michael Mayer
abfea6354c
Config: Allow CORS for fonts and CSS when using a CDN #3931
...
see https://www.w3.org/TR/css-fonts-3/#font-fetching-requirements
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-16 20:04:36 +01:00
graciousgrey
c478025513
Tests: Add unit tests #3943
2024-01-16 18:10:59 +01:00
graciousgrey
2bf65737d3
Tests: Add unit tests #3943
2024-01-16 18:10:59 +01:00
Michael Mayer
da10b30fdf
API: Add auth token to vary header for caching proxies and CDNs #3931
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-16 16:42:21 +01:00
Michael Mayer
c3b9b73d1d
API: Only allow CDNs to cache GET, HEAD, and OPTIONS requests #3931
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-16 16:17:16 +01:00
graciousgrey
e5aa76730f
Tests: Add unit tests #3943
2024-01-16 16:10:57 +01:00
graciousgrey
121a19c58c
Tests: Add unit tests #3943
2024-01-16 16:10:57 +01:00
Michael Mayer
02a1b12edb
Config: Update CORS header defaults and add /api/v1/echo endpoint #3931
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-16 14:36:08 +01:00
Michael Mayer
239708f00f
Config: Add options to configure CORS origin, headers and methods #3931
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-16 12:14:06 +01:00
graciousgrey
4e7a61ffe5
Tests: Add unit tests
2024-01-15 17:12:34 +01:00
Michael Mayer
c5f6a28448
Config: Add PHOTOPRISM_HTTP_CORS option for CDN users #3931 #3940
...
In addition, the Access-Control-Allow-Origin header is set to the same
URL if an Origin header is found in the request (experimental).
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-15 13:06:27 +01:00
Michael Mayer
e44262d4ea
Config: Ignore configured CDN URL if the same as the Site URL #3931
...
see https://docs.photoprism.app/getting-started/using-a-cdn/#cloudflare
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-15 10:54:03 +01:00
Michael Mayer
c38962e469
API: Deny client access if the scope is not authorized #782 #808
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-14 19:27:38 +01:00
Michael Mayer
5dedc8a7c0
Auth: Apply same scope when session is created from auth token #782 #808
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-14 18:53:27 +01:00
Michael Mayer
fed1d8ad95
Auth: Accept access token as passwd with fail rate limit #782 #808 #3943
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-14 18:28:17 +01:00
Michael Mayer
9586a9ec69
Auth: Refactor API to allow auth secrets to be used as tokens #808 #3943
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-14 12:01:26 +01:00
Michael Mayer
d7710adce0
Auth: Improve "auth add" and "client add" CLI commands #808 #3943
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-14 09:51:49 +01:00
Michael Mayer
e21e462f00
Auth: Improve "auth add" and "client add" CLI commands #808 #3943
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-13 16:27:05 +01:00
Michael Mayer
91eadbc21f
Auth: Reset existing user/browser sessions when upgrading #808 #3943
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-12 12:50:52 +01:00
Michael Mayer
34b41cf606
Config: Update default wallpaper image
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-12 12:46:18 +01:00
Michael Mayer
93bc8996bc
Entities: Update schema/mariadb.mmd
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-12 12:02:38 +01:00
Michael Mayer
c86764fa4b
Entities: Update database schema SQL and mariadb.mmd
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-12 10:30:11 +01:00
Michael Mayer
cf71582e3f
WebDAV: Require username when authenticating with basic auth #808 #3943
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-11 18:51:38 +01:00
Michael Mayer
e8ca9b8db2
WebDAV: Check if basic auth user matches the token, if set #808 #3943
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-11 12:49:31 +01:00
Michael Mayer
d481bc3d34
WebDAV: Add token authentication tests #808 #3943
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-11 12:08:39 +01:00
Michael Mayer
eff130cf90
WebDAV: Allow authentication with auth token and any username #808 #3943
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-11 11:37:36 +01:00
Michael Mayer
cc356abe03
WebDAV: Allow authentication with auth token and no username #808 #3943
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-10 18:03:38 +01:00
Michael Mayer
7d78ee803a
Use human-friendly secrets & names for personal access tokens #808 #3943
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-10 17:23:08 +01:00
Michael Mayer
94e361a8fd
WebDAV: Add authorization check based on auth tokens #782 #808 #3943
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-10 16:54:13 +01:00
Michael Mayer
7ef544fa53
Docs: Improve inline comments of the internal/server package #782 #3943
...
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-10 12:46:00 +01:00