@yadsh/dsh-qa-integrations 0.6.0 → 0.8.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.
Files changed (183) hide show
  1. package/README.md +341 -303
  2. package/lib/broker.js +12 -0
  3. package/lib/broker.js.map +1 -1
  4. package/lib/client/bitrix24.js +66 -5
  5. package/lib/client/bitrix24.js.map +1 -1
  6. package/lib/client/confluence.js +117 -128
  7. package/lib/client/confluence.js.map +1 -1
  8. package/lib/client/gitlab.js +1 -1
  9. package/lib/client/gitlab.js.map +1 -1
  10. package/lib/client/index.js +25 -5
  11. package/lib/client/index.js.map +1 -1
  12. package/lib/client/integrations.js +1 -1
  13. package/lib/client/integrations.js.map +1 -1
  14. package/lib/client/jira.js +115 -126
  15. package/lib/client/jira.js.map +1 -1
  16. package/lib/client/operator-card.js +537 -0
  17. package/lib/client/operator-card.js.map +1 -0
  18. package/lib/client/operator-controls.js +232 -0
  19. package/lib/client/operator-controls.js.map +1 -0
  20. package/lib/client/styles.js +60 -0
  21. package/lib/client/styles.js.map +1 -1
  22. package/lib/client/testit.js +39 -3
  23. package/lib/client/testit.js.map +1 -1
  24. package/lib/client/weblate.js +38 -3
  25. package/lib/client/weblate.js.map +1 -1
  26. package/lib/client.js +2966 -871
  27. package/lib/client.js.map +1 -1
  28. package/lib/coerce.js +17 -1
  29. package/lib/coerce.js.map +1 -1
  30. package/lib/config.js.map +1 -1
  31. package/lib/errors.js +22 -0
  32. package/lib/errors.js.map +1 -1
  33. package/lib/index.js +211 -52
  34. package/lib/index.js.map +1 -1
  35. package/lib/providers/bitrix24/catalog.js +138 -8
  36. package/lib/providers/bitrix24/catalog.js.map +1 -1
  37. package/lib/providers/bitrix24/config.js +84 -14
  38. package/lib/providers/bitrix24/config.js.map +1 -1
  39. package/lib/providers/bitrix24/index.js +100 -0
  40. package/lib/providers/bitrix24/index.js.map +1 -1
  41. package/lib/providers/bitrix24/operations.js +5 -9
  42. package/lib/providers/bitrix24/operations.js.map +1 -1
  43. package/lib/providers/bitrix24/transport.js +11 -31
  44. package/lib/providers/bitrix24/transport.js.map +1 -1
  45. package/lib/providers/confluence/adf.js +28 -23
  46. package/lib/providers/confluence/adf.js.map +1 -1
  47. package/lib/providers/confluence/catalog.js +91 -7
  48. package/lib/providers/confluence/catalog.js.map +1 -1
  49. package/lib/providers/confluence/config.js +27 -2
  50. package/lib/providers/confluence/config.js.map +1 -1
  51. package/lib/providers/confluence/credential-help.js +14 -8
  52. package/lib/providers/confluence/credential-help.js.map +1 -1
  53. package/lib/providers/confluence/dialect.js +215 -0
  54. package/lib/providers/confluence/dialect.js.map +1 -0
  55. package/lib/providers/confluence/index.js +393 -79
  56. package/lib/providers/confluence/index.js.map +1 -1
  57. package/lib/providers/confluence/operations.js +208 -153
  58. package/lib/providers/confluence/operations.js.map +1 -1
  59. package/lib/providers/confluence/storage.js +690 -0
  60. package/lib/providers/confluence/storage.js.map +1 -0
  61. package/lib/providers/confluence/transport.js +26 -89
  62. package/lib/providers/confluence/transport.js.map +1 -1
  63. package/lib/providers/gitlab/config.js +2 -3
  64. package/lib/providers/gitlab/config.js.map +1 -1
  65. package/lib/providers/gitlab/index.js +2 -20
  66. package/lib/providers/gitlab/index.js.map +1 -1
  67. package/lib/providers/gitlab/operations.js +7 -45
  68. package/lib/providers/gitlab/operations.js.map +1 -1
  69. package/lib/providers/gitlab/transport.js +2 -18
  70. package/lib/providers/gitlab/transport.js.map +1 -1
  71. package/lib/providers/jira/adf.js +19 -14
  72. package/lib/providers/jira/adf.js.map +1 -1
  73. package/lib/providers/jira/catalog.js +125 -4
  74. package/lib/providers/jira/catalog.js.map +1 -1
  75. package/lib/providers/jira/config.js +27 -2
  76. package/lib/providers/jira/config.js.map +1 -1
  77. package/lib/providers/jira/credential-help.js +16 -7
  78. package/lib/providers/jira/credential-help.js.map +1 -1
  79. package/lib/providers/jira/dialect.js +94 -0
  80. package/lib/providers/jira/dialect.js.map +1 -0
  81. package/lib/providers/jira/index.js +327 -67
  82. package/lib/providers/jira/index.js.map +1 -1
  83. package/lib/providers/jira/jql.js +54 -21
  84. package/lib/providers/jira/jql.js.map +1 -1
  85. package/lib/providers/jira/operations.js +77 -55
  86. package/lib/providers/jira/operations.js.map +1 -1
  87. package/lib/providers/jira/tools.js +1 -1
  88. package/lib/providers/jira/tools.js.map +1 -1
  89. package/lib/providers/jira/transport.js +12 -83
  90. package/lib/providers/jira/transport.js.map +1 -1
  91. package/lib/providers/shared/health.js +31 -0
  92. package/lib/providers/shared/health.js.map +1 -0
  93. package/lib/providers/shared/http.js +20 -0
  94. package/lib/providers/shared/http.js.map +1 -1
  95. package/lib/providers/shared/paths.js +14 -0
  96. package/lib/providers/shared/paths.js.map +1 -0
  97. package/lib/providers/shared/payload.js +46 -0
  98. package/lib/providers/shared/payload.js.map +1 -0
  99. package/lib/providers/teamcity/artifacts.js +0 -8
  100. package/lib/providers/teamcity/artifacts.js.map +1 -1
  101. package/lib/providers/teamcity/config.js +2 -3
  102. package/lib/providers/teamcity/config.js.map +1 -1
  103. package/lib/providers/teamcity/index.js +2 -20
  104. package/lib/providers/teamcity/index.js.map +1 -1
  105. package/lib/providers/teamcity/operations.js +5 -39
  106. package/lib/providers/teamcity/operations.js.map +1 -1
  107. package/lib/providers/teamcity/transport.js +2 -11
  108. package/lib/providers/teamcity/transport.js.map +1 -1
  109. package/lib/providers/testit/catalog.js +77 -0
  110. package/lib/providers/testit/catalog.js.map +1 -1
  111. package/lib/providers/testit/config.js +2 -3
  112. package/lib/providers/testit/config.js.map +1 -1
  113. package/lib/providers/testit/index.js +260 -4
  114. package/lib/providers/testit/index.js.map +1 -1
  115. package/lib/providers/testit/operations.js +34 -63
  116. package/lib/providers/testit/operations.js.map +1 -1
  117. package/lib/providers/testit/transport.js +2 -18
  118. package/lib/providers/testit/transport.js.map +1 -1
  119. package/lib/providers/weblate/catalog.js +103 -9
  120. package/lib/providers/weblate/catalog.js.map +1 -1
  121. package/lib/providers/weblate/config.js +2 -3
  122. package/lib/providers/weblate/config.js.map +1 -1
  123. package/lib/providers/weblate/index.js +227 -6
  124. package/lib/providers/weblate/index.js.map +1 -1
  125. package/lib/providers/weblate/operations.js +3 -33
  126. package/lib/providers/weblate/operations.js.map +1 -1
  127. package/lib/providers/weblate/query.js +3 -6
  128. package/lib/providers/weblate/query.js.map +1 -1
  129. package/lib/providers/weblate/transport.js +2 -12
  130. package/lib/providers/weblate/transport.js.map +1 -1
  131. package/lib/service-credentials/config.js +2 -3
  132. package/lib/service-credentials/config.js.map +1 -1
  133. package/lib/shared/settings.js +14 -0
  134. package/lib/shared/settings.js.map +1 -0
  135. package/lib/typert.host.js +159 -60
  136. package/lib/typert.remote-client.d.ts +13 -11
  137. package/lib/typert.remote-client.js +98 -52
  138. package/lib/types/broker.d.ts +11 -3
  139. package/lib/types/client/bitrix24.d.ts +24 -2
  140. package/lib/types/client/confluence.d.ts +24 -4
  141. package/lib/types/client/index.d.ts +7 -6
  142. package/lib/types/client/integrations.d.ts +2 -2
  143. package/lib/types/client/jira.d.ts +25 -4
  144. package/lib/types/client/operator-card.d.ts +22 -0
  145. package/lib/types/client/operator-controls.d.ts +135 -0
  146. package/lib/types/client/testit.d.ts +14 -1
  147. package/lib/types/client/weblate.d.ts +14 -1
  148. package/lib/types/coerce.d.ts +14 -0
  149. package/lib/types/config.d.ts +4 -4
  150. package/lib/types/errors.d.ts +16 -0
  151. package/lib/types/index.d.ts +91 -15
  152. package/lib/types/providers/bitrix24/catalog.d.ts +8 -0
  153. package/lib/types/providers/bitrix24/config.d.ts +14 -23
  154. package/lib/types/providers/bitrix24/index.d.ts +37 -1
  155. package/lib/types/providers/confluence/catalog.d.ts +44 -8
  156. package/lib/types/providers/confluence/config.d.ts +39 -7
  157. package/lib/types/providers/confluence/credential-help.d.ts +9 -4
  158. package/lib/types/providers/confluence/dialect.d.ts +113 -0
  159. package/lib/types/providers/confluence/index.d.ts +82 -8
  160. package/lib/types/providers/confluence/operations.d.ts +14 -4
  161. package/lib/types/providers/confluence/storage.d.ts +28 -0
  162. package/lib/types/providers/confluence/transport.d.ts +10 -21
  163. package/lib/types/providers/jira/catalog.d.ts +49 -2
  164. package/lib/types/providers/jira/config.d.ts +37 -6
  165. package/lib/types/providers/jira/credential-help.d.ts +11 -3
  166. package/lib/types/providers/jira/dialect.d.ts +79 -0
  167. package/lib/types/providers/jira/index.d.ts +76 -19
  168. package/lib/types/providers/jira/jql.d.ts +14 -4
  169. package/lib/types/providers/jira/operations.d.ts +3 -0
  170. package/lib/types/providers/jira/transport.d.ts +6 -13
  171. package/lib/types/providers/shared/health.d.ts +18 -0
  172. package/lib/types/providers/shared/http.d.ts +9 -0
  173. package/lib/types/providers/shared/paths.d.ts +10 -0
  174. package/lib/types/providers/shared/payload.d.ts +26 -0
  175. package/lib/types/providers/teamcity/artifacts.d.ts +0 -2
  176. package/lib/types/providers/teamcity/index.d.ts +2 -0
  177. package/lib/types/providers/testit/catalog.d.ts +12 -0
  178. package/lib/types/providers/testit/index.d.ts +63 -2
  179. package/lib/types/providers/weblate/catalog.d.ts +19 -2
  180. package/lib/types/providers/weblate/index.d.ts +43 -1
  181. package/lib/types/shared/settings.d.ts +14 -0
  182. package/lib/types/types.d.ts +8 -0
  183. package/package.json +3 -3
@@ -1,34 +1,68 @@
1
1
  import { resolveCredentialHelp, } from "@yadsh/dsh-plugin-kit";
2
2
  import { IntegrationError } from "../../errors.js";
3
- import { JIRA_CAPABILITY_INFO, JIRA_OPERATIONS, enabledCapabilities, jiraOperationCapability, } from "./catalog.js";
3
+ import { boundaryHas } from "../../service-credentials/policy.js";
4
+ import { operationCapabilityServiceState } from "../../service-credentials/state.js";
5
+ import { healthFromFailure } from "../shared/health.js";
6
+ import { recordOf } from "../shared/payload.js";
7
+ import { assertServiceOperationAllowed, serviceBoundaryOf, } from "../shared/service-boundary.js";
8
+ import { JIRA_CAPABILITY_INFO, JIRA_OPERATIONS, JIRA_RESOURCE_KIND, enabledCapabilities, jiraCompanionPath, jiraOperationCapability, jiraOperationMetadata, jiraOperationPath, } from "./catalog.js";
4
9
  import { CUSTOM_FIELD_ID, jiraSite, } from "./config.js";
5
- import { needsUserLookup } from "./jql.js";
10
+ import { assertDeployment, dialectOf, identityOf, } from "./dialect.js";
11
+ import { identifierName, issueKey as issueKeyOf, needsUserLookup, } from "./jql.js";
6
12
  import { JIRA_HANDLERS, JIRA_PROJECTIONS, requestedIncludes, wantsFieldNames, } from "./operations.js";
7
13
  import { JIRA_CREDENTIAL_HELP } from "./credential-help.js";
8
14
  import { JiraTransport, credentialFromPlaintext, credentialSite, } from "./transport.js";
9
15
  export { credentialFromPlaintext, credentialSite, } from "./transport.js";
10
16
  /**
11
- * Jira Cloud API tokens are either the classic 24-character form or the newer
12
- * prefixed one (`ATATT…`, base64url-ish and long). A pasted URL, a YAML snippet
13
- * or an `email:token` pair is refused before anything is sent upstream.
17
+ * Jira API tokens are opaque; the shape a site accepts is the dialect's own.
18
+ * Cloud tokens are either the classic 24-character form or the newer prefixed
19
+ * one (`ATATT…`, base64url-ish and long), while a Server / Data Center personal
20
+ * access token is base64 and may carry the characters url-safe base64 forbids.
21
+ * A pasted URL, a YAML snippet or a token with whitespace is refused before
22
+ * anything is sent upstream. The one `email:token` shape that exists is the
23
+ * deployment-managed secret, which `parseCredential` splits — the connect form
24
+ * never accepts it.
14
25
  */
15
- const TOKEN_SHAPE = /^[A-Za-z0-9_-]{20,512}$/u;
16
- /** The Atlassian account an API token is spent as. Not a secret; not a host. */
17
26
  const EMAIL_SHAPE = /^[^\s@]{1,128}@[^\s@]{1,190}$/u;
18
27
  const NO_INCLUDES = Object.freeze([]);
19
- /** Deployment types this provider speaks to. Data Center is a different API. */
20
- const CLOUD_DEPLOYMENT = "Cloud";
21
- function accountName(displayName, email) {
22
- return displayName === undefined || displayName === ""
23
- ? email
24
- : `${displayName} (${email})`;
28
+ function accountName(displayName, email, fallback = "Jira") {
29
+ if (displayName === undefined || displayName === "") {
30
+ return email === "" ? fallback : email;
31
+ }
32
+ return email === "" ? displayName : `${displayName} (${email})`;
33
+ }
34
+ /**
35
+ * The `email:token` pair of a deployment-managed secret. Jira Cloud
36
+ * authenticates HTTP Basic over exactly this string, so it is the form the
37
+ * operator keeps in the secret file or the environment — one record, because
38
+ * the pair must not be assembled from two. The connect form never produces it:
39
+ * it collects the e-mail next to the token, and a pasted pair stays refused.
40
+ */
41
+ function splitBasicPair(raw) {
42
+ const at = raw.indexOf(":");
43
+ if (at <= 0)
44
+ return undefined;
45
+ const email = raw.slice(0, at);
46
+ if (!EMAIL_SHAPE.test(email))
47
+ return undefined;
48
+ return { email, token: raw.slice(at + 1) };
25
49
  }
50
+ /** Operations that read one issue, and so may hit a security-restricted one. */
51
+ const ISSUE_SCOPED_READS = Object.freeze([
52
+ "issues.get",
53
+ "issues.comments",
54
+ "issues.transitions",
55
+ ]);
26
56
  /**
27
- * Jira Cloud provider: operator-configured sites over an Atlassian API token.
57
+ * Jira provider: operator-configured sites over an Atlassian API token (Cloud)
58
+ * or a personal access token (Server / Data Center).
28
59
  *
29
60
  * The token is spent against the site the credential names, and that site is
30
61
  * re-resolved from operator config on every call, so a site the deployment
31
- * removed or repointed closes the connection instead of redirecting it.
62
+ * removed or repointed closes the connection instead of redirecting it. Which
63
+ * product answers there — and so which API root, which authentication scheme
64
+ * and which shape of answer this provider speaks — is the site's own declared
65
+ * deployment type, never a guess made at connect or at run time.
32
66
  */
33
67
  export class JiraProvider {
34
68
  config;
@@ -55,17 +89,30 @@ export class JiraProvider {
55
89
  * Both non-secret choices come from the connect form and from operator config,
56
90
  * never from a tool argument, which is what keeps the broker from dialling any
57
91
  * host the caller names.
92
+ *
93
+ * The same method turns a deployment-managed secret into this credential
94
+ * shape. On Cloud that secret is the whole Basic pair (`email:token`), because
95
+ * Jira cannot spend the token without the account and the pair must not be
96
+ * split across two records; the form path instead supplies the e-mail
97
+ * separately, and keeps refusing a pasted pair. A Server / Data Center
98
+ * personal access token needs no account at all, so its connection stores an
99
+ * empty e-mail and authenticates as the token's own bearer.
58
100
  */
59
101
  parseCredential(raw, options) {
60
- const token = raw.trim();
61
- if (!TOKEN_SHAPE.test(token)) {
62
- throw new IntegrationError("InvalidCredential", "Use an Atlassian API token");
102
+ // The site decides what this connection is allowed to look like, so it is
103
+ // resolved before the secret is judged.
104
+ const site = this.resolveSite(options?.["siteId"] ?? options?.["instanceId"]);
105
+ const dialect = dialectOf(site);
106
+ const provided = raw.trim();
107
+ const pair = options?.["email"] === undefined ? splitBasicPair(provided) : undefined;
108
+ const token = pair === undefined ? provided : pair.token;
109
+ if (!dialect.tokenShape.test(token)) {
110
+ throw new IntegrationError("InvalidCredential", `Use a Jira ${dialect.credentialLabel}`);
63
111
  }
64
- const email = (options?.["email"] ?? "").trim();
65
- if (!EMAIL_SHAPE.test(email)) {
112
+ const email = (pair === undefined ? options?.["email"] : pair.email)?.trim() ?? "";
113
+ if (dialect.requiresEmail && !EMAIL_SHAPE.test(email)) {
66
114
  throw new IntegrationError("InvalidCredential", "Use the e-mail of the Atlassian account the token belongs to");
67
115
  }
68
- const site = this.resolveSite(options?.["siteId"]);
69
116
  return {
70
117
  credential: JSON.stringify({
71
118
  siteId: site.id,
@@ -78,15 +125,82 @@ export class JiraProvider {
78
125
  operationCapability(operation) {
79
126
  return jiraOperationCapability(operation);
80
127
  }
128
+ operationMetadata(operation) {
129
+ return jiraOperationMetadata(operation);
130
+ }
131
+ /** Every project-scoped read names its project through a key or an issue key. */
132
+ resourceBoundaryKind(operation) {
133
+ return JIRA_OPERATIONS[operation]?.security.requiresResourceBoundary ===
134
+ true
135
+ ? JIRA_RESOURCE_KIND
136
+ : undefined;
137
+ }
138
+ /**
139
+ * Portal of a configured site. An empty id means "the only site", the same
140
+ * rule `parseCredential` applies, so deployment configuration and the connect
141
+ * form name sites alike.
142
+ */
143
+ instancePortal(instanceId) {
144
+ const sites = this.config.jira.sites;
145
+ const id = instanceId.trim();
146
+ if (id === "") {
147
+ return sites.length === 1 ? sites[0]?.baseUrl : undefined;
148
+ }
149
+ return jiraSite(this.config.jira, id)?.baseUrl;
150
+ }
151
+ capabilityServiceState(capability) {
152
+ return operationCapabilityServiceState(JIRA_OPERATIONS, capability);
153
+ }
154
+ /**
155
+ * Health of a deployment-managed token. The probe reads only the identity
156
+ * endpoint the personal validation reads, so it never changes upstream state;
157
+ * Jira reports no granted scopes for an API token, so the answer is healthy
158
+ * with a warning — the local service ceiling stays the whole local boundary.
159
+ */
160
+ async validateServiceCredential(context) {
161
+ const credential = credentialFromPlaintext(context.credential);
162
+ const site = credentialSite(this.config.jira, credential);
163
+ const dialect = dialectOf(site);
164
+ let myself;
165
+ try {
166
+ myself = await this.transport.getJson(site, credential, this.identityPath(site));
167
+ }
168
+ catch (error) {
169
+ return healthFromFailure(error);
170
+ }
171
+ const accountId = identityOf(dialect, myself);
172
+ const identity = accountId !== undefined
173
+ ? {
174
+ id: accountId,
175
+ label: accountName(typeof myself["displayName"] === "string"
176
+ ? myself["displayName"]
177
+ : undefined, typeof myself["emailAddress"] === "string" &&
178
+ myself["emailAddress"] !== ""
179
+ ? myself["emailAddress"]
180
+ : credential.email),
181
+ }
182
+ : undefined;
183
+ return {
184
+ status: "healthy",
185
+ ...(identity === undefined ? {} : { upstreamIdentity: identity }),
186
+ warnings: [
187
+ "Jira did not report the token scopes; the local service ceiling still applies",
188
+ ],
189
+ };
190
+ }
81
191
  async validate(context) {
82
192
  const credential = credentialFromPlaintext(context.credential);
83
193
  const site = credentialSite(this.config.jira, credential);
84
- const myself = await this.transport.getJson(site, credential, "/rest/api/3/myself");
85
- const accountId = myself["accountId"];
86
- if (typeof accountId !== "string" || accountId === "") {
194
+ const dialect = dialectOf(site);
195
+ const myself = await this.transport.getJson(site, credential, this.identityPath(site));
196
+ // The product is checked before the identity is read as one: a site that
197
+ // answers the other Jira has a different shape of identity, and "set
198
+ // deploymentType: …" is the diagnosis that fixes it, not "no identity".
199
+ await this.requireDeployment(site, credential, dialect);
200
+ const externalUserId = identityOf(dialect, myself);
201
+ if (externalUserId === undefined) {
87
202
  throw new IntegrationError("ProviderUnavailable", "Provider identity is unavailable");
88
203
  }
89
- await this.requireCloud(site, credential);
90
204
  const email = typeof myself["emailAddress"] === "string" &&
91
205
  myself["emailAddress"] !== ""
92
206
  ? myself["emailAddress"]
@@ -94,14 +208,22 @@ export class JiraProvider {
94
208
  const displayName = typeof myself["displayName"] === "string" ? myself["displayName"] : "";
95
209
  return {
96
210
  tenantId: site.baseUrl,
97
- externalUserId: accountId,
98
- displayName: accountName(displayName, email),
211
+ externalUserId,
212
+ displayName: accountName(displayName, email, dialect.productName),
99
213
  // Jira reports no granted scopes for an API token, so the deployment
100
214
  // switches are the whole local boundary and the site's own permissions
101
215
  // decide upstream.
102
216
  capabilities: this.capabilities,
103
217
  };
104
218
  }
219
+ /** The identity read of this site's product: the one connect proves itself with. */
220
+ identityPath(site) {
221
+ const path = jiraOperationPath("connection.get", site.deploymentType);
222
+ if (path === undefined) {
223
+ throw new IntegrationError("ProviderUnavailable", "Jira identity endpoint is unavailable");
224
+ }
225
+ return path;
226
+ }
105
227
  async execute(context, operation, input) {
106
228
  const credential = credentialFromPlaintext(context.credential);
107
229
  const site = credentialSite(this.config.jira, credential);
@@ -110,32 +232,69 @@ export class JiraProvider {
110
232
  if (definition === undefined || handler === undefined) {
111
233
  throw new IntegrationError("InvalidRequest", "Unsupported Jira operation");
112
234
  }
235
+ // Ceiling first, then the boundary: what the operation is decides before
236
+ // where it may read.
237
+ if (context.credentialSource === "service") {
238
+ assertServiceOperationAllowed(definition.security, "This Jira operation is not available through the service credential");
239
+ }
240
+ const boundary = serviceBoundaryOf(context);
241
+ if (boundary !== undefined &&
242
+ definition.security.requiresResourceBoundary) {
243
+ this.assertInsideBoundary(operation, input, boundary);
244
+ }
245
+ const dialect = dialectOf(site);
246
+ if (boundary !== undefined &&
247
+ operation === "issues.search" &&
248
+ (needsUserLookup(input["assignee"], dialect.deployment) ||
249
+ needsUserLookup(input["reporter"], dialect.deployment))) {
250
+ // A person filter becomes JQL only after the site's directory resolves
251
+ // the name into the identifier this product filters on, and that
252
+ // directory read is held inside no project boundary. A shared account is
253
+ // refused it: the question needs the identifier an issue reported, or a
254
+ // personal credential.
255
+ throw new IntegrationError("ServiceResourceNotAllowed", `Resolving a person by name reads the site directory, which service mode does not read; pass the ${identifierName(dialect.deployment)} an issue reported or "me"`);
256
+ }
113
257
  const flags = this.config.jira;
114
258
  // Two values a question carries but Jira cannot take as they stand: a custom
115
259
  // field named by its business term instead of its instance id, and a person
116
260
  // named the way a person actually has a name ("задачи Иванова"). Both are
117
261
  // turned into what Jira filters on before the query is built.
118
262
  const prepared = operation === "issues.search"
119
- ? await this.resolvePeople(site, credential, this.applyFieldAliases(input, flags))
263
+ ? await this.resolvePeople(site, credential, this.applyFieldAliases(input, flags), dialect)
120
264
  : input;
121
265
  const request = handler(prepared, {
122
266
  externalUserId: context.externalUserId,
123
267
  flags,
268
+ dialect,
124
269
  });
125
- const include = operation === "issues.get"
126
- ? requestedIncludes(input["include"])
127
- : NO_INCLUDES;
128
- const data = await this.transport.getJson(site, credential, request.path, request.query);
270
+ // In service mode a search also asks for every hit's security level, so the
271
+ // answer can be held inside the boundary with restricted issues dropped.
272
+ const query = boundary !== undefined && operation === "issues.search"
273
+ ? {
274
+ ...request.query,
275
+ fields: `${String(request.query["fields"] ?? "")},security`,
276
+ }
277
+ : request.query;
278
+ if (boundary !== undefined && ISSUE_SCOPED_READS.includes(operation)) {
279
+ await this.assertIssueNotRestricted(site, credential, String(input["issueKey"] ?? ""));
280
+ }
281
+ const data = await this.transport.getJson(site, credential, request.path, query);
282
+ const raw = boundary !== undefined && operation === "issues.search"
283
+ ? boundedSearchResults(data, boundary)
284
+ : data;
129
285
  // The schema is read only after the issue answered and only when the model
130
286
  // asked for named custom fields: an issue that is not there has nothing to
131
287
  // name, and the extra call would have been spent for nothing.
288
+ const include = operation === "issues.get"
289
+ ? requestedIncludes(input["include"])
290
+ : NO_INCLUDES;
132
291
  const fieldNames = wantsFieldNames(include) && flags.fieldsRead
133
292
  ? await this.fieldNames(site, credential)
134
293
  : undefined;
135
294
  const projection = JIRA_PROJECTIONS[operation];
136
295
  const projected = projection === undefined
137
- ? data
138
- : projection(data, {
296
+ ? raw
297
+ : projection(raw, {
139
298
  flags,
140
299
  site,
141
300
  include,
@@ -150,6 +309,47 @@ export class JiraProvider {
150
309
  ? projected
151
310
  : { value: projected ?? null };
152
311
  }
312
+ /**
313
+ * Hold one call inside the deployment's boundary. A single-resource read
314
+ * names its project — a project key, or the key an issue key embeds — and
315
+ * must stay inside it, or nothing is read. A search names none by default, so
316
+ * it is not refused here but answered with the hits filtered to the boundary
317
+ * instead.
318
+ */
319
+ assertInsideBoundary(operation, input, boundary) {
320
+ if (operation === "issues.search")
321
+ return;
322
+ if (operation === "projects.get") {
323
+ const ref = typeof input["projectKey"] === "string"
324
+ ? input["projectKey"].trim()
325
+ : "";
326
+ if (ref === "" || !projectAllowed(boundary, ref)) {
327
+ throw serviceRefusal();
328
+ }
329
+ return;
330
+ }
331
+ // Whatever remains is one of the issue-scoped reads: the project is the
332
+ // part of the issue key before the dash.
333
+ const key = typeof input["issueKey"] === "string" ? input["issueKey"] : "";
334
+ const project = key.slice(0, key.indexOf("-"));
335
+ if (!projectAllowed(boundary, project)) {
336
+ throw serviceRefusal();
337
+ }
338
+ }
339
+ /**
340
+ * Fail closed on an issue an issue-security level closes off. The service
341
+ * identity may be allowed to see it upstream, so the check is made here,
342
+ * before anything about it is returned, and it answers the same not-found a
343
+ * personal caller would see for an issue they cannot.
344
+ */
345
+ async assertIssueNotRestricted(site, credential, requested) {
346
+ const issue = issueKeyOf(requested);
347
+ const path = jiraOperationPath("issues.get", site.deploymentType);
348
+ const answer = await this.transport.getJson(site, credential, (path ?? "").replace(":issueKey", issue), { fields: "security" });
349
+ if (restricted(recordOf(answer))) {
350
+ throw new IntegrationError("ResourceNotFound", "Resource is not available through the service credential");
351
+ }
352
+ }
153
353
  /**
154
354
  * Replace a custom field's alias with the instance id the operator mapped it
155
355
  * to. The mapping lives in the deployment's config on purpose: which of an
@@ -185,54 +385,54 @@ export class JiraProvider {
185
385
  return { ...input, customFields: resolved };
186
386
  }
187
387
  /**
188
- * Replace a person's name with the account id Jira filters on, for the two
189
- * filters that can carry one. `me` and an account id are already what Jira
190
- * wants and cost no call.
388
+ * Replace a person's name with the identifier this product filters on, for
389
+ * the two filters that can carry one. `me` and an identifier already in the
390
+ * product's own shape are what Jira wants and cost no call.
191
391
  *
192
392
  * The directory is a read of the site's own user list, bounded to ten hits,
193
- * and its answer is never handed to the model: it only decides the id the
194
- * query is built from. A name nobody matches, or a name several people share,
195
- * is refused with what to do next — an account id from an issue — because the
196
- * alternative is a query that quietly answers "no such issues".
393
+ * and its answer is never handed to the model: it only decides the identifier
394
+ * the query is built from. A name nobody matches, or a name several people
395
+ * share, is refused with what to do next — the identifier an issue reported —
396
+ * because the alternative is a query that quietly answers "no such issues".
197
397
  */
198
- async resolvePeople(site, credential, input) {
398
+ async resolvePeople(site, credential, input, dialect) {
199
399
  const resolved = { ...input };
200
400
  for (const field of ["assignee", "reporter"]) {
201
401
  const value = input[field];
202
- if (!needsUserLookup(value))
402
+ if (!needsUserLookup(value, dialect.deployment))
203
403
  continue;
204
- resolved[field] = await this.accountIdFor(site, credential, field, String(value).trim());
404
+ resolved[field] = await this.identityFor(site, credential, dialect, field, String(value).trim());
205
405
  }
206
406
  return resolved;
207
407
  }
208
- async accountIdFor(site, credential, field, query) {
209
- const users = await this.transport.getJson(site, credential, "/rest/api/3/user/search", { query, maxResults: 10 });
408
+ async identityFor(site, credential, dialect, field, query) {
409
+ const users = await this.transport.getJson(site, credential, jiraCompanionPath("userSearch", site.deploymentType), { [dialect.userSearchParam]: query, maxResults: 10 });
210
410
  const byId = new Map();
211
411
  for (const entry of Array.isArray(users) ? users : []) {
212
412
  if (typeof entry !== "object" || entry === null)
213
413
  continue;
214
414
  const record = entry;
215
- const accountId = record["accountId"];
216
- if (typeof accountId !== "string" || accountId === "")
415
+ const identity = identityOf(dialect, record);
416
+ if (identity === undefined)
217
417
  continue;
218
418
  if (record["active"] === false)
219
419
  continue;
220
420
  const displayName = typeof record["displayName"] === "string"
221
421
  ? record["displayName"]
222
- : accountId;
223
- byId.set(accountId, displayName);
422
+ : identity;
423
+ byId.set(identity, displayName);
224
424
  }
225
425
  const matches = [...byId.entries()];
226
426
  if (matches.length === 1 && matches[0] !== undefined)
227
427
  return matches[0][0];
228
428
  if (matches.length === 0) {
229
- throw new IntegrationError("InvalidRequest", `${field} matches no Jira user named "${query}"; pass the accountId an issue reported, or "me"`);
429
+ throw new IntegrationError("InvalidRequest", `${field} matches no Jira user named "${query}"; pass the ${identifierName(dialect.deployment)} an issue reported, or "me"`);
230
430
  }
231
431
  const names = matches
232
432
  .slice(0, 3)
233
433
  .map(([, displayName]) => displayName)
234
434
  .join(", ");
235
- throw new IntegrationError("InvalidRequest", `${field} "${query}" matches ${matches.length} Jira users (${names}); pass the accountId an issue reported`);
435
+ throw new IntegrationError("InvalidRequest", `${field} "${query}" matches ${matches.length} Jira users (${names}); pass the ${identifierName(dialect.deployment)} an issue reported`);
236
436
  }
237
437
  /**
238
438
  * The site's field schema, read only when an issue read was asked to name
@@ -241,7 +441,7 @@ export class JiraProvider {
241
441
  * for the sake of one call.
242
442
  */
243
443
  async fieldNames(site, credential) {
244
- const fields = await this.transport.getJson(site, credential, "/rest/api/3/field");
444
+ const fields = await this.transport.getJson(site, credential, jiraOperationPath("fields.list", site.deploymentType) ?? "");
245
445
  const names = new Map();
246
446
  if (!Array.isArray(fields))
247
447
  return names;
@@ -258,18 +458,19 @@ export class JiraProvider {
258
458
  return names;
259
459
  }
260
460
  /**
261
- * The provider speaks the Cloud-only `/rest/api/3` surface. A Data Center
262
- * instance answers a different API, and the specification forbids treating it
263
- * as silently compatible, so the deployment type is checked once, at connect:
264
- * a site that names a type other than Cloud is refused. A site that does not
265
- * serve the endpoint at all — an older tenant, a proxy that hides it — is left
266
- * to the identity call that already succeeded instead of failing on a probe
267
- * that proves nothing either way.
461
+ * The provider speaks the deployment type the operator declared, and a site
462
+ * that answers the other product is refused instead of being read as if it
463
+ * were compatible. The two Jiras are different APIs — different roots,
464
+ * different authentication, different answers for the same read — so a probe
465
+ * happens once, at connect, and the message tells the operator which value to
466
+ * set. A site that does not serve the endpoint at all — an older tenant, a
467
+ * proxy that hides it — is left to the identity call that already succeeded
468
+ * instead of failing on a probe that proves nothing either way.
268
469
  */
269
- async requireCloud(site, credential) {
470
+ async requireDeployment(site, credential, dialect) {
270
471
  let info;
271
472
  try {
272
- info = await this.transport.getJson(site, credential, "/rest/api/3/serverInfo");
473
+ info = await this.transport.getJson(site, credential, jiraCompanionPath("serverInfo", site.deploymentType));
273
474
  }
274
475
  catch (error) {
275
476
  if (error instanceof IntegrationError &&
@@ -280,11 +481,7 @@ export class JiraProvider {
280
481
  throw error;
281
482
  }
282
483
  const deployment = info["deploymentType"];
283
- if (typeof deployment !== "string" || deployment === "")
284
- return;
285
- if (deployment !== CLOUD_DEPLOYMENT) {
286
- throw new IntegrationError("InvalidCredential", `Jira ${deployment} is not supported; this provider speaks Jira Cloud`);
287
- }
484
+ assertDeployment(dialect, typeof deployment === "string" ? deployment : "");
288
485
  }
289
486
  resolveSite(requested) {
290
487
  const flags = this.config.jira;
@@ -306,5 +503,68 @@ export class JiraProvider {
306
503
  return only;
307
504
  }
308
505
  }
506
+ /**
507
+ * Whether one caller-named project stays inside the deployment's boundary. The
508
+ * boundary lists project keys, and a Jira project key compares case-insensitively
509
+ * upstream while an operator may type it in any case, so the match normalizes
510
+ * the case; a listed numeric id matches exactly. A project key that is not
511
+ * listed never widens into its issues: `PROJ` does not cover `PROJX`.
512
+ */
513
+ export function projectAllowed(boundary, ref) {
514
+ if (boundaryHas(boundary, JIRA_RESOURCE_KIND, ref))
515
+ return true;
516
+ const key = ref.trim().toUpperCase();
517
+ if (key === "")
518
+ return false;
519
+ return (boundary[JIRA_RESOURCE_KIND] ?? []).some((entry) => entry.trim().toUpperCase() === key);
520
+ }
521
+ /** One refusal shape, so every boundary denial of this provider reads the same. */
522
+ function serviceRefusal() {
523
+ return new IntegrationError("ServiceResourceNotAllowed", "Service mode reads only the projects this workspace is allowed to see");
524
+ }
525
+ /** One search hit as the API returned it, without trusting its projection. */
526
+ function readableServiceHit(boundary, item) {
527
+ if (typeof item !== "object" || item === null)
528
+ return false;
529
+ const source = item;
530
+ if (restricted(source))
531
+ return false;
532
+ const fields = recordOf(source["fields"]);
533
+ return rawProjectAllowed(boundary, fields["project"]);
534
+ }
535
+ /** One project as the API reported it: matched by key or by id. */
536
+ function rawProjectAllowed(boundary, item) {
537
+ if (typeof item !== "object" || item === null)
538
+ return false;
539
+ const source = item;
540
+ const key = source["key"];
541
+ if (typeof key === "string" && projectAllowed(boundary, key))
542
+ return true;
543
+ const id = source["id"];
544
+ return ((typeof id === "number" && projectAllowed(boundary, String(id))) ||
545
+ (typeof id === "string" && projectAllowed(boundary, id)));
546
+ }
547
+ /**
548
+ * The bounded search answer. The page is filtered after it arrived — Jira's
549
+ * cursor stays its own — so a page may come back shorter than the limit asked
550
+ * for, and the next page is asked for with the same token.
551
+ */
552
+ function boundedSearchResults(data, boundary) {
553
+ if (typeof data !== "object" || data === null)
554
+ return data;
555
+ const source = data;
556
+ if (!Array.isArray(source["issues"]))
557
+ return source;
558
+ return {
559
+ ...source,
560
+ issues: source["issues"].filter((item) => readableServiceHit(boundary, item)),
561
+ };
562
+ }
563
+ /** A `security` level on the answer means Jira itself closes the issue off. */
564
+ function restricted(source) {
565
+ const level = recordOf(source["fields"])["security"];
566
+ return level !== null && level !== undefined;
567
+ }
568
+ /** Map an upstream failure of the probe onto a health status. */
309
569
  export default JiraProvider;
310
570
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/providers/jira/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,GAEtB,MAAM,uBAAuB,CAAC;AAE/B,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;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC;QAC3B,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,MAAM,IAAI,gBAAgB,CACxB,mBAAmB,EACnB,4BAA4B,CAC7B,CAAC;QACJ,CAAC;QACD,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3B,MAAM,IAAI,gBAAgB,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,CAAC;QACxE,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAED,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/providers/jira/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,GAEtB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,+BAA+B,EAAE,MAAM,oCAAoC,CAAC;AAarF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EACL,6BAA6B,EAC7B,iBAAiB,GAClB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,eAAe,EACf,QAAQ,GAGT,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,UAAU,GAEX,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,cAAc,EACd,QAAQ,IAAI,UAAU,EACtB,eAAe,GAChB,MAAM,UA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