mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-05 23:53:21 +00:00
Compare commits
2 Commits
v2025.6.0
...
jmccannon/
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
376d4b1c22 | ||
|
|
7450163ff5 |
24
.github/workflows/build.yml
vendored
24
.github/workflows/build.yml
vendored
@@ -48,8 +48,8 @@ jobs:
|
|||||||
needs: setup
|
needs: setup
|
||||||
env:
|
env:
|
||||||
_PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }}
|
_PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }}
|
||||||
_PKG_FETCH_NODE_VERSION: 18.5.0
|
_PKG_FETCH_NODE_VERSION: 22.13.1
|
||||||
_PKG_FETCH_VERSION: 3.4
|
_PKG_FETCH_VERSION: 3.5
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
@@ -59,7 +59,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
cache-dependency-path: '**/package-lock.json'
|
cache-dependency-path: '**/package-lock.json'
|
||||||
node-version: '18'
|
node-version: '22'
|
||||||
|
|
||||||
- name: Update NPM
|
- name: Update NPM
|
||||||
run: |
|
run: |
|
||||||
@@ -143,8 +143,8 @@ jobs:
|
|||||||
needs: setup
|
needs: setup
|
||||||
env:
|
env:
|
||||||
_PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }}
|
_PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }}
|
||||||
_PKG_FETCH_NODE_VERSION: 18.5.0
|
_PKG_FETCH_NODE_VERSION: 22.13.1
|
||||||
_PKG_FETCH_VERSION: 3.4
|
_PKG_FETCH_VERSION: 3.5
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
@@ -154,7 +154,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
cache-dependency-path: '**/package-lock.json'
|
cache-dependency-path: '**/package-lock.json'
|
||||||
node-version: '18'
|
node-version: '22'
|
||||||
|
|
||||||
- name: Update NPM
|
- name: Update NPM
|
||||||
run: |
|
run: |
|
||||||
@@ -230,8 +230,8 @@ jobs:
|
|||||||
needs: setup
|
needs: setup
|
||||||
env:
|
env:
|
||||||
_PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }}
|
_PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }}
|
||||||
_WIN_PKG_FETCH_VERSION: 18.5.0
|
_WIN_PKG_FETCH_VERSION: 22.13.1
|
||||||
_WIN_PKG_VERSION: 3.4
|
_WIN_PKG_VERSION: 3.5
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
@@ -246,7 +246,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
cache-dependency-path: '**/package-lock.json'
|
cache-dependency-path: '**/package-lock.json'
|
||||||
node-version: '18'
|
node-version: '22'
|
||||||
|
|
||||||
- name: Update NPM
|
- name: Update NPM
|
||||||
run: |
|
run: |
|
||||||
@@ -386,7 +386,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
cache-dependency-path: '**/package-lock.json'
|
cache-dependency-path: '**/package-lock.json'
|
||||||
node-version: '18'
|
node-version: '22'
|
||||||
|
|
||||||
- name: Update NPM
|
- name: Update NPM
|
||||||
run: |
|
run: |
|
||||||
@@ -476,7 +476,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
cache-dependency-path: '**/package-lock.json'
|
cache-dependency-path: '**/package-lock.json'
|
||||||
node-version: '18'
|
node-version: '22'
|
||||||
|
|
||||||
- name: Update NPM
|
- name: Update NPM
|
||||||
run: |
|
run: |
|
||||||
@@ -530,7 +530,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
cache-dependency-path: '**/package-lock.json'
|
cache-dependency-path: '**/package-lock.json'
|
||||||
node-version: '18'
|
node-version: '22'
|
||||||
|
|
||||||
- name: Update NPM
|
- name: Update NPM
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
8
.github/workflows/scan.yml
vendored
8
.github/workflows/scan.yml
vendored
@@ -5,14 +5,8 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- "main"
|
- "main"
|
||||||
pull_request:
|
|
||||||
types: [opened, synchronize, reopened]
|
|
||||||
branches-ignore:
|
|
||||||
- main
|
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
types: [opened, synchronize, reopened]
|
types: [opened, synchronize]
|
||||||
branches:
|
|
||||||
- "main"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-run:
|
check-run:
|
||||||
|
|||||||
8
package-lock.json
generated
8
package-lock.json
generated
@@ -89,7 +89,7 @@
|
|||||||
"jest-preset-angular": "14.5.5",
|
"jest-preset-angular": "14.5.5",
|
||||||
"lint-staged": "15.5.2",
|
"lint-staged": "15.5.2",
|
||||||
"mini-css-extract-plugin": "2.9.2",
|
"mini-css-extract-plugin": "2.9.2",
|
||||||
"node-abi": "3.75.0",
|
"node-abi": "3.74.0",
|
||||||
"node-forge": "1.3.1",
|
"node-forge": "1.3.1",
|
||||||
"node-loader": "2.1.0",
|
"node-loader": "2.1.0",
|
||||||
"pkg": "5.8.1",
|
"pkg": "5.8.1",
|
||||||
@@ -17235,9 +17235,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/node-abi": {
|
"node_modules/node-abi": {
|
||||||
"version": "3.75.0",
|
"version": "3.74.0",
|
||||||
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.75.0.tgz",
|
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.74.0.tgz",
|
||||||
"integrity": "sha512-OhYaY5sDsIka7H7AtijtI9jwGYLyl29eQn/W623DiN/MIv5sUqc4g7BIDThX+gb7di9f6xK02nkp8sdfFWZLTg==",
|
"integrity": "sha512-c5XK0MjkGBrQPGYG24GBADZud0NCbznxNx0ZkS+ebUTrmV1qTDxPxSL8zEAPURXSbLRWVexxmP4986BziahL5w==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"semver": "^7.3.5"
|
"semver": "^7.3.5"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "@bitwarden/directory-connector",
|
"name": "@bitwarden/directory-connector",
|
||||||
"productName": "Bitwarden Directory Connector",
|
"productName": "Bitwarden Directory Connector",
|
||||||
"description": "Sync your user directory to your Bitwarden organization.",
|
"description": "Sync your user directory to your Bitwarden organization.",
|
||||||
"version": "2025.6.0",
|
"version": "2025.5.0",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"bitwarden",
|
"bitwarden",
|
||||||
"password",
|
"password",
|
||||||
@@ -120,7 +120,7 @@
|
|||||||
"jest-preset-angular": "14.5.5",
|
"jest-preset-angular": "14.5.5",
|
||||||
"lint-staged": "15.5.2",
|
"lint-staged": "15.5.2",
|
||||||
"mini-css-extract-plugin": "2.9.2",
|
"mini-css-extract-plugin": "2.9.2",
|
||||||
"node-abi": "3.75.0",
|
"node-abi": "3.74.0",
|
||||||
"node-forge": "1.3.1",
|
"node-forge": "1.3.1",
|
||||||
"node-loader": "2.1.0",
|
"node-loader": "2.1.0",
|
||||||
"pkg": "5.8.1",
|
"pkg": "5.8.1",
|
||||||
|
|||||||
5
src/scss/bootstrap.scss
vendored
5
src/scss/bootstrap.scss
vendored
@@ -8,8 +8,9 @@ $theme-colors: (
|
|||||||
"secondary": #ced4da,
|
"secondary": #ced4da,
|
||||||
"secondary-alt": #1a3b66,
|
"secondary-alt": #1a3b66,
|
||||||
);
|
);
|
||||||
$font-family-sans-serif: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif,
|
$font-family-sans-serif:
|
||||||
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
"Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji",
|
||||||
|
"Segoe UI Emoji", "Segoe UI Symbol";
|
||||||
|
|
||||||
$h1-font-size: 2rem;
|
$h1-font-size: 2rem;
|
||||||
$h2-font-size: 1.3rem;
|
$h2-font-size: 1.3rem;
|
||||||
|
|||||||
@@ -18,9 +18,7 @@ import { BaseDirectoryService } from "./baseDirectory.service";
|
|||||||
import { IDirectoryService } from "./directory.service";
|
import { IDirectoryService } from "./directory.service";
|
||||||
|
|
||||||
const AzurePublicIdentityAuhtority = "login.microsoftonline.com";
|
const AzurePublicIdentityAuhtority = "login.microsoftonline.com";
|
||||||
const AzurePublicGraphEndpoint = "https://graph.microsoft.com";
|
|
||||||
const AzureGovermentIdentityAuhtority = "login.microsoftonline.us";
|
const AzureGovermentIdentityAuhtority = "login.microsoftonline.us";
|
||||||
const AzureGovernmentGraphEndpoint = "https://graph.microsoft.us";
|
|
||||||
|
|
||||||
const NextLink = "@odata.nextLink";
|
const NextLink = "@odata.nextLink";
|
||||||
const DeltaLink = "@odata.deltaLink";
|
const DeltaLink = "@odata.deltaLink";
|
||||||
@@ -209,7 +207,7 @@ export class AzureDirectoryService extends BaseDirectoryService implements IDire
|
|||||||
if (keyword === "excludeadministrativeunit" || keyword === "includeadministrativeunit") {
|
if (keyword === "excludeadministrativeunit" || keyword === "includeadministrativeunit") {
|
||||||
for (const p of pieces) {
|
for (const p of pieces) {
|
||||||
let auMembers = await this.client
|
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();
|
.get();
|
||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
while (true) {
|
while (true) {
|
||||||
@@ -480,7 +478,7 @@ export class AzureDirectoryService extends BaseDirectoryService implements IDire
|
|||||||
client_id: this.dirConfig.applicationId,
|
client_id: this.dirConfig.applicationId,
|
||||||
client_secret: this.dirConfig.key,
|
client_secret: this.dirConfig.key,
|
||||||
grant_type: "client_credentials",
|
grant_type: "client_credentials",
|
||||||
scope: `${this.getGraphApiEndpoint()}/.default`,
|
scope: "https://graph.microsoft.com/.default",
|
||||||
});
|
});
|
||||||
|
|
||||||
const req = https
|
const req = https
|
||||||
@@ -544,10 +542,4 @@ export class AzureDirectoryService extends BaseDirectoryService implements IDire
|
|||||||
exp.setSeconds(exp.getSeconds() + expSeconds);
|
exp.setSeconds(exp.getSeconds() + expSeconds);
|
||||||
this.accessTokenExpiration = exp;
|
this.accessTokenExpiration = exp;
|
||||||
}
|
}
|
||||||
|
|
||||||
private getGraphApiEndpoint(): string {
|
|
||||||
return this.dirConfig.identityAuthority === AzureGovermentIdentityAuhtority
|
|
||||||
? AzureGovernmentGraphEndpoint
|
|
||||||
: AzurePublicGraphEndpoint;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user