zeebe-node
Advanced tools
Comparing version 8.3.1 to 8.3.2
@@ -0,1 +1,9 @@ | ||
# 8.3.2 | ||
## New Features | ||
_New shiny stuff_ | ||
- Added support for providing a value for a `scope` field in the OAuth request. This can be set with environment variable `ZEEBE_TOKEN_SCOPE`, or by passing a `scope` field as part of the `oAuth` config options for a `ZBClient`. This is needed to support OIDC / EntraID. Thanks to [@nikku](https://github.com/nikku) for the implementation. See PR [#363](https://github.com/camunda-community-hub/zeebe-client-node-js/pull/363) for more details. | ||
# 8.3.1 | ||
@@ -2,0 +10,0 @@ |
@@ -13,2 +13,3 @@ import { CustomSSL } from './GrpcClient'; | ||
ZEEBE_TOKEN_AUDIENCE: string; | ||
ZEEBE_TOKEN_SCOPE: string; | ||
ZEEBE_AUTHORIZATION_SERVER_URL: string; | ||
@@ -46,3 +47,3 @@ ZEEBE_CAMUNDA_CLOUD_CLUSTER_ID: string; | ||
camundaCloud?: import("./interfaces-published-contract").CamundaCloudConfig | undefined; | ||
hostname: string; | ||
hostname: string | null; | ||
port: string; | ||
@@ -54,2 +55,3 @@ onReady?: (() => void) | undefined; | ||
audience?: string | undefined; | ||
scope?: string | undefined; | ||
clientId?: string | undefined; | ||
@@ -81,3 +83,3 @@ clientSecret?: string | undefined; | ||
camundaCloud?: import("./interfaces-published-contract").CamundaCloudConfig | undefined; | ||
hostname: string | undefined; | ||
hostname: string | null; | ||
port: string; | ||
@@ -89,2 +91,3 @@ onReady?: (() => void) | undefined; | ||
audience?: string | undefined; | ||
scope?: string | undefined; | ||
clientId?: string | undefined; | ||
@@ -116,3 +119,3 @@ clientSecret?: string | undefined; | ||
camundaCloud?: import("./interfaces-published-contract").CamundaCloudConfig | undefined; | ||
hostname: string | undefined; | ||
hostname: string | null; | ||
port: string; | ||
@@ -124,2 +127,3 @@ onReady?: (() => void) | undefined; | ||
audience?: string | undefined; | ||
scope?: string | undefined; | ||
clientId?: string | undefined; | ||
@@ -151,3 +155,3 @@ clientSecret?: string | undefined; | ||
camundaCloud?: import("./interfaces-published-contract").CamundaCloudConfig | undefined; | ||
hostname: string | undefined; | ||
hostname: string | null; | ||
port: string; | ||
@@ -159,2 +163,3 @@ onReady?: (() => void) | undefined; | ||
audience?: string | undefined; | ||
scope?: string | undefined; | ||
clientId?: string | undefined; | ||
@@ -161,0 +166,0 @@ clientSecret?: string | undefined; |
@@ -28,3 +28,3 @@ "use strict"; | ||
...ConfigurationHydrator.getRetryConfiguration(options), | ||
...ConfigurationHydrator.getTenantId(options) | ||
...ConfigurationHydrator.getTenantId(options), | ||
}; | ||
@@ -68,2 +68,3 @@ // inherit oAuth custom root certificates, unless | ||
const audience = ConfigurationHydrator.ENV().ZEEBE_TOKEN_AUDIENCE; | ||
const scope = ConfigurationHydrator.ENV().ZEEBE_TOKEN_SCOPE; | ||
const authServerUrl = ConfigurationHydrator.ENV() | ||
@@ -81,2 +82,3 @@ .ZEEBE_AUTHORIZATION_SERVER_URL; | ||
audience, | ||
scope, | ||
cacheOnDisk: true, | ||
@@ -229,2 +231,3 @@ clientId: clientId, | ||
'ZEEBE_TOKEN_AUDIENCE', | ||
'ZEEBE_TOKEN_SCOPE', | ||
'ZEEBE_AUTHORIZATION_SERVER_URL', | ||
@@ -241,3 +244,3 @@ 'ZEEBE_CAMUNDA_CLOUD_CLUSTER_ID', | ||
'ZEEBE_CLIENT_SSL_CERT_CHAIN_PATH', | ||
'ZEEBE_TENANT_ID' | ||
'ZEEBE_TENANT_ID', | ||
]); | ||
@@ -244,0 +247,0 @@ ConfigurationHydrator.getTenantId = (options) => { var _a; return ({ tenantId: (_a = options === null || options === void 0 ? void 0 : options.tenantId) !== null && _a !== void 0 ? _a : ConfigurationHydrator.ENV().ZEEBE_TENANT_ID }); }; |
@@ -51,3 +51,3 @@ import { MaybeTimeDuration } from 'typed-duration'; | ||
camundaCloud?: CamundaCloudConfig; | ||
hostname?: string; | ||
hostname?: string | null; | ||
port?: string; | ||
@@ -54,0 +54,0 @@ onReady?: () => void; |
@@ -7,2 +7,4 @@ /// <reference types="node" /> | ||
audience: string; | ||
/** OAuth Scope */ | ||
scope?: string; | ||
clientId: string; | ||
@@ -22,2 +24,3 @@ clientSecret: string; | ||
audience: string; | ||
scope?: string; | ||
url: string; | ||
@@ -38,3 +41,5 @@ clientId: string; | ||
/** OAuth Audience */ | ||
audience, cacheDir, clientId, clientSecret, | ||
audience, | ||
/** OAuth Scope */ | ||
scope, cacheDir, clientId, clientSecret, | ||
/** Custom TLS certificate for OAuth */ | ||
@@ -46,2 +51,3 @@ customRootCert, | ||
audience: string; | ||
scope?: string; | ||
cacheDir?: string; | ||
@@ -48,0 +54,0 @@ clientId: string; |
@@ -41,3 +41,5 @@ "use strict"; | ||
/** OAuth Audience */ | ||
audience, cacheDir, clientId, clientSecret, | ||
audience, | ||
/** OAuth Scope */ | ||
scope, cacheDir, clientId, clientSecret, | ||
/** Custom TLS certificate for OAuth */ | ||
@@ -52,2 +54,3 @@ customRootCert, | ||
this.audience = audience; | ||
this.scope = scope; | ||
this.clientId = clientId; | ||
@@ -120,2 +123,3 @@ this.clientSecret = clientSecret; | ||
grant_type: 'client_credentials', | ||
...(this.scope && { scope: this.scope } || {}) | ||
}; | ||
@@ -122,0 +126,0 @@ debug(`Requesting token from token endpoint...`); |
{ | ||
"name": "zeebe-node", | ||
"version": "8.3.1", | ||
"version": "8.3.2", | ||
"description": "The Node.js client library for the Zeebe Workflow Automation Engine.", | ||
@@ -86,3 +86,3 @@ "keywords": [ | ||
"@types/jest": "^27.5.2", | ||
"@types/node": "^10.17.60", | ||
"@types/node": "^14.17.1", | ||
"@types/promise-retry": "^1.1.3", | ||
@@ -109,3 +109,3 @@ "@types/stack-trace": "0.0.29", | ||
"typedoc": "^0.21.10", | ||
"typescript": "^4.2.0" | ||
"typescript": "^4.4.4" | ||
}, | ||
@@ -112,0 +112,0 @@ "author": { |
@@ -488,2 +488,3 @@ # Zeebe Node.js Client | ||
audience: "my-secure-broker.io", | ||
scope: "myScope", | ||
clientId: "myClientId", | ||
@@ -603,2 +604,3 @@ clientSecret: "randomClientSecret", | ||
ZEEBE_TOKEN_AUDIENCE | ||
ZEEBE_TOKEN_SCOPE | ||
ZEEBE_AUTHORIZATION_SERVER_URL | ||
@@ -618,2 +620,3 @@ ZEEBE_ADDRESS | ||
ZEEBE_TOKEN_AUDIENCE='zeebe.camunda.io' | ||
ZEEBE_TOKEN_SCOPE='not needed' | ||
CAMUNDA_CREDENTIALS_SCOPES='Zeebe' | ||
@@ -666,3 +669,3 @@ CAMUNDA_OAUTH_URL='http://localhost:18080/auth/realms/camunda-platform/protocol/openid-connect/token' | ||
function handler(job) { | ||
worker.log('Task variables', job.variables) | ||
zbWorker.log('Task variables', job.variables) | ||
@@ -669,0 +672,0 @@ // Task worker business logic goes here |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
615962
6164
1607