Skip to content

Commit c61deb4

Browse files
Port @azure/postgresql-auth package from postgres-entra-auth repo
Migrates the standalone azure-postgresql-auth library into the monorepo as @azure/postgresql-auth, providing Entra ID authentication for PostgreSQL connections via both pg (node-postgres) and Sequelize clients. - getEntraTokenPassword() - acquires Entra ID token for PostgreSQL password - configureEntraIdAuth() - registers Sequelize beforeConnect hook - Uses warp build system with 4 targets (browser, react-native, esm, commonjs) - 19 unit tests with vitest - Optional peer deps: pg (>=8.0.0), sequelize (>=6.0.0) - CI pipeline and CODEOWNERS updated Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 57bee4d commit c61deb4

22 files changed

Lines changed: 1222 additions & 0 deletions

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -837,6 +837,9 @@
837837
# PRLabel: %Mgmt
838838
/sdk/policyinsights/arm-policyinsights/ @qiaozha @MaryGao @JialinHuang803
839839

840+
# PRLabel: %Postgresql
841+
/sdk/postgresql/postgresql-auth/ @maorleger @jeremymeng
842+
840843
# PRLabel: %Mgmt
841844
/sdk/postgresql/arm-postgresql/ @qiaozha @MaryGao @JialinHuang803
842845

pnpm-lock.yaml

Lines changed: 196 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/postgresql/ci.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.
2+
3+
trigger:
4+
branches:
5+
include:
6+
- main
7+
- release/*
8+
- hotfix/*
9+
paths:
10+
include:
11+
- sdk/postgresql/ci.yml
12+
- sdk/postgresql/postgresql-auth
13+
pr:
14+
branches:
15+
include:
16+
- main
17+
- feature/*
18+
- release/*
19+
- hotfix/*
20+
exclude:
21+
- feature/v4
22+
paths:
23+
include:
24+
- sdk/postgresql/ci.yml
25+
- sdk/postgresql/postgresql-auth
26+
extends:
27+
template: /eng/pipelines/templates/stages/archetype-sdk-client.yml
28+
parameters:
29+
ServiceDirectory: postgresql
30+
Artifacts:
31+
- name: azure-postgresql-auth
32+
safeName: azurepostgresqlauth
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Release History
2+
3+
## 1.0.0-beta.1 (Unreleased)
4+
5+
### Features Added
6+
7+
- Added `getEntraTokenPassword` function for acquiring Entra ID tokens as PostgreSQL passwords.
8+
- Added `configureEntraIdAuth` function for automatic Sequelize Entra ID authentication via `beforeConnect` hook.
9+
- Support for `pg` (node-postgres) and Sequelize clients as optional peer dependencies.
10+
11+
### Breaking Changes
12+
13+
### Bugs Fixed
14+
15+
### Other Changes
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2025 Microsoft
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)