@fabric-harness/databricks 4.3.0 → 4.3.2
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/dist/app-user-authorization.d.ts +6 -0
- package/dist/app-user-authorization.d.ts.map +1 -1
- package/dist/app-user-authorization.js +33 -0
- package/dist/app-user-authorization.js.map +1 -1
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/agent-services.js +0 -142
- package/dist/agent-services.js.map +0 -1
- package/dist/ai-gateway.js +0 -51
- package/dist/ai-gateway.js.map +0 -1
- package/dist/ai-search-admin.js +0 -194
- package/dist/ai-search-admin.js.map +0 -1
- package/dist/ai.js +0 -22
- package/dist/ai.js.map +0 -1
- package/dist/app.js +0 -143
- package/dist/app.js.map +0 -1
- package/dist/authoring-certification.js +0 -476
- package/dist/authoring-certification.js.map +0 -1
- package/dist/capabilities.js +0 -633
- package/dist/capabilities.js.map +0 -1
- package/dist/certification-resource.js +0 -17
- package/dist/certification-resource.js.map +0 -1
- package/dist/certification-sweeper.js +0 -128
- package/dist/certification-sweeper.js.map +0 -1
- package/dist/certification.js +0 -236
- package/dist/certification.js.map +0 -1
- package/dist/client.d.ts +0 -58
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js +0 -184
- package/dist/client.js.map +0 -1
- package/dist/compatibility.js +0 -88
- package/dist/compatibility.js.map +0 -1
- package/dist/consumption.js +0 -85
- package/dist/consumption.js.map +0 -1
- package/dist/cost-budget-actuals.js +0 -316
- package/dist/cost-budget-actuals.js.map +0 -1
- package/dist/embeddings.js +0 -24
- package/dist/embeddings.js.map +0 -1
- package/dist/feature-serving.js +0 -29
- package/dist/feature-serving.js.map +0 -1
- package/dist/genie-agent-mode.js +0 -374
- package/dist/genie-agent-mode.js.map +0 -1
- package/dist/genie-authoring.js +0 -898
- package/dist/genie-authoring.js.map +0 -1
- package/dist/genie.js +0 -405
- package/dist/genie.js.map +0 -1
- package/dist/governance.js +0 -353
- package/dist/governance.js.map +0 -1
- package/dist/identity.js +0 -229
- package/dist/identity.js.map +0 -1
- package/dist/jobs-authoring.js +0 -570
- package/dist/jobs-authoring.js.map +0 -1
- package/dist/jobs.js +0 -173
- package/dist/jobs.js.map +0 -1
- package/dist/lakebase.js +0 -110
- package/dist/lakebase.js.map +0 -1
- package/dist/lakeflow-authoring.js +0 -115
- package/dist/lakeflow-authoring.js.map +0 -1
- package/dist/lakeflow.js +0 -75
- package/dist/lakeflow.js.map +0 -1
- package/dist/managed-resource.js +0 -197
- package/dist/managed-resource.js.map +0 -1
- package/dist/mlflow-tracing.js +0 -167
- package/dist/mlflow-tracing.js.map +0 -1
- package/dist/mock-provider.js +0 -66
- package/dist/mock-provider.js.map +0 -1
- package/dist/model.js +0 -173
- package/dist/model.js.map +0 -1
- package/dist/persistence.js +0 -82
- package/dist/persistence.js.map +0 -1
- package/dist/rag-chain.js +0 -212
- package/dist/rag-chain.js.map +0 -1
- package/dist/rag-eval.js +0 -151
- package/dist/rag-eval.js.map +0 -1
- package/dist/secrets-authoring.js +0 -78
- package/dist/secrets-authoring.js.map +0 -1
- package/dist/secrets.js +0 -25
- package/dist/secrets.js.map +0 -1
- package/dist/serving-admin.js +0 -255
- package/dist/serving-admin.js.map +0 -1
- package/dist/serving-usage.js +0 -100
- package/dist/serving-usage.js.map +0 -1
- package/dist/sql-exec.js +0 -36
- package/dist/sql-exec.js.map +0 -1
- package/dist/telemetry-sink.js +0 -180
- package/dist/telemetry-sink.js.map +0 -1
- package/dist/tools.js +0 -167
- package/dist/tools.js.map +0 -1
- package/dist/unity-catalog-admin.js +0 -166
- package/dist/unity-catalog-admin.js.map +0 -1
- package/dist/vector-search.js +0 -65
- package/dist/vector-search.js.map +0 -1
- package/dist/volumes-attachment-store.js +0 -172
- package/dist/volumes-attachment-store.js.map +0 -1
- package/dist/workspace-authoring.js +0 -78
- package/dist/workspace-authoring.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -59691,6 +59691,20 @@ function createDatabricksAppUserAuthenticator(options) {
|
|
|
59691
59691
|
);
|
|
59692
59692
|
const cache = /* @__PURE__ */ new Map();
|
|
59693
59693
|
return async (request) => {
|
|
59694
|
+
if (options.trustForwardedUserIdentity) {
|
|
59695
|
+
const forwardedUser = forwardedUserIdentity(request.headers);
|
|
59696
|
+
if (forwardedUser) {
|
|
59697
|
+
return {
|
|
59698
|
+
id: forwardedUser.id,
|
|
59699
|
+
kind: "user",
|
|
59700
|
+
provider: "databricks-apps",
|
|
59701
|
+
tenantId: `databricks-user:${createHash3("sha256").update(forwardedUser.id).digest("hex").slice(0, 24)}`,
|
|
59702
|
+
permissions: [...permissions],
|
|
59703
|
+
...forwardedUser.displayName ? { displayName: forwardedUser.displayName } : {},
|
|
59704
|
+
...forwardedUser.ucPrincipal ? { ucPrincipal: forwardedUser.ucPrincipal } : {}
|
|
59705
|
+
};
|
|
59706
|
+
}
|
|
59707
|
+
}
|
|
59694
59708
|
const delegated = onBehalfOfFromHeaders(request.headers);
|
|
59695
59709
|
const now = options.now?.() ?? Date.now();
|
|
59696
59710
|
const appPrincipal = options.appPrincipalId?.trim();
|
|
@@ -59779,6 +59793,25 @@ function forwardedIdentity(headers) {
|
|
|
59779
59793
|
};
|
|
59780
59794
|
return (read("x-forwarded-user") ?? read("x-forwarded-preferred-username") ?? read("x-forwarded-email"))?.trim() || void 0;
|
|
59781
59795
|
}
|
|
59796
|
+
function forwardedUserIdentity(headers) {
|
|
59797
|
+
const read = (name) => {
|
|
59798
|
+
if (typeof headers.get === "function")
|
|
59799
|
+
return headers.get(name)?.trim() || void 0;
|
|
59800
|
+
const value = headers[name];
|
|
59801
|
+
const first = Array.isArray(value) ? value[0] : value;
|
|
59802
|
+
return first?.trim() || void 0;
|
|
59803
|
+
};
|
|
59804
|
+
const id = read("x-forwarded-user");
|
|
59805
|
+
if (!id) return void 0;
|
|
59806
|
+
const email3 = read("x-forwarded-email");
|
|
59807
|
+
const preferredUsername = read("x-forwarded-preferred-username");
|
|
59808
|
+
const ucPrincipal = email3 ?? preferredUsername;
|
|
59809
|
+
return {
|
|
59810
|
+
id,
|
|
59811
|
+
...preferredUsername ? { displayName: preferredUsername } : email3 ? { displayName: email3 } : {},
|
|
59812
|
+
...ucPrincipal ? { ucPrincipal } : {}
|
|
59813
|
+
};
|
|
59814
|
+
}
|
|
59782
59815
|
async function inspectDatabricksAppUserAuthorization(options) {
|
|
59783
59816
|
const delegated = onBehalfOfFromHeaders(options.headers);
|
|
59784
59817
|
if (!delegated) throw new Error("Databricks App request did not include user authorization.");
|