oidc_validator
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pg_oidc_validator_rust | 0.1.0 | SEC | Unknown | Rust |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 7180 | oidc_validator | No | Yes | Yes | No | No | No | - |
Configure oauth_validator_libraries=‘oidc_validator’. no valid license, distribution suspend
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0.1.0 | 1817161514 | pg_oidc_validator_rust | - |
| RPM | PIGSTY | 0.1.0 | 1817161514 | pg_oidc_validator_rust_$v | - |
| DEB | PIGSTY | 0.1.0 | 1817161514 | postgresql-$v-pg-oidc-validator-rust | - |
| OS / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 0.1.0 el8.x86_64.pg18 : pg_oidc_validator_rust_18 pg_oidc_validator_rust_18-0.1.0-2PGSTY.el8.x86_64.rpm
| N/A | N/A | N/A | N/A |
| el8.aarch64 | PIGSTY 0.1.0 el8.aarch64.pg18 : pg_oidc_validator_rust_18 pg_oidc_validator_rust_18-0.1.0-2PGSTY.el8.aarch64.rpm
| N/A | N/A | N/A | N/A |
| el9.x86_64 | PIGSTY 0.1.0 el9.x86_64.pg18 : pg_oidc_validator_rust_18 pg_oidc_validator_rust_18-0.1.0-2PGSTY.el9.x86_64.rpm
| N/A | N/A | N/A | N/A |
| el9.aarch64 | PIGSTY 0.1.0 el9.aarch64.pg18 : pg_oidc_validator_rust_18 pg_oidc_validator_rust_18-0.1.0-2PGSTY.el9.aarch64.rpm
| N/A | N/A | N/A | N/A |
| el10.x86_64 | PIGSTY 0.1.0 el10.x86_64.pg18 : pg_oidc_validator_rust_18 pg_oidc_validator_rust_18-0.1.0-2PGSTY.el10.x86_64.rpm
| N/A | N/A | N/A | N/A |
| el10.aarch64 | PIGSTY 0.1.0 el10.aarch64.pg18 : pg_oidc_validator_rust_18 pg_oidc_validator_rust_18-0.1.0-2PGSTY.el10.aarch64.rpm
| N/A | N/A | N/A | N/A |
| d12.x86_64 | PIGSTY 0.1.0 d12.x86_64.pg18 : postgresql-18-pg-oidc-validator-rust postgresql-18-pg-oidc-validator-rust_0.1.0-2PGSTY~bookworm_amd64.deb
| N/A | N/A | N/A | N/A |
| d12.aarch64 | PIGSTY 0.1.0 d12.aarch64.pg18 : postgresql-18-pg-oidc-validator-rust postgresql-18-pg-oidc-validator-rust_0.1.0-2PGSTY~bookworm_arm64.deb
| N/A | N/A | N/A | N/A |
| d13.x86_64 | PIGSTY 0.1.0 d13.x86_64.pg18 : postgresql-18-pg-oidc-validator-rust postgresql-18-pg-oidc-validator-rust_0.1.0-2PGSTY~trixie_amd64.deb
| N/A | N/A | N/A | N/A |
| d13.aarch64 | PIGSTY 0.1.0 d13.aarch64.pg18 : postgresql-18-pg-oidc-validator-rust postgresql-18-pg-oidc-validator-rust_0.1.0-2PGSTY~trixie_arm64.deb
| N/A | N/A | N/A | N/A |
| u22.x86_64 | PIGSTY 0.1.0 u22.x86_64.pg18 : postgresql-18-pg-oidc-validator-rust postgresql-18-pg-oidc-validator-rust_0.1.0-2PGSTY~jammy_amd64.deb
| N/A | N/A | N/A | N/A |
| u22.aarch64 | PIGSTY 0.1.0 u22.aarch64.pg18 : postgresql-18-pg-oidc-validator-rust postgresql-18-pg-oidc-validator-rust_0.1.0-2PGSTY~jammy_arm64.deb
| N/A | N/A | N/A | N/A |
| u24.x86_64 | PIGSTY 0.1.0 u24.x86_64.pg18 : postgresql-18-pg-oidc-validator-rust postgresql-18-pg-oidc-validator-rust_0.1.0-2PGSTY~noble_amd64.deb
| N/A | N/A | N/A | N/A |
| u24.aarch64 | PIGSTY 0.1.0 u24.aarch64.pg18 : postgresql-18-pg-oidc-validator-rust postgresql-18-pg-oidc-validator-rust_0.1.0-2PGSTY~noble_arm64.deb
| N/A | N/A | N/A | N/A |
| u26.x86_64 | PIGSTY 0.1.0 u26.x86_64.pg18 : postgresql-18-pg-oidc-validator-rust postgresql-18-pg-oidc-validator-rust_0.1.0-2PGSTY~resolute_amd64.deb
| N/A | N/A | N/A | N/A |
| u26.aarch64 | PIGSTY 0.1.0 u26.aarch64.pg18 : postgresql-18-pg-oidc-validator-rust postgresql-18-pg-oidc-validator-rust_0.1.0-2PGSTY~resolute_arm64.deb
| N/A | N/A | N/A | N/A |
Build
You can build the RPM / DEB packages for pg_oidc_validator_rust using pig build:
Install
You can install pg_oidc_validator_rust directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Preload:
Usage
Sources:
- Official README
- Validator configuration source
- PostgreSQL OAuth callback implementation
- PostgreSQL 18 OAuth authentication documentation
oidc_validator is a PostgreSQL 18 OAuth validator module written in Rust. It validates JWT access tokens against an OpenID Connect issuer and returns the token subject as the authenticated identity. It is a headless authentication library, not a SQL extension, so it creates no SQL objects and does not use CREATE EXTENSION.
Core Workflow
Install oidc_validator.so in PostgreSQL’s library directory, then configure the PostgreSQL 18 validator module:
Add an OAuth rule to pg_hba.conf:
Provide the validator configuration to the PostgreSQL server process:
Restart PostgreSQL after changing oauth_validator_libraries or the server-process environment. OAuth clients can then authenticate through a matching pg_hba.conf rule.
Configuration Index
POSTGRES_OIDC_ISSUER: issuer URL without the well-known discovery suffix.POSTGRES_OIDC_CLIENT_ID: OIDC application client ID.POSTGRES_OIDC_AUDIENCE: required token audience, commonly the client ID.oauth_validator_libraries: PostgreSQL 18 setting that loads the trusted validator module.
Requirements and Caveats
- Upstream version
0.1.0targets PostgreSQL 18 and requires PostgreSQL to be built with OpenSSL and libcurl. - Only JWT-shaped bearer tokens are accepted. Opaque access tokens are rejected.
- Validation performs OIDC discovery and JWKS retrieval, so the PostgreSQL server must be able to reach the issuer over TLS.
- The callback currently ignores the requested PostgreSQL role and authorizes based on successful token validation. Do not set
delegate_ident_mapping=1with this implementation; keep PostgreSQL’s standard exact-name orpg_ident.confmapping so the returned token subject is checked against the requested role.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)