Commit Graph
119 Commits
Author SHA1 Message Date
binwiederhier 25520c4505 WIP: Access cache 2026-05-28 17:13:14 -04:00
binwiederhier 61dd788dac WIP: Email verification 2026-03-29 22:47:38 -04:00
binwiederhier 3d9ce69042 PG races 2026-03-16 15:48:36 -04:00
binwiederhier 59ce581ba2 Fix postgres primary/replica races 2026-03-16 11:21:21 -04:00
binwiederhier 6b38acb23a Route authorization query to read-only database replica to reduce primary database load 2026-03-15 22:01:19 -04:00
binwiederhier ac65df1e83 Move auth queries to primary, redo health check loop 2026-03-11 20:26:29 -04:00
binwiederhier f1865749d7 WIP: Postgres read-only replica 2026-03-10 22:17:40 -04:00
binwiederhier 0d4b1b00e6 Users() optimization to help with startup time 2026-03-06 14:46:53 -05:00
binwiederhier ea4739f79b Extract ExecTx 2026-03-02 19:45:35 -05:00
binwiederhier 11c79a6369 Refine again 2026-03-01 14:24:06 -05:00
binwiederhier 039566bcaf REmove unused 2026-03-01 11:59:24 -05:00
binwiederhier 544ce112b5 Manual review 2026-03-01 11:44:22 -05:00
binwiederhier c19377109e Small refinements 2026-02-28 21:15:51 -05:00
binwiederhier ccbd02331c Re-add execTx 2026-02-28 19:49:01 -05:00
binwiederhier 542aa403d2 Re-order functions 2026-02-28 19:34:09 -05:00
binwiederhier ebb48e217d Merge user store and manager 2026-02-28 17:35:35 -05:00
binwiederhier c66fa92341 Re-add tx integrity 2026-02-26 16:54:56 -05:00
binwiederhier 28a436c0d2 Optimizations 2026-02-23 14:11:36 -05:00
binwiederhier b02366b42b Make more consistent 2026-02-23 13:49:54 -05:00
binwiederhier 850a9d4cc4 Fix bug with provisioned token removal 2026-02-22 20:28:37 -05:00
binwiederhier 07c3e280bf Refactor user package to Store interface with PostgreSQL support
Extract database operations from Manager into a Store interface with
SQLite and PostgreSQL implementations using a shared commonStore.
Split SQLite migrations into store_sqlite_migrations.go, use shared
schema_version table for PostgreSQL, rename user_user/user_tier tables
to "user"/tier, and wire up database-url in CLI commands.
2026-02-16 22:39:54 -05:00
binwiederhier ceda5ec3d8 Move things in user package 2026-02-16 21:04:15 -05:00
binwiederhier 5244e0be14 Fix tests 2025-08-09 10:04:57 -04:00
binwiederhier ea338ae4fa Make it easy to build without Stripe 2025-08-07 16:41:39 +02:00
binwiederhier c4c4916bc8 Do not allow changing tokens, user role, or delete users 2025-08-04 22:22:59 +02:00
Hunter Kehoe 81463614c9 prevent changing a provisioned user's password 2025-08-03 16:07:24 -06:00
binwiederhier a1c6dd2085 Comments 2025-07-31 11:28:27 +02:00
binwiederhier 9f987e66fa Make sure tokens are updated instead of deleted/re-added 2025-07-31 08:36:05 +02:00
binwiederhier b91ff5f0b5 Move stuff to util.go 2025-07-31 07:33:11 +02:00
binwiederhier 23ec7702fc Add "auth-tokens" 2025-07-31 07:08:35 +02:00
binwiederhier 07e9670a09 Fix bug in test 2025-07-27 22:33:29 +02:00
binwiederhier fe545423c5 Change to auth-(users|access), upgrade manually added users to provision users 2025-07-27 12:10:16 +02:00
binwiederhier f3c67f1d71 Refuse to update manually created users 2025-07-27 11:02:34 +02:00
binwiederhier 141ddb3a51 Comments 2025-07-26 12:20:11 +02:00
binwiederhier f99801a2e6 Add "ntfy user hash" 2025-07-26 12:14:21 +02:00
binwiederhier 4457e9e26f Migration 2025-07-26 11:16:33 +02:00
binwiederhier f59df0f40a Works 2025-07-21 17:44:00 +02:00
binwiederhier c0b5151bae Predefined users 2025-07-10 20:50:29 +02:00
binwiederhier efef587671 WIP: Predefined users 2025-07-07 22:36:01 +02:00
binwiederhier 0de1990c01 Increase number of access tokens per user to 60 2025-05-25 12:23:02 -04:00
binwiederhier 4dc3b38c95 Allow adding/changing user with password hash via v1/users API 2025-05-24 09:31:57 -04:00
Tom Hubrecht 44b7c2f198 user: Allow changing the hashed password directly
This adds the detection of `NTFY_PASSWORD_HASH` when creating a user or
changing its passsword so that scripts don't have to manipulate the bare
password.
2025-05-21 16:34:14 +02:00
binwiederhier 7d755ce604 Add comments and another test to ACL fix 2023-11-18 21:50:01 -05:00
binwiederhier f64dbcb6b2 Merge branch 'main' into sandman7920/main 2023-11-18 06:28:48 -05:00
binwiederhier 22f48c5ad3 Change mod path 2023-11-16 20:54:58 -05:00
Nikolay Zlatev 7a5572ad7c user.Manager: further improve ACL write/read order
For each user, we should test in order `THE_LONGEST_RULE`->`WRITE_PERMISSION`
2023-10-16 09:41:49 +03:00
Nikolay Zlatev 5c9cebf059 user.Manager: fix ACL write, read order
This should fix "read-only access to topic *" being applied before "read-write access to topic _PREFIX_*"
Before this if we have:

ntfy access user "mytopic*" rw
ntfy access user "*" ro

read-only access rule was applied first and user couldn't write to
mytopic*
2023-10-13 15:41:17 +03:00
binwiederhier a5f0670f7f ACLs and underscores, resolves #840 2023-08-18 22:44:52 +02:00
binwiederhier 3e3b556108 Fix excess token deletion bug 2023-08-17 21:42:40 +02:00
binwiederhier 48a5a55e2f Release notes 2023-06-28 12:54:13 -04:00