mirror of
https://github.com/bitwarden/directory-connector
synced 2026-01-08 11:33:19 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
396b6282ad |
8
.github/workflows/scan.yml
vendored
8
.github/workflows/scan.yml
vendored
@@ -5,14 +5,8 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
branches-ignore:
|
||||
- main
|
||||
pull_request_target:
|
||||
types: [opened, synchronize, reopened]
|
||||
branches:
|
||||
- "main"
|
||||
types: [opened, synchronize]
|
||||
|
||||
jobs:
|
||||
check-run:
|
||||
|
||||
1264
package-lock.json
generated
1264
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
29
package.json
29
package.json
@@ -2,7 +2,7 @@
|
||||
"name": "@bitwarden/directory-connector",
|
||||
"productName": "Bitwarden Directory Connector",
|
||||
"description": "Sync your user directory to your Bitwarden organization.",
|
||||
"version": "2025.6.0",
|
||||
"version": "2025.5.0",
|
||||
"keywords": [
|
||||
"bitwarden",
|
||||
"password",
|
||||
@@ -73,7 +73,7 @@
|
||||
"test:types": "npx tsc --noEmit"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "17.3.17",
|
||||
"@angular-devkit/build-angular": "17.3.11",
|
||||
"@angular-eslint/eslint-plugin-template": "17.5.3",
|
||||
"@angular-eslint/template-parser": "17.5.3",
|
||||
"@angular/compiler-cli": "17.3.12",
|
||||
@@ -81,7 +81,7 @@
|
||||
"@electron/rebuild": "3.7.1",
|
||||
"@fluffy-spoon/substitute": "1.208.0",
|
||||
"@microsoft/microsoft-graph-types": "2.40.0",
|
||||
"@ngtools/webpack": "17.3.17",
|
||||
"@ngtools/webpack": "17.3.11",
|
||||
"@types/inquirer": "8.2.10",
|
||||
"@types/jest": "29.5.14",
|
||||
"@types/lowdb": "1.0.15",
|
||||
@@ -90,22 +90,22 @@
|
||||
"@types/node-forge": "1.3.11",
|
||||
"@types/proper-lockfile": "4.1.4",
|
||||
"@types/tldjs": "2.3.4",
|
||||
"@typescript-eslint/eslint-plugin": "8.32.1",
|
||||
"@typescript-eslint/parser": "8.32.1",
|
||||
"@typescript-eslint/eslint-plugin": "8.23.0",
|
||||
"@typescript-eslint/parser": "8.23.0",
|
||||
"clean-webpack-plugin": "4.0.0",
|
||||
"concurrently": "9.1.2",
|
||||
"copy-webpack-plugin": "12.0.2",
|
||||
"cross-env": "7.0.3",
|
||||
"css-loader": "7.1.2",
|
||||
"dotenv": "16.5.0",
|
||||
"dotenv": "16.4.7",
|
||||
"electron": "34.1.1",
|
||||
"electron-builder": "24.13.3",
|
||||
"electron-log": "5.2.4",
|
||||
"electron-reload": "2.0.0-alpha.1",
|
||||
"electron-store": "8.2.0",
|
||||
"electron-updater": "6.6.2",
|
||||
"electron-updater": "6.3.9",
|
||||
"eslint": "8.57.1",
|
||||
"eslint-config-prettier": "10.1.5",
|
||||
"eslint-config-prettier": "10.0.1",
|
||||
"eslint-import-resolver-typescript": "3.7.0",
|
||||
"eslint-plugin-import": "2.31.0",
|
||||
"eslint-plugin-rxjs": "5.0.3",
|
||||
@@ -117,10 +117,11 @@
|
||||
"jest": "29.7.0",
|
||||
"jest-junit": "16.0.0",
|
||||
"jest-mock-extended": "3.0.7",
|
||||
"jest-preset-angular": "14.5.5",
|
||||
"lint-staged": "15.5.2",
|
||||
"jest-preset-angular": "14.5.0",
|
||||
"lint-staged": "15.4.1",
|
||||
"mini-css-extract-plugin": "2.9.2",
|
||||
"node-abi": "3.75.0",
|
||||
"minimatch": "3.1.2",
|
||||
"node-abi": "3.74.0",
|
||||
"node-forge": "1.3.1",
|
||||
"node-loader": "2.1.0",
|
||||
"pkg": "5.8.1",
|
||||
@@ -132,7 +133,7 @@
|
||||
"ts-jest": "29.2.5",
|
||||
"ts-loader": "9.5.2",
|
||||
"tsconfig-paths-webpack-plugin": "4.2.0",
|
||||
"type-fest": "4.41.0",
|
||||
"type-fest": "4.32.0",
|
||||
"typescript": "5.4.5",
|
||||
"webpack": "5.97.1",
|
||||
"webpack-cli": "6.0.1",
|
||||
@@ -156,14 +157,14 @@
|
||||
"browser-hrtime": "1.1.8",
|
||||
"chalk": "4.1.2",
|
||||
"commander": "13.1.0",
|
||||
"core-js": "3.42.0",
|
||||
"core-js": "3.40.0",
|
||||
"form-data": "4.0.1",
|
||||
"google-auth-library": "9.15.1",
|
||||
"googleapis": "144.0.0",
|
||||
"https-proxy-agent": "7.0.6",
|
||||
"inquirer": "8.2.6",
|
||||
"keytar": "7.9.0",
|
||||
"ldapts": "7.4.0",
|
||||
"ldapts": "7.3.1",
|
||||
"lowdb": "1.0.0",
|
||||
"ngx-toastr": "19.0.0",
|
||||
"node-fetch": "2.7.0",
|
||||
|
||||
@@ -18,9 +18,7 @@ import { BaseDirectoryService } from "./baseDirectory.service";
|
||||
import { IDirectoryService } from "./directory.service";
|
||||
|
||||
const AzurePublicIdentityAuhtority = "login.microsoftonline.com";
|
||||
const AzurePublicGraphEndpoint = "https://graph.microsoft.com";
|
||||
const AzureGovermentIdentityAuhtority = "login.microsoftonline.us";
|
||||
const AzureGovernmentGraphEndpoint = "https://graph.microsoft.us";
|
||||
|
||||
const NextLink = "@odata.nextLink";
|
||||
const DeltaLink = "@odata.deltaLink";
|
||||
@@ -209,7 +207,7 @@ export class AzureDirectoryService extends BaseDirectoryService implements IDire
|
||||
if (keyword === "excludeadministrativeunit" || keyword === "includeadministrativeunit") {
|
||||
for (const p of pieces) {
|
||||
let auMembers = await this.client
|
||||
.api(`${this.getGraphApiEndpoint()}/v1.0/directory/administrativeUnits/${p}/members`)
|
||||
.api(`https://graph.microsoft.com/v1.0/directory/administrativeUnits/${p}/members`)
|
||||
.get();
|
||||
// eslint-disable-next-line
|
||||
while (true) {
|
||||
@@ -480,7 +478,7 @@ export class AzureDirectoryService extends BaseDirectoryService implements IDire
|
||||
client_id: this.dirConfig.applicationId,
|
||||
client_secret: this.dirConfig.key,
|
||||
grant_type: "client_credentials",
|
||||
scope: `${this.getGraphApiEndpoint()}/.default`,
|
||||
scope: "https://graph.microsoft.com/.default",
|
||||
});
|
||||
|
||||
const req = https
|
||||
@@ -544,10 +542,4 @@ export class AzureDirectoryService extends BaseDirectoryService implements IDire
|
||||
exp.setSeconds(exp.getSeconds() + expSeconds);
|
||||
this.accessTokenExpiration = exp;
|
||||
}
|
||||
|
||||
private getGraphApiEndpoint(): string {
|
||||
return this.dirConfig.identityAuthority === AzureGovermentIdentityAuhtority
|
||||
? AzureGovernmentGraphEndpoint
|
||||
: AzurePublicGraphEndpoint;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user