Commit Graph
51 Commits
Author SHA1 Message Date
steve-chavez 09b088d8ff change: change log-query string value to bool
BREAKING CHANGE

As discussed on https://github.com/PostgREST/postgrest/issues/3934#issuecomment-3362806777,
this changes log-query to use a bool value, this:

- Simplifies config for users.
- Reduces effort in testing the different combinations.

Closes #3934
2025-10-03 12:17:12 -05:00
steve-chavez fd127f449c docs: correct order of jwt claims sections 2025-07-30 05:14:43 -05:00
Michal KleczekandGitHub 77ff11de95 feat: JWT cache implementation based on sieve algorithm (#4084)
Changes:

1. Refactoring and some cleanup of JWT handling code:
* Instead of caching AuthResult cache decoded claims (which signature was verified). Validating claims and determining role is done after cache lookup
* Cleaned up API so that usage of it is simplified: lookupJwtCache cache key >>= parseClaims configJwtAud time
* Handling of JwtCacheState initialization and updates of configuration is encapsulated in Auth.JwtCache module

2. Generic high performance (hopefully) scalable, dynamically resizeable cache implementation based on stm, stm-hamt and sieve algorithm. It also integrates with PostgREST measurements infrastructure providing usage stats (ie. hit ratio, evictions count)
2025-07-29 18:51:41 -05:00
Wolfgang Walther 55eafdf352 chore(deps): update nixpkgs to 25.05 2025-07-11 15:53:06 +00:00
Taimoor ZaeemandSteve Chavez 000cb87ec1 fix: allow db-extra-search-path to accept empty value 2025-05-29 14:25:28 -05:00
Wolfgang Walther 2d5d5ed704 docs: apply redirects
Those redirect, so we might as well hardcode the them.
2025-05-28 09:09:13 +02:00
Laurence Isla c5cba11ecb docs: fix link to SQL Query Logs 2025-05-09 20:59:51 -05:00
steve-chavez 257a7d1488 docs: jwt role extraction link to config
The feature section was missing a link to its config.

Also shorten the section name.
2025-05-09 20:45:37 -05:00
Laurence Isla e0c5b3a314 correct: handle array values in JWT aud claim correctly 2025-05-07 21:54:32 +00:00
Laurence IslaandGitHub 9c880c082a feat: allow logging the SQL query to stderr
- Logs the main SQL query when `log-query=main-query`.
- Only logs at the current `log-level`.
2025-02-18 19:17:26 -05:00
M. Taimoor ZaeemandSteve Chavez af6b79d4d7 feat: support string comparison for jwt-role-claim-key 2024-12-12 08:47:06 -05:00
Christophe EymardandGitHub c5a9455959 docs: Add an example for PGRST_APP_SETTINGS_* (#3804) 2024-12-01 14:41:39 -05:00
steve-chavez 28ebe37e07 docs: example for server-host 2024-10-07 17:14:43 -05:00
Andrei DziahelandGitHub 06cbc4be36 config forbid same server-port and admin-server-port (#3559)
* fix: forbid same server-port and admin-server-port

Forbids server-port and admin-server-port from being equal altogether,
despite they might not conflict at all in case admin and app are bound
to different addresses. Implemented as per the discussion at
https://github.com/PostgREST/postgrest/issues/3508#issuecomment-2125123633
2024-07-03 13:02:02 -05:00
Andrei DziahelandGitHub 9d7e87b3e0 feat: add the "admin-server-host" config to set the host for the admin server 2024-06-24 14:47:19 -05:00
Laurence Isla b52937ef4a docs: clarify what is logged when "log-level=debug" 2024-06-12 18:19:16 -05:00
Laurence IslaandSteve Chavez 5afa321e89 docs: add "Listener" page
Co-authored-by: Steve Chavez <stevechavezast@gmail.com>
2024-06-12 18:19:16 -05:00
Taimoor ZaeemandSteve Chavez 8cbcf9867b feat: add config db-hoisted-tx-settings to allow only hoisted function settings 2024-05-21 19:50:03 -05:00
Wolfgang Walther aef29d49ba docs: Mark db_tx_end as db-configurable 2024-05-12 11:53:59 +02:00
steve-chavez 0060abeb01 feat: /live and /ready respond with 500 on failure
503 is still used by /ready to indicate a transient state
that can be recovered from.
2024-05-08 17:19:48 -05:00
steve-chavez 3e615bd0d9 feat: add log-level=debug 2024-04-22 21:36:29 -05:00
steve-chavez 9405a62de8 docs: update links to cache/config notify reload 2024-03-08 10:31:55 -05:00
Wolfgang WaltherandWolfgang Walther 944b02fbb8 docs: Rename Stored Procedures to Functions consistently
This avoids confusing our RPCs with actual CREATE PROCEDURE, which we don't
support.

References https://github.com/PostgREST/postgrest-docs/issues/147
2024-02-21 09:40:11 +01:00
Wolfgang WaltherandWolfgang Walther fcd29caecf docs: Use code-block postgres consistently 2024-02-19 21:54:15 +01:00
Wolfgang WaltherandWolfgang Walther b1deb049c8 docs: Clarify behavior of jwt-aud and tokens without aud claim
Resolves https://github.com/PostgREST/postgrest-docs/issues/479
2024-02-19 21:54:15 +01:00
Wolfgang Walther 72de95b069 docs: Fix spelling mistakes 2024-02-18 19:35:40 +01:00
Laurence IslaandSteve Chavez 1e65a72264 Add missing in-db configuration for jwt-cache-max-lifetime 2023-12-12 16:36:24 -05:00
steve-chavez cf258ef499 fix: add missing pgrst.server_timing_enabled 2023-12-12 10:58:22 -05:00
Tim AbdullaandGitHub 2bb9cee996 Add documentation for aggregate functions (#701) 2023-12-01 11:38:42 -05:00
steve-chavez d15e357d2e reference: media type handlers 2023-11-30 23:27:06 -05:00
Laurence IslaandGitHub 84152b483a Remove db-use-legacy-gucs 2023-11-29 15:37:25 -05:00
Andrei DziahelandGitHub 7b5c2f03fc introducing server-timing-header config parameter (#700) 2023-11-24 16:50:28 -05:00
Andrei DziahelandSteve Chavez 9eda78eda5 server-port can be 0
Introduces special value of 0 for port to be assigned randomy
2023-11-23 22:35:28 -05:00
Taimoor ZaeemandGitHub 57ceabb260 add documentation for server-cors-allowed-origins config (#688) 2023-10-30 11:08:12 -05:00
Taimoor ZaeemandGitHub bae8dc3283 add documentation for JWT caching (#683) 2023-10-10 23:22:41 -03:00
Taimoor ZaeemandSteve Chavez ff3a3a9100 add db-pool-automatic-recovery 2023-08-25 13:34:48 -05:00
steve-chavez 095d43ff75 add dynamic schemas example
Closes #644
2023-08-10 08:49:55 -05:00
steve-chavez 291b6f3587 add different ways to specify the connection string
Closes #576
2023-08-10 08:49:55 -05:00
steve-chavez fefd0e2e83 dry config and make it responsive
* shorten connection pool
* move securing execution plan
* shorten config intro page
2023-07-31 19:22:26 -05:00
Laurence IslaandGitHub fdf85773e7 Fix jwt_secret in example 2023-06-14 14:25:54 -05:00
steve-chavez ee6b9c5224 pin version to 11.0.1 2023-06-07 19:56:05 -05:00
steve-chavez c62d24c993 references: add dynamic pool 2023-06-07 19:56:05 -05:00
paulocrandLaurence Isla e7d63a2b27 Fix boolean configuration example 2023-06-05 16:06:37 -05:00
steve-chavez d59e2498be add pre-config function 2023-05-28 10:23:37 -05:00
steve-chavez 1c15d3d35b remove note and put it at the start 2023-05-28 10:23:37 -05:00
steve-chavez 232c6dc702 dry config settings
Environment variables names and in-db configs on the table.
2023-05-28 10:23:37 -05:00
steve-chavez fff0eae77e Fix in-db config settings 2023-05-27 22:23:44 -05:00
steve-chavez 1de06f5332 add openapi overriding 2023-05-11 01:37:50 -03:00
steve-chavez cb7d70c197 add trace header 2023-05-11 01:37:50 -03:00
steve-chavez fc635d18ae split the API reference 2023-05-10 14:21:31 -03:00