chore: support Entra authentication for Azure Database for PostgreSQL (#31855)
* chore: support Entra authentication for Azure Database for PostgreSQL Signed-off-by: Arjan Randhawa <arjan_randhawa@outlook.com> * chore: refactor methods (pr comments) Signed-off-by: Arjan Randhawa <arjan_randhawa@outlook.com> * chore: remove unsued helper function Signed-off-by: Arjan Randhawa <arjan_randhawa@outlook.com> * chore: Use Config over ConfigReader (PR Comments) Signed-off-by: Arjan <arjan_randhawa@outlook.com> * chore: Use consistent config name Signed-off-by: Arjan <arjan_randhawa@outlook.com> --------- Signed-off-by: Arjan Randhawa <arjan_randhawa@outlook.com> Signed-off-by: Arjan <arjan_randhawa@outlook.com>
This commit is contained in:
+26
@@ -592,6 +592,32 @@ export interface Config {
|
||||
*/
|
||||
connection:
|
||||
| string
|
||||
| {
|
||||
/**
|
||||
* The specific config for Azure database for PostgreSQL connections with Entra authentication
|
||||
*/
|
||||
type: 'azure';
|
||||
/**
|
||||
* Optional Azure token credential configuration
|
||||
*/
|
||||
tokenCredential?: {
|
||||
/**
|
||||
* How early before an access token expires to refresh it with a new one.
|
||||
* Defaults to 5 minutes
|
||||
* Supported formats:
|
||||
* - A string in the format of '1d', '2 seconds' etc. as supported by the `ms` library.
|
||||
* - A standard ISO formatted duration string, e.g. 'P2DT6H' or 'PT1M'.
|
||||
* - An object with individual units (in plural) as keys, e.g. `{ days: 2, hours: 6 }`.
|
||||
*/
|
||||
tokenRenewableOffsetTime?: string | HumanDuration;
|
||||
clientId?: string;
|
||||
/**
|
||||
* @visibility secret
|
||||
*/
|
||||
clientSecret?: string;
|
||||
tenantId?: string;
|
||||
};
|
||||
}
|
||||
| {
|
||||
/**
|
||||
* The specific config for cloudsql connections
|
||||
|
||||
Reference in New Issue
Block a user