mirror of
https://github.com/dredx/prole.git
synced 2026-09-23 10:13:58 +00:00
- Copy pg-knoe-auth/ wholesale from upstream/knoe-db/20260523 (Task 1 of docs/plans/junie/upstream-knoe-db-20260523-integration.md). - Extension: PG18 OAUTHBEARER JWT validator using libcurl + OpenSSL RS256. - knoe-db/Dockerfile: add libcurl4-openssl-dev to dev deps; COPY src/ and build with make USE_PGXS=1 install after tds_fdw. - NOT enabled in the default database build (absent from 20_create_extensions.sh). To enable: CREATE EXTENSION pg_knoe_auth; (requires pg_hba.conf oauth_issuer). Closes Task 1 of upstream-knoe-db-20260523-integration.md.
40 lines
1.1 KiB
Makefile
40 lines
1.1 KiB
Makefile
# Makefile for pg_knoe_auth integration tests (pg_regress style)
|
|
# Run with: make installcheck
|
|
#
|
|
# Prerequisites: PG18 running with pg_knoe_auth loaded, mock_jwks.py running.
|
|
# See README.md for full setup instructions.
|
|
|
|
PGPORT ?= 5432
|
|
PGHOST ?= localhost
|
|
PGUSER ?= postgres
|
|
MOCK_PORT ?= 9999
|
|
MOCK_URL = http://localhost:$(MOCK_PORT)
|
|
|
|
# pg_regress test list (order matters — cache tests must run after valid_token)
|
|
REGRESS = valid_token \
|
|
expired_token \
|
|
wrong_iss \
|
|
wrong_aud_string \
|
|
wrong_aud_array \
|
|
right_aud_array \
|
|
tampered_sig \
|
|
kid_unknown \
|
|
jwks_unreachable_first_call \
|
|
jwks_unreachable_after_cache
|
|
|
|
PG_REGRESS = $(shell pg_config --pgxs 2>/dev/null | xargs -I{} dirname {} | xargs -I{} echo {}/../../src/test/regress/pg_regress 2>/dev/null || echo pg_regress)
|
|
|
|
installcheck: sql/valid_token.sql
|
|
$(PG_REGRESS) \
|
|
--inputdir=. \
|
|
--outputdir=results \
|
|
--host=$(PGHOST) \
|
|
--port=$(PGPORT) \
|
|
--user=$(PGUSER) \
|
|
$(REGRESS)
|
|
|
|
clean:
|
|
rm -rf results/
|
|
|
|
.PHONY: installcheck clean
|