@backstage/plugin-catalog-backend-module-msgraph 0.9.3-next.1 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/README.md +4 -7
- package/config.d.ts +6 -3
- package/dist/index.d.ts +3 -2
- package/dist/microsoftGraph/config.cjs.js +11 -22
- package/dist/microsoftGraph/config.cjs.js.map +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-backend-module-msgraph
|
|
2
2
|
|
|
3
|
+
## 0.10.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 2bd0450: **BREAKING**: Disabled user accounts are now filtered out by default. The provider automatically applies an `accountEnabled eq true` filter, combining it with any custom `user.filter` you provide. If you previously included `accountEnabled eq true` in your user filter, it is safe to remove it, but leaving it in will not cause any issues.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- e9b78e9: Removed the `uuid` dependency and replaced usage with the built-in `crypto.randomUUID()`.
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
- @backstage/catalog-model@1.9.0
|
|
14
|
+
- @backstage/backend-plugin-api@1.9.1
|
|
15
|
+
- @backstage/plugin-catalog-node@2.2.1
|
|
16
|
+
- @backstage/config@1.3.8
|
|
17
|
+
- @backstage/plugin-catalog-common@1.1.10
|
|
18
|
+
|
|
3
19
|
## 0.9.3-next.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -52,8 +52,9 @@ catalog:
|
|
|
52
52
|
# Optional filter for user, see Microsoft Graph API for the syntax
|
|
53
53
|
# See https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0#properties
|
|
54
54
|
# and for the syntax https://docs.microsoft.com/en-us/graph/query-parameters#filter-parameter
|
|
55
|
-
# This
|
|
56
|
-
|
|
55
|
+
# This is combined with the base `accountEnabled eq true` filter
|
|
56
|
+
# that is always applied automatically.
|
|
57
|
+
filter: userType eq 'member'
|
|
57
58
|
# Set to false to not load user photos.
|
|
58
59
|
loadPhotos: true
|
|
59
60
|
# See https://docs.microsoft.com/en-us/graph/api/resources/schemaextension?view=graph-rest-1.0
|
|
@@ -64,12 +65,10 @@ catalog:
|
|
|
64
65
|
userGroupMember:
|
|
65
66
|
# Optional filter for users, use group membership to get users.
|
|
66
67
|
# (Filtered groups and fetch their members.)
|
|
67
|
-
# This and userFilter are mutually exclusive, only one can be specified
|
|
68
68
|
# See https://docs.microsoft.com/en-us/graph/search-query-parameter
|
|
69
69
|
filter: "displayName eq 'Backstage Users'"
|
|
70
70
|
# Optional search for users, use group membership to get users.
|
|
71
71
|
# (Search for groups and fetch their members.)
|
|
72
|
-
# This and userFilter are mutually exclusive, only one can be specified
|
|
73
72
|
search: '"description:One" AND ("displayName:Video" OR "displayName:Drive")'
|
|
74
73
|
# Optional /groups by default but allow to query groups from different msgraph endpoints
|
|
75
74
|
path: /groups
|
|
@@ -102,9 +101,7 @@ catalog:
|
|
|
102
101
|
initialDelay: { seconds: 15},
|
|
103
102
|
```
|
|
104
103
|
|
|
105
|
-
`user.filter
|
|
106
|
-
|
|
107
|
-
By default, all users are loaded. If you want to filter users based on their attributes, use `user.filter`. `userGroupMember.filter` can be used if you want to load users based on their group membership.
|
|
104
|
+
By default, all enabled users are loaded (disabled accounts are automatically filtered out). If you want to further filter users based on their attributes, use `user.filter`. `userGroupMember.filter` can be used if you want to load users based on their group membership.
|
|
108
105
|
|
|
109
106
|
3. The package is not installed by default, therefore you have to add a
|
|
110
107
|
dependency to `@backstage/plugin-catalog-backend-module-msgraph` to your
|
package/config.d.ts
CHANGED
|
@@ -60,8 +60,9 @@ export interface Config {
|
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
62
|
* The filter to apply to extract users.
|
|
63
|
+
* Combined with the base `accountEnabled eq true` filter.
|
|
63
64
|
*
|
|
64
|
-
* E.g. "
|
|
65
|
+
* E.g. "userType eq 'member'"
|
|
65
66
|
*/
|
|
66
67
|
userFilter?: string;
|
|
67
68
|
/**
|
|
@@ -162,8 +163,9 @@ export interface Config {
|
|
|
162
163
|
expand?: string;
|
|
163
164
|
/**
|
|
164
165
|
* The filter to apply to extract users.
|
|
166
|
+
* Combined with the base `accountEnabled eq true` filter
|
|
165
167
|
*
|
|
166
|
-
* E.g. "
|
|
168
|
+
* E.g. "userType eq 'member'"
|
|
167
169
|
*/
|
|
168
170
|
filter?: string;
|
|
169
171
|
/**
|
|
@@ -295,8 +297,9 @@ export interface Config {
|
|
|
295
297
|
expand?: string;
|
|
296
298
|
/**
|
|
297
299
|
* The filter to apply to extract users.
|
|
300
|
+
* Combined with the base `accountEnabled eq true` filter
|
|
298
301
|
*
|
|
299
|
-
* E.g. "
|
|
302
|
+
* E.g. "userType eq 'member'"
|
|
300
303
|
*/
|
|
301
304
|
filter?: string;
|
|
302
305
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -43,9 +43,10 @@ type MicrosoftGraphProviderConfig = {
|
|
|
43
43
|
*/
|
|
44
44
|
clientSecret?: string;
|
|
45
45
|
/**
|
|
46
|
-
* The filter to apply to extract users.
|
|
46
|
+
* The filter to apply to extract users. This is combined with the base
|
|
47
|
+
* `accountEnabled eq true` filter that is always applied automatically.
|
|
47
48
|
*
|
|
48
|
-
* E.g. "
|
|
49
|
+
* E.g. "userType eq 'member'"
|
|
49
50
|
*/
|
|
50
51
|
userFilter?: string;
|
|
51
52
|
/**
|
|
@@ -18,7 +18,9 @@ function readMicrosoftGraphConfig(config) {
|
|
|
18
18
|
const clientId = providerConfig.getOptionalString("clientId");
|
|
19
19
|
const clientSecret = providerConfig.getOptionalString("clientSecret");
|
|
20
20
|
const userExpand = providerConfig.getOptionalString("userExpand");
|
|
21
|
-
const userFilter =
|
|
21
|
+
const userFilter = buildUserFilter(
|
|
22
|
+
providerConfig.getOptionalString("userFilter")
|
|
23
|
+
);
|
|
22
24
|
const userSelect = providerConfig.getOptionalStringArray("userSelect");
|
|
23
25
|
const userGroupMemberFilter = providerConfig.getOptionalString(
|
|
24
26
|
"userGroupMemberFilter"
|
|
@@ -29,16 +31,6 @@ function readMicrosoftGraphConfig(config) {
|
|
|
29
31
|
const groupExpand = providerConfig.getOptionalString("groupExpand");
|
|
30
32
|
const groupFilter = providerConfig.getOptionalString("groupFilter");
|
|
31
33
|
const groupSearch = providerConfig.getOptionalString("groupSearch");
|
|
32
|
-
if (userFilter && userGroupMemberFilter) {
|
|
33
|
-
throw new Error(
|
|
34
|
-
`userFilter and userGroupMemberFilter are mutually exclusive, only one can be specified.`
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
if (userFilter && userGroupMemberSearch) {
|
|
38
|
-
throw new Error(
|
|
39
|
-
`userGroupMemberSearch cannot be specified when userFilter is defined.`
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
34
|
const groupSelect = providerConfig.getOptionalStringArray("groupSelect");
|
|
43
35
|
const queryMode = providerConfig.getOptionalString("queryMode");
|
|
44
36
|
if (queryMode !== void 0 && queryMode !== "basic" && queryMode !== "advanced") {
|
|
@@ -100,7 +92,7 @@ function readProviderConfig(id, config) {
|
|
|
100
92
|
const clientId = config.getOptionalString("clientId");
|
|
101
93
|
const clientSecret = config.getOptionalString("clientSecret");
|
|
102
94
|
const userExpand = config.getOptionalString("user.expand");
|
|
103
|
-
const userFilter = config.getOptionalString("user.filter");
|
|
95
|
+
const userFilter = buildUserFilter(config.getOptionalString("user.filter"));
|
|
104
96
|
const userSelect = config.getOptionalStringArray("user.select");
|
|
105
97
|
const userPath = config.getOptionalString("user.path") ?? "users";
|
|
106
98
|
const loadUserPhotos = config.getOptionalBoolean("user.loadPhotos");
|
|
@@ -123,16 +115,6 @@ function readProviderConfig(id, config) {
|
|
|
123
115
|
"userGroupMember.search"
|
|
124
116
|
);
|
|
125
117
|
const userGroupMemberPath = config.getOptionalString("userGroupMember.path");
|
|
126
|
-
if (userFilter && userGroupMemberFilter) {
|
|
127
|
-
throw new Error(
|
|
128
|
-
`userFilter and userGroupMemberFilter are mutually exclusive, only one can be specified.`
|
|
129
|
-
);
|
|
130
|
-
}
|
|
131
|
-
if (userFilter && userGroupMemberSearch) {
|
|
132
|
-
throw new Error(
|
|
133
|
-
`userGroupMemberSearch cannot be specified when userFilter is defined.`
|
|
134
|
-
);
|
|
135
|
-
}
|
|
136
118
|
if (clientId && !clientSecret) {
|
|
137
119
|
throw new Error(`clientSecret must be provided when clientId is defined.`);
|
|
138
120
|
}
|
|
@@ -167,6 +149,13 @@ function readProviderConfig(id, config) {
|
|
|
167
149
|
schedule
|
|
168
150
|
};
|
|
169
151
|
}
|
|
152
|
+
function buildUserFilter(rawFilter) {
|
|
153
|
+
const base = "accountEnabled eq true";
|
|
154
|
+
if (rawFilter) {
|
|
155
|
+
return `${base} and (${rawFilter})`;
|
|
156
|
+
}
|
|
157
|
+
return base;
|
|
158
|
+
}
|
|
170
159
|
|
|
171
160
|
exports.readMicrosoftGraphConfig = readMicrosoftGraphConfig;
|
|
172
161
|
exports.readProviderConfig = readProviderConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.cjs.js","sources":["../../src/microsoftGraph/config.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n SchedulerServiceTaskScheduleDefinition,\n readSchedulerServiceTaskScheduleDefinitionFromConfig,\n} from '@backstage/backend-plugin-api';\nimport { Config } from '@backstage/config';\nimport { trimEnd } from 'lodash';\n\nconst DEFAULT_PROVIDER_ID = 'default';\nconst DEFAULT_TARGET = 'https://graph.microsoft.com/v1.0';\n\n/**\n * The configuration parameters for a single Microsoft Graph provider.\n *\n * @public\n */\nexport type MicrosoftGraphProviderConfig = {\n /**\n * Identifier of the provider which will be used i.e. at the location key for ingested entities.\n */\n id: string;\n\n /**\n * The prefix of the target that this matches on, e.g.\n * \"https://graph.microsoft.com/v1.0\", with no trailing slash.\n */\n target: string;\n /**\n * The auth authority used.\n *\n * E.g. \"https://login.microsoftonline.com\"\n */\n authority?: string;\n /**\n * The tenant whose org data we are interested in.\n */\n tenantId: string;\n /**\n * The OAuth client ID to use for authenticating requests.\n * If specified, ClientSecret must also be specified\n */\n clientId?: string;\n /**\n * The OAuth client secret to use for authenticating requests.\n * If specified, ClientId must also be specified\n */\n clientSecret?: string;\n /**\n * The filter to apply to extract users.\n *\n * E.g. \"accountEnabled eq true and userType eq 'member'\"\n */\n userFilter?: string;\n /**\n * The fields to be fetched on query.\n *\n * E.g. [\"id\", \"displayName\", \"description\"]\n */\n userSelect?: string[];\n /**\n * The \"expand\" argument to apply to users.\n *\n * E.g. \"manager\".\n */\n userExpand?: string;\n\n /**\n * The path to the users endpoint. Defaults to \"/users\".\n *\n * E.g. \"/users\"\n */\n userPath?: string;\n /**\n * The filter to apply to extract users by groups memberships.\n *\n * E.g. \"displayName eq 'Backstage Users'\"\n */\n userGroupMemberFilter?: string;\n /**\n * The search criteria to apply to extract users by groups memberships.\n *\n * E.g. \"\\\"displayName:-team\\\"\" would only match groups which contain '-team'\n */\n userGroupMemberSearch?: string;\n\n /**\n * The path to the groups endpoint. Defaults to \"/groups\".\n *\n * E.g. \"/groups\"\n */\n userGroupMemberPath?: string;\n\n /**\n * The \"expand\" argument to apply to groups.\n *\n * E.g. \"member\".\n */\n groupExpand?: string;\n /**\n * The filter to apply to extract groups.\n *\n * E.g. \"securityEnabled eq false and mailEnabled eq true\"\n */\n groupFilter?: string;\n /**\n * The search criteria to apply to extract groups.\n *\n * E.g. \"\\\"displayName:-team\\\"\" would only match groups which contain '-team'\n */\n groupSearch?: string;\n\n /**\n * The fields to be fetched on query.\n *\n * E.g. [\"id\", \"displayName\", \"description\"]\n */\n groupSelect?: string[];\n\n /**\n * The path to the groups endpoint. Defaults to \"/groups\".\n *\n * E.g. \"/groups\"\n */\n groupPath?: string;\n\n /**\n * Whether to ingest groups that are members of the found/filtered/searched groups.\n * Default value is `false`.\n */\n groupIncludeSubGroups?: boolean;\n\n /**\n * By default, the Microsoft Graph API only provides the basic feature set\n * for querying. Certain features are limited to advanced query capabilities\n * (see https://docs.microsoft.com/en-us/graph/aad-advanced-queries)\n * and need to be enabled.\n *\n * Some features like `$expand` are not available for advanced queries, though.\n */\n queryMode?: 'basic' | 'advanced';\n\n /**\n * Set to false to not load user photos.\n * This can be useful for huge organizations.\n */\n loadUserPhotos?: boolean;\n\n /**\n * Schedule configuration for refresh tasks.\n */\n schedule?: SchedulerServiceTaskScheduleDefinition;\n};\n\n/**\n * Parses configuration.\n *\n * @param config - The root of the msgraph config hierarchy\n *\n * @public\n * @deprecated Replaced by not exported `readProviderConfigs` and kept for backwards compatibility only.\n */\nexport function readMicrosoftGraphConfig(\n config: Config,\n): MicrosoftGraphProviderConfig[] {\n const providers: MicrosoftGraphProviderConfig[] = [];\n const providerConfigs = config.getOptionalConfigArray('providers') ?? [];\n\n for (const providerConfig of providerConfigs) {\n const target = trimEnd(\n providerConfig.getOptionalString('target') ?? DEFAULT_TARGET,\n '/',\n );\n const authority = providerConfig.getOptionalString('authority');\n\n const tenantId = providerConfig.getString('tenantId');\n const clientId = providerConfig.getOptionalString('clientId');\n const clientSecret = providerConfig.getOptionalString('clientSecret');\n\n const userExpand = providerConfig.getOptionalString('userExpand');\n const userFilter = providerConfig.getOptionalString('userFilter');\n const userSelect = providerConfig.getOptionalStringArray('userSelect');\n const userGroupMemberFilter = providerConfig.getOptionalString(\n 'userGroupMemberFilter',\n );\n const userGroupMemberSearch = providerConfig.getOptionalString(\n 'userGroupMemberSearch',\n );\n const groupExpand = providerConfig.getOptionalString('groupExpand');\n const groupFilter = providerConfig.getOptionalString('groupFilter');\n const groupSearch = providerConfig.getOptionalString('groupSearch');\n\n if (userFilter && userGroupMemberFilter) {\n throw new Error(\n `userFilter and userGroupMemberFilter are mutually exclusive, only one can be specified.`,\n );\n }\n if (userFilter && userGroupMemberSearch) {\n throw new Error(\n `userGroupMemberSearch cannot be specified when userFilter is defined.`,\n );\n }\n\n const groupSelect = providerConfig.getOptionalStringArray('groupSelect');\n const queryMode = providerConfig.getOptionalString('queryMode');\n if (\n queryMode !== undefined &&\n queryMode !== 'basic' &&\n queryMode !== 'advanced'\n ) {\n throw new Error(`queryMode must be one of: basic, advanced`);\n }\n\n if (clientId && !clientSecret) {\n throw new Error(\n `clientSecret must be provided when clientId is defined.`,\n );\n }\n\n if (clientSecret && !clientId) {\n throw new Error(\n `clientId must be provided when clientSecret is defined.`,\n );\n }\n\n providers.push({\n id: target,\n target,\n authority,\n tenantId,\n clientId,\n clientSecret,\n userExpand,\n userFilter,\n userSelect,\n userGroupMemberFilter,\n userGroupMemberSearch,\n groupExpand,\n groupFilter,\n groupSearch,\n groupSelect,\n queryMode,\n });\n }\n\n return providers;\n}\n\n/**\n * Parses all configured providers.\n *\n * @param config - The root of the msgraph config hierarchy\n *\n * @public\n */\nexport function readProviderConfigs(\n config: Config,\n): MicrosoftGraphProviderConfig[] {\n const providersConfig = config.getOptionalConfig(\n 'catalog.providers.microsoftGraphOrg',\n );\n if (!providersConfig) {\n return [];\n }\n\n if (providersConfig.has('clientId')) {\n // simple/single config variant\n return [readProviderConfig(DEFAULT_PROVIDER_ID, providersConfig)];\n }\n\n return providersConfig.keys().map(id => {\n const providerConfig = providersConfig.getConfig(id);\n\n return readProviderConfig(id, providerConfig);\n });\n}\n\n/**\n * Parses a single configured provider by id.\n *\n * @param id - the id of the provider to parse\n * @param config - The root of the msgraph config hierarchy\n *\n * @public\n */\nexport function readProviderConfig(\n id: string,\n config: Config,\n): MicrosoftGraphProviderConfig {\n const target = trimEnd(\n config.getOptionalString('target') ?? DEFAULT_TARGET,\n '/',\n );\n const authority = config.getOptionalString('authority');\n\n const tenantId = config.getString('tenantId');\n const clientId = config.getOptionalString('clientId');\n const clientSecret = config.getOptionalString('clientSecret');\n\n const userExpand = config.getOptionalString('user.expand');\n const userFilter = config.getOptionalString('user.filter');\n const userSelect = config.getOptionalStringArray('user.select');\n const userPath = config.getOptionalString('user.path') ?? 'users';\n const loadUserPhotos = config.getOptionalBoolean('user.loadPhotos');\n\n const groupExpand = config.getOptionalString('group.expand');\n const groupFilter = config.getOptionalString('group.filter');\n const groupSearch = config.getOptionalString('group.search');\n const groupSelect = config.getOptionalStringArray('group.select');\n const groupPath = config.getOptionalString('group.path') ?? 'groups';\n const groupIncludeSubGroups = config.getOptionalBoolean(\n 'group.includeSubGroups',\n );\n\n const queryMode = config.getOptionalString('queryMode');\n if (\n queryMode !== undefined &&\n queryMode !== 'basic' &&\n queryMode !== 'advanced'\n ) {\n throw new Error(`queryMode must be one of: basic, advanced`);\n }\n\n const userGroupMemberFilter = config.getOptionalString(\n 'userGroupMember.filter',\n );\n const userGroupMemberSearch = config.getOptionalString(\n 'userGroupMember.search',\n );\n const userGroupMemberPath = config.getOptionalString('userGroupMember.path');\n\n if (userFilter && userGroupMemberFilter) {\n throw new Error(\n `userFilter and userGroupMemberFilter are mutually exclusive, only one can be specified.`,\n );\n }\n if (userFilter && userGroupMemberSearch) {\n throw new Error(\n `userGroupMemberSearch cannot be specified when userFilter is defined.`,\n );\n }\n\n if (clientId && !clientSecret) {\n throw new Error(`clientSecret must be provided when clientId is defined.`);\n }\n\n if (clientSecret && !clientId) {\n throw new Error(`clientId must be provided when clientSecret is defined.`);\n }\n\n const schedule = config.has('schedule')\n ? readSchedulerServiceTaskScheduleDefinitionFromConfig(\n config.getConfig('schedule'),\n )\n : undefined;\n\n return {\n id,\n target,\n authority,\n clientId,\n clientSecret,\n tenantId,\n userExpand,\n userFilter,\n userSelect,\n userPath,\n loadUserPhotos,\n groupExpand,\n groupFilter,\n groupSearch,\n groupSelect,\n groupPath,\n groupIncludeSubGroups,\n queryMode,\n userGroupMemberFilter,\n userGroupMemberSearch,\n userGroupMemberPath,\n schedule,\n };\n}\n"],"names":["trimEnd","readSchedulerServiceTaskScheduleDefinitionFromConfig"],"mappings":";;;;;AAuBA,MAAM,mBAAA,GAAsB,SAAA;AAC5B,MAAM,cAAA,GAAiB,kCAAA;AAwJhB,SAAS,yBACd,MAAA,EACgC;AAChC,EAAA,MAAM,YAA4C,EAAC;AACnD,EAAA,MAAM,eAAA,GAAkB,MAAA,CAAO,sBAAA,CAAuB,WAAW,KAAK,EAAC;AAEvE,EAAA,KAAA,MAAW,kBAAkB,eAAA,EAAiB;AAC5C,IAAA,MAAM,MAAA,GAASA,cAAA;AAAA,MACb,cAAA,CAAe,iBAAA,CAAkB,QAAQ,CAAA,IAAK,cAAA;AAAA,MAC9C;AAAA,KACF;AACA,IAAA,MAAM,SAAA,GAAY,cAAA,CAAe,iBAAA,CAAkB,WAAW,CAAA;AAE9D,IAAA,MAAM,QAAA,GAAW,cAAA,CAAe,SAAA,CAAU,UAAU,CAAA;AACpD,IAAA,MAAM,QAAA,GAAW,cAAA,CAAe,iBAAA,CAAkB,UAAU,CAAA;AAC5D,IAAA,MAAM,YAAA,GAAe,cAAA,CAAe,iBAAA,CAAkB,cAAc,CAAA;AAEpE,IAAA,MAAM,UAAA,GAAa,cAAA,CAAe,iBAAA,CAAkB,YAAY,CAAA;AAChE,IAAA,MAAM,UAAA,GAAa,cAAA,CAAe,iBAAA,CAAkB,YAAY,CAAA;AAChE,IAAA,MAAM,UAAA,GAAa,cAAA,CAAe,sBAAA,CAAuB,YAAY,CAAA;AACrE,IAAA,MAAM,wBAAwB,cAAA,CAAe,iBAAA;AAAA,MAC3C;AAAA,KACF;AACA,IAAA,MAAM,wBAAwB,cAAA,CAAe,iBAAA;AAAA,MAC3C;AAAA,KACF;AACA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AAA,MAAM,IAAI,KAAA;AAAA,MACR,CAAA,qEAAA;AAAA,KACF;AAAA,EACF;AAEA,EAAA,IAAI,QAAA,IAAY,CAAC,YAAA,EAAc;AAC7B,IAAA,MAAM,IAAI,MAAM,CAAA,uDAAA,CAAyD,CAAA;AAAA,EAC3E;AAEA,EAAA,IAAI,YAAA,IAAgB,CAAC,QAAA,EAAU;AAC7B,IAAA,MAAM,IAAI,MAAM,CAAA,uDAAA,CAAyD,CAAA;AAAA,EAC3E;AAEA,EAAA,MAAM,QAAA,GAAW,MAAA,CAAO,GAAA,CAAI,UAAU,CAAA,GAClCC,qEAAA;AAAA,IACE,MAAA,CAAO,UAAU,UAAU;AAAA,GAC7B,GACA,MAAA;AAEJ,EAAA,OAAO;AAAA,IACL,EAAA;AAAA,IACA,MAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAA;AAAA,IACA,YAAA;AAAA,IACA,QAAA;AAAA,IACA,UAAA;AAAA,IACA,UAAA;AAAA,IACA,UAAA;AAAA,IACA,QAAA;AAAA,IACA,cAAA;AAAA,IACA,WAAA;AAAA,IACA,WAAA;AAAA,IACA,WAAA;AAAA,IACA,WAAA;AAAA,IACA,SAAA;AAAA,IACA,qBAAA;AAAA,IACA,SAAA;AAAA,IACA,qBAAA;AAAA,IACA,qBAAA;AAAA,IACA,mBAAA;AAAA,IACA;AAAA,GACF;AACF;;;;;;"}
|
|
1
|
+
{"version":3,"file":"config.cjs.js","sources":["../../src/microsoftGraph/config.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n SchedulerServiceTaskScheduleDefinition,\n readSchedulerServiceTaskScheduleDefinitionFromConfig,\n} from '@backstage/backend-plugin-api';\nimport { Config } from '@backstage/config';\nimport { trimEnd } from 'lodash';\n\nconst DEFAULT_PROVIDER_ID = 'default';\nconst DEFAULT_TARGET = 'https://graph.microsoft.com/v1.0';\n\n/**\n * The configuration parameters for a single Microsoft Graph provider.\n *\n * @public\n */\nexport type MicrosoftGraphProviderConfig = {\n /**\n * Identifier of the provider which will be used i.e. at the location key for ingested entities.\n */\n id: string;\n\n /**\n * The prefix of the target that this matches on, e.g.\n * \"https://graph.microsoft.com/v1.0\", with no trailing slash.\n */\n target: string;\n /**\n * The auth authority used.\n *\n * E.g. \"https://login.microsoftonline.com\"\n */\n authority?: string;\n /**\n * The tenant whose org data we are interested in.\n */\n tenantId: string;\n /**\n * The OAuth client ID to use for authenticating requests.\n * If specified, ClientSecret must also be specified\n */\n clientId?: string;\n /**\n * The OAuth client secret to use for authenticating requests.\n * If specified, ClientId must also be specified\n */\n clientSecret?: string;\n /**\n * The filter to apply to extract users. This is combined with the base\n * `accountEnabled eq true` filter that is always applied automatically.\n *\n * E.g. \"userType eq 'member'\"\n */\n userFilter?: string;\n /**\n * The fields to be fetched on query.\n *\n * E.g. [\"id\", \"displayName\", \"description\"]\n */\n userSelect?: string[];\n /**\n * The \"expand\" argument to apply to users.\n *\n * E.g. \"manager\".\n */\n userExpand?: string;\n\n /**\n * The path to the users endpoint. Defaults to \"/users\".\n *\n * E.g. \"/users\"\n */\n userPath?: string;\n /**\n * The filter to apply to extract users by groups memberships.\n *\n * E.g. \"displayName eq 'Backstage Users'\"\n */\n userGroupMemberFilter?: string;\n /**\n * The search criteria to apply to extract users by groups memberships.\n *\n * E.g. \"\\\"displayName:-team\\\"\" would only match groups which contain '-team'\n */\n userGroupMemberSearch?: string;\n\n /**\n * The path to the groups endpoint. Defaults to \"/groups\".\n *\n * E.g. \"/groups\"\n */\n userGroupMemberPath?: string;\n\n /**\n * The \"expand\" argument to apply to groups.\n *\n * E.g. \"member\".\n */\n groupExpand?: string;\n /**\n * The filter to apply to extract groups.\n *\n * E.g. \"securityEnabled eq false and mailEnabled eq true\"\n */\n groupFilter?: string;\n /**\n * The search criteria to apply to extract groups.\n *\n * E.g. \"\\\"displayName:-team\\\"\" would only match groups which contain '-team'\n */\n groupSearch?: string;\n\n /**\n * The fields to be fetched on query.\n *\n * E.g. [\"id\", \"displayName\", \"description\"]\n */\n groupSelect?: string[];\n\n /**\n * The path to the groups endpoint. Defaults to \"/groups\".\n *\n * E.g. \"/groups\"\n */\n groupPath?: string;\n\n /**\n * Whether to ingest groups that are members of the found/filtered/searched groups.\n * Default value is `false`.\n */\n groupIncludeSubGroups?: boolean;\n\n /**\n * By default, the Microsoft Graph API only provides the basic feature set\n * for querying. Certain features are limited to advanced query capabilities\n * (see https://docs.microsoft.com/en-us/graph/aad-advanced-queries)\n * and need to be enabled.\n *\n * Some features like `$expand` are not available for advanced queries, though.\n */\n queryMode?: 'basic' | 'advanced';\n\n /**\n * Set to false to not load user photos.\n * This can be useful for huge organizations.\n */\n loadUserPhotos?: boolean;\n\n /**\n * Schedule configuration for refresh tasks.\n */\n schedule?: SchedulerServiceTaskScheduleDefinition;\n};\n\n/**\n * Parses configuration.\n *\n * @param config - The root of the msgraph config hierarchy\n *\n * @public\n * @deprecated Replaced by not exported `readProviderConfigs` and kept for backwards compatibility only.\n */\nexport function readMicrosoftGraphConfig(\n config: Config,\n): MicrosoftGraphProviderConfig[] {\n const providers: MicrosoftGraphProviderConfig[] = [];\n const providerConfigs = config.getOptionalConfigArray('providers') ?? [];\n\n for (const providerConfig of providerConfigs) {\n const target = trimEnd(\n providerConfig.getOptionalString('target') ?? DEFAULT_TARGET,\n '/',\n );\n const authority = providerConfig.getOptionalString('authority');\n\n const tenantId = providerConfig.getString('tenantId');\n const clientId = providerConfig.getOptionalString('clientId');\n const clientSecret = providerConfig.getOptionalString('clientSecret');\n\n const userExpand = providerConfig.getOptionalString('userExpand');\n const userFilter = buildUserFilter(\n providerConfig.getOptionalString('userFilter'),\n );\n const userSelect = providerConfig.getOptionalStringArray('userSelect');\n const userGroupMemberFilter = providerConfig.getOptionalString(\n 'userGroupMemberFilter',\n );\n const userGroupMemberSearch = providerConfig.getOptionalString(\n 'userGroupMemberSearch',\n );\n const groupExpand = providerConfig.getOptionalString('groupExpand');\n const groupFilter = providerConfig.getOptionalString('groupFilter');\n const groupSearch = providerConfig.getOptionalString('groupSearch');\n\n const groupSelect = providerConfig.getOptionalStringArray('groupSelect');\n const queryMode = providerConfig.getOptionalString('queryMode');\n if (\n queryMode !== undefined &&\n queryMode !== 'basic' &&\n queryMode !== 'advanced'\n ) {\n throw new Error(`queryMode must be one of: basic, advanced`);\n }\n\n if (clientId && !clientSecret) {\n throw new Error(\n `clientSecret must be provided when clientId is defined.`,\n );\n }\n\n if (clientSecret && !clientId) {\n throw new Error(\n `clientId must be provided when clientSecret is defined.`,\n );\n }\n\n providers.push({\n id: target,\n target,\n authority,\n tenantId,\n clientId,\n clientSecret,\n userExpand,\n userFilter,\n userSelect,\n userGroupMemberFilter,\n userGroupMemberSearch,\n groupExpand,\n groupFilter,\n groupSearch,\n groupSelect,\n queryMode,\n });\n }\n\n return providers;\n}\n\n/**\n * Parses all configured providers.\n *\n * @param config - The root of the msgraph config hierarchy\n *\n * @public\n */\nexport function readProviderConfigs(\n config: Config,\n): MicrosoftGraphProviderConfig[] {\n const providersConfig = config.getOptionalConfig(\n 'catalog.providers.microsoftGraphOrg',\n );\n if (!providersConfig) {\n return [];\n }\n\n if (providersConfig.has('clientId')) {\n // simple/single config variant\n return [readProviderConfig(DEFAULT_PROVIDER_ID, providersConfig)];\n }\n\n return providersConfig.keys().map(id => {\n const providerConfig = providersConfig.getConfig(id);\n\n return readProviderConfig(id, providerConfig);\n });\n}\n\n/**\n * Parses a single configured provider by id.\n *\n * @param id - the id of the provider to parse\n * @param config - The root of the msgraph config hierarchy\n *\n * @public\n */\nexport function readProviderConfig(\n id: string,\n config: Config,\n): MicrosoftGraphProviderConfig {\n const target = trimEnd(\n config.getOptionalString('target') ?? DEFAULT_TARGET,\n '/',\n );\n const authority = config.getOptionalString('authority');\n\n const tenantId = config.getString('tenantId');\n const clientId = config.getOptionalString('clientId');\n const clientSecret = config.getOptionalString('clientSecret');\n\n const userExpand = config.getOptionalString('user.expand');\n const userFilter = buildUserFilter(config.getOptionalString('user.filter'));\n const userSelect = config.getOptionalStringArray('user.select');\n const userPath = config.getOptionalString('user.path') ?? 'users';\n const loadUserPhotos = config.getOptionalBoolean('user.loadPhotos');\n\n const groupExpand = config.getOptionalString('group.expand');\n const groupFilter = config.getOptionalString('group.filter');\n const groupSearch = config.getOptionalString('group.search');\n const groupSelect = config.getOptionalStringArray('group.select');\n const groupPath = config.getOptionalString('group.path') ?? 'groups';\n const groupIncludeSubGroups = config.getOptionalBoolean(\n 'group.includeSubGroups',\n );\n\n const queryMode = config.getOptionalString('queryMode');\n if (\n queryMode !== undefined &&\n queryMode !== 'basic' &&\n queryMode !== 'advanced'\n ) {\n throw new Error(`queryMode must be one of: basic, advanced`);\n }\n\n const userGroupMemberFilter = config.getOptionalString(\n 'userGroupMember.filter',\n );\n const userGroupMemberSearch = config.getOptionalString(\n 'userGroupMember.search',\n );\n const userGroupMemberPath = config.getOptionalString('userGroupMember.path');\n\n if (clientId && !clientSecret) {\n throw new Error(`clientSecret must be provided when clientId is defined.`);\n }\n\n if (clientSecret && !clientId) {\n throw new Error(`clientId must be provided when clientSecret is defined.`);\n }\n\n const schedule = config.has('schedule')\n ? readSchedulerServiceTaskScheduleDefinitionFromConfig(\n config.getConfig('schedule'),\n )\n : undefined;\n\n return {\n id,\n target,\n authority,\n clientId,\n clientSecret,\n tenantId,\n userExpand,\n userFilter,\n userSelect,\n userPath,\n loadUserPhotos,\n groupExpand,\n groupFilter,\n groupSearch,\n groupSelect,\n groupPath,\n groupIncludeSubGroups,\n queryMode,\n userGroupMemberFilter,\n userGroupMemberSearch,\n userGroupMemberPath,\n schedule,\n };\n}\n\nfunction buildUserFilter(rawFilter: string | undefined): string {\n const base = 'accountEnabled eq true';\n if (rawFilter) {\n return `${base} and (${rawFilter})`;\n }\n return base;\n}\n"],"names":["trimEnd","readSchedulerServiceTaskScheduleDefinitionFromConfig"],"mappings":";;;;;AAuBA,MAAM,mBAAA,GAAsB,SAAA;AAC5B,MAAM,cAAA,GAAiB,kCAAA;AAyJhB,SAAS,yBACd,MAAA,EACgC;AAChC,EAAA,MAAM,YAA4C,EAAC;AACnD,EAAA,MAAM,eAAA,GAAkB,MAAA,CAAO,sBAAA,CAAuB,WAAW,KAAK,EAAC;AAEvE,EAAA,KAAA,MAAW,kBAAkB,eAAA,EAAiB;AAC5C,IAAA,MAAM,MAAA,GAASA,cAAA;AAAA,MACb,cAAA,CAAe,iBAAA,CAAkB,QAAQ,CAAA,IAAK,cAAA;AAAA,MAC9C;AAAA,KACF;AACA,IAAA,MAAM,SAAA,GAAY,cAAA,CAAe,iBAAA,CAAkB,WAAW,CAAA;AAE9D,IAAA,MAAM,QAAA,GAAW,cAAA,CAAe,SAAA,CAAU,UAAU,CAAA;AACpD,IAAA,MAAM,QAAA,GAAW,cAAA,CAAe,iBAAA,CAAkB,UAAU,CAAA;AAC5D,IAAA,MAAM,YAAA,GAAe,cAAA,CAAe,iBAAA,CAAkB,cAAc,CAAA;AAEpE,IAAA,MAAM,UAAA,GAAa,cAAA,CAAe,iBAAA,CAAkB,YAAY,CAAA;AAChE,IAAA,MAAM,UAAA,GAAa,eAAA;AAAA,MACjB,cAAA,CAAe,kBAAkB,YAAY;AAAA,KAC/C;AACA,IAAA,MAAM,UAAA,GAAa,cAAA,CAAe,sBAAA,CAAuB,YAAY,CAAA;AACrE,IAAA,MAAM,wBAAwB,cAAA,CAAe,iBAAA;AAAA,MAC3C;AAAA,KACF;AACA,IAAA,MAAM,wBAAwB,cAAA,CAAe,iBAAA;AAAA,MAC3C;AAAA,KACF;AACA,IAAA,MAAM,WAAA,GAAc,cAAA,CAA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AA,IACL,EAAA;AAAA,IACA,MAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAA;AAAA,IACA,YAAA;AAAA,IACA,QAAA;AAAA,IACA,UAAA;AAAA,IACA,UAAA;AAAA,IACA,UAAA;AAAA,IACA,QAAA;AAAA,IACA,cAAA;AAAA,IACA,WAAA;AAAA,IACA,WAAA;AAAA,IACA,WAAA;AAAA,IACA,WAAA;AAAA,IACA,SAAA;AAAA,IACA,qBAAA;AAAA,IACA,SAAA;AAAA,IACA,qBAAA;AAAA,IACA,qBAAA;AAAA,IACA,mBAAA;AAAA,IACA;AAAA,GACF;AACF;AAEA,SAAS,gBAAgB,SAAA,EAAuC;AAC9D,EAAA,MAAM,IAAA,GAAO,wBAAA;AACb,EAAA,IAAI,SAAA,EAAW;AACb,IAAA,OAAO,CAAA,EAAG,IAAI,CAAA,MAAA,EAAS,SAAS,CAAA,CAAA,CAAA;AAAA,EAClC;AACA,EAAA,OAAO,IAAA;AACT;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-catalog-backend-module-msgraph",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "A Backstage catalog backend module that helps integrate towards Microsoft Graph",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "backend-plugin-module",
|
|
@@ -66,19 +66,19 @@
|
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@azure/identity": "^4.0.0",
|
|
69
|
-
"@backstage/backend-plugin-api": "1.9.1
|
|
70
|
-
"@backstage/catalog-model": "1.
|
|
71
|
-
"@backstage/config": "1.3.8
|
|
72
|
-
"@backstage/plugin-catalog-common": "1.1.10
|
|
73
|
-
"@backstage/plugin-catalog-node": "2.2.1
|
|
69
|
+
"@backstage/backend-plugin-api": "^1.9.1",
|
|
70
|
+
"@backstage/catalog-model": "^1.9.0",
|
|
71
|
+
"@backstage/config": "^1.3.8",
|
|
72
|
+
"@backstage/plugin-catalog-common": "^1.1.10",
|
|
73
|
+
"@backstage/plugin-catalog-node": "^2.2.1",
|
|
74
74
|
"@microsoft/microsoft-graph-types": "^2.6.0",
|
|
75
75
|
"lodash": "^4.17.21",
|
|
76
76
|
"p-limit": "^3.0.2",
|
|
77
77
|
"qs": "^6.9.4"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
|
-
"@backstage/backend-test-utils": "1.11.3
|
|
81
|
-
"@backstage/cli": "0.36.2
|
|
80
|
+
"@backstage/backend-test-utils": "^1.11.3",
|
|
81
|
+
"@backstage/cli": "^0.36.2",
|
|
82
82
|
"@types/lodash": "^4.14.151",
|
|
83
83
|
"msw": "^1.0.0"
|
|
84
84
|
},
|