Commit Graph

51 Commits

Author SHA1 Message Date
graciousgrey
1140ceea40 Tests: Add unit tests 2024-07-17 16:38:34 +02:00
graciousgrey
5e94686a0d Tests: Add unit tests 2024-07-16 17:29:26 +02:00
Michael Mayer
1f51d9cfea Auth: Add --remove flag to "photoprism passwd" command #782
see https://docs.photoprism.app/known-issues/#openid-connect-oidc

Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-07-09 17:40:26 +02:00
Michael Mayer
ec379d1ad3 Auth: Prevent admins from locking themselves out #782
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-07-09 13:50:34 +02:00
Michael Mayer
0afb4ddee9 OIDC: Add UpdateAuthID() method to User entity model #782
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-07-09 11:47:26 +02:00
Michael Mayer
fe9caaa83b OIDC: Improve CLI commands and add AuthIssuer to users and sessions #782
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-07-09 11:01:59 +02:00
Michael Mayer
11e5246e33 OIDC: Ensure subject IDs are unique and super-admins can edit them #782
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-07-08 18:16:24 +02:00
Michael Mayer
8db269a742 OIDC: Upgrade "zitadel/oidc" from v2 to v3 #782
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-07-06 11:27:03 +02:00
Michael Mayer
c970511c82 OIDC: Upgrade "zitadel/oidc" from v1 to v2 #782
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-07-06 11:15:23 +02:00
Michael Mayer
ecbe422893 OIDC: Allow to use name claim as username #782
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-07-05 13:13:45 +02:00
Michael Mayer
fbb0284efa OIDC: Allow to use nickname as username #782
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-07-05 10:47:09 +02:00
Michael Mayer
2230dfb216 OIDC: Set user avatar image from profile information #782
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-07-02 13:38:36 +02:00
graciousgrey
963aed43fc Tests: Add unit tests #782 2024-07-02 12:54:56 +02:00
Michael Mayer
a97f8d0795 API: Implement OIDC redirect endpoint #782
Requires further testing and refinement before it can be released.

Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-07-01 16:50:53 +02:00
knowmost
020e9e7e19 chore: fix some comments and typos
Signed-off-by: knowmost <knowmost@outlook.com>
2024-04-28 08:19:20 +02:00
Michael Mayer
2185618910 API: Refactor authentication failure rate limit #808 #3943
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-04-04 11:18:05 +02:00
graciousgrey
07e1eb0b11 Tests: Add unit tests #808 #3943 2024-03-22 14:57:32 +01:00
Michael Mayer
4425becb3d Auth: Implement 2FA setup and login in the web user interface #808 #3943
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-03-21 14:32:51 +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
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
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
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
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
graciousgrey
6b8a75f29f Tests: Add unit tests 2023-07-26 16:38:48 +02:00
graciousgrey
b59b954d1f Tests: Add unit tests 2023-07-26 16:38:48 +02:00
graciousgrey
ff25b5f755 Tests: Add unit tests 2023-07-25 18:42:18 +02:00
graciousgrey
c9d1413ddb Tests: Add more unit tests #3512 2023-07-24 15:02:38 +02:00
Michael Mayer
4931889b5e Auth: Improve privilege level change detection #3512
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-07-18 23:35:10 +02:00
graciousgrey
749d4b6d7e Tests: Add unit tests #3482 2023-06-23 18:38:22 +02:00
Michael Mayer
cc12f3f457 Auth: Improve sanitization of usernames and handles
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-03-15 22:41:59 +01:00
Michael Mayer
88367b4ff7 Auth: Refactor user model and path validation #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-03-13 17:52:48 +01:00
Michael Mayer
36d62b5506 Auth: Refactor user model and improve validation #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-03-13 17:36:56 +01:00
Michael Mayer
5b73101442 Auth: Refactor user roles and auth providers in entity model #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-03-13 16:04:37 +01:00
Michael Mayer
a425027a9b Auth: Prevent unauthorized users from using the application #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-03-10 13:20:16 +01:00
Michael Mayer
654b41afe5 Auth: Prevent duplicate usernames when renaming accounts #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-03-09 19:56:07 +01:00
Michael Mayer
50913e301c Auth: Prevent duplicate super admin accounts from being created #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-03-09 15:59:08 +01:00
Michael Mayer
60162b3fc5 Auth: Refactor user management API and CLI commands #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-03-08 23:30:39 +01:00
Michael Mayer
7c63a86f80 CLI: Restore user accounts on demand #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-02-20 20:24:04 +01:00
Michael Mayer
43d6a5e193 Auth: Improve user entity model and add unit tests #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-02-20 15:54:33 +01:00
Michael Mayer
f54512e334 Auth: Refactor user management commands #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-02-14 20:28:58 +01:00
Michael Mayer
cc38922cbe Auth: Add dummy LDAP service #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
2022-11-22 22:14:34 +01:00
Michael Mayer
f94ff54cc1 Auth: Improve account management page and config options #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
2022-10-19 05:09:09 +02:00
Michael Mayer
837669f796 Auth: Extend account settings with user details and avatar upload #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
2022-10-17 19:07:38 +02:00
Michael Mayer
884dea17de Security: Use individual preview tokens for each user account #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
2022-10-13 22:11:02 +02:00
Michael Mayer
6abbc39017 Security: Add http rate limiter and auto tls mode #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
2022-10-11 22:44:11 +02:00
Michael Mayer
6e74f16a77 Auth: Open album share links in the regular user interface #98 #782
Signed-off-by: Michael Mayer <michael@photoprism.app>
2022-10-02 11:38:30 +02:00
Michael Mayer
323d495840 Auth: Apply user rights and permissions in the search API #98 #782
Signed-off-by: Michael Mayer <michael@photoprism.app>
2022-09-30 00:42:19 +02:00
Michael Mayer
f5a8c5a45d Auth: Session and ACL enhancements #98 #1746
Signed-off-by: Michael Mayer <michael@photoprism.app>
2022-09-28 09:01:17 +02:00
Michael Mayer
5e7ff6b1b2 Auth: Add unique index to user_slug in auth_users table #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
2022-09-02 22:55:57 +02:00