Commit graph

944 commits

Author SHA1 Message Date
graciousgrey
27dda3bc2b Tests: Add unit tests 2024-01-23 16:13:27 +01:00
Michael Mayer
86dc89c4b9 Config: Show error if originals and storage path seem identical #1642
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-21 14:22:16 +01:00
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
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
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
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
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
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
graciousgrey
4e7a61ffe5 Tests: Add unit tests 2024-01-15 17:12:34 +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
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
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
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
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
e03dbe5d16 OAuth2: Refactor limit for number of access tokens / sessions #808 #3943
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-09 13:46:55 +01:00
Michael Mayer
3e924b70c7 API: Move handling of HTTP auth headers to pkg/header #808 #3943 #3959
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-09 10:58:47 +01:00
Michael Mayer
ec13ccb6d5 OAuth2: Enforce limit for number of access tokens / sessions #808 #3943
These changes ensure that OAuth2 clients cannot create an unlimited
number of access tokens (sessions) with their client credentials.

Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-08 16:57:07 +01:00
Michael Mayer
0e4d81853c API: Add .well-known/oauth-authorization-server route handler #808 #3943
This commit also adds an /api/v1/oauth/logout endpoint that allows
clients to delete their sessions (access tokens) as needed.

Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-08 14:53:39 +01:00
Michael Mayer
f8e0615cc8 Auth: Ensure backwards compatibility for existing API clients #808 #3943
These changes ensure that the new (SHA256) session ID is returned in the
"session_id" field, so that developers have time to update their client
implementations to use the new "access_token" field.

Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-07 12:25:56 +01:00
Michael Mayer
0d2f8be522 Auth: Use hashed auth tokens for enhanced security #3943 #808 #782
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-06 17:35:19 +01:00
Michael Mayer
0ca37b2c92 Docs: Update year in backend and frontend package file headers
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-05 16:38:36 +01:00
Michael Mayer
713593da4e Auth: Add CLI command to create access tokens for apps #782 #808 #3943
You can now run "photoprism auth add" to create new client access tokens
that allow external applications to use the built-in REST API.

Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-05 16:31:07 +01:00
graciousgrey
04e8dfe6cb Tests: Add unit tests #3943 2023-12-21 16:00:28 +01:00
graciousgrey
0f8d5073dd Tests: Add unit tests #3943 2023-12-21 11:17:33 +01:00
graciousgrey
b6cb478cfb Tests: Add unit tests 2023-12-19 17:03:50 +01:00
graciousgrey
0c4c3215f4 Tests: Add unit tests #3943 2023-12-14 14:19:43 +01:00
Michael Mayer
467f7b1585 OAuth2: Add Client Credentials Authentication #213 #782 #808 #3730 #3943
This adds standard OAuth2 client credentials and bearer token support as
well as scope-based authorization checks for REST API clients. Note that
this initial implementation should not be used in production and that
the access token limit has not been implemented yet.

Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-12-12 18:42:50 +01:00
graciousgrey
5d06770ab6 Tests: Update photo fixtures 2023-11-21 17:07:39 +01:00
graciousgrey
313948b103 Tests: Add altitude to photo fixtures 2023-10-26 12:28:41 +02:00
Michael Mayer
60efc86649 Metadata: Use UTC offset if actual time zone is unknown #3780
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-10-21 00:11:11 +02:00
Lukas
8524fcc149
Adds Galaxy S10 to cameraModels (#3828) 2023-10-17 13:28:44 +02:00
Michael Mayer
2fed4b549c Index: Refactor optimization worker logs and queries #3124 #3742
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-10-15 11:02:15 +02:00
graciousgrey
170c6bb3dc Tests: Update fixtures 2023-10-13 14:00:08 +02:00
Michael Mayer
09ad17d10a Cards View: Improve camera and lens information #2040 #3077 #3816
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-10-13 11:35:43 +02:00
Michael Mayer
0470899016 Metadata: Add additional camera make and model mappings #3802
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-10-10 16:52:00 +02:00
Michael Mayer
3c0f1f37ad Share: Ensure that shares are always loaded in the user entity model
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-10-10 14:32:04 +02:00
Michael Mayer
80dd926f2d Share: Improve query validation in the search and albums API
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-10-07 17:33:04 +02:00
Michael Mayer
0f321b10bc Logs: Update log levels and messages
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-10-07 16:00:23 +02:00
Michael Mayer
ede4b3b897 Config: Refactor authentication settings #782
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-10-07 11:09:27 +02:00
Michael Mayer
10a58f2097 Metadata: Improve camera make and model string normalization #2040
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-10-06 09:51:40 +02:00
Michael Mayer
61e7de69a4 Metadata: Improve camera make and model string normalization #2040
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-10-06 09:24:12 +02:00
Michael Mayer
b0ef310b96 Metadata: Improve camera make string normalization #2040
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-10-06 03:33:03 +02:00
Michael Mayer
604849e92c Search: Include RAW files in results by default #2040
With these changes the size and type of the RAW file as well as other
details can be displayed in the Cards View. This also improves the
indexing of camera and lens metadata.

Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-10-06 02:22:48 +02:00