@tinycloud/operations 0.7.7-beta.13 → 0.7.7-beta.14
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/artifacts.cjs +7 -4
- package/dist/artifacts.cjs.map +1 -1
- package/dist/artifacts.js +7 -4
- package/dist/artifacts.js.map +1 -1
- package/dist/cli-runtime.cjs +9 -6
- package/dist/cli-runtime.cjs.map +1 -1
- package/dist/cli-runtime.js +7 -4
- package/dist/cli-runtime.js.map +1 -1
- package/dist/delegation-binding.cjs +7 -4
- package/dist/delegation-binding.cjs.map +1 -1
- package/dist/delegation-binding.js +7 -4
- package/dist/delegation-binding.js.map +1 -1
- package/dist/index.cjs +9 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -744,6 +744,7 @@ var import_node_path2 = require("path");
|
|
|
744
744
|
// ../sdk-core/src/manifest.ts
|
|
745
745
|
var import_ms = __toESM(require_ms(), 1);
|
|
746
746
|
var import_sdk_services = require("@tinycloud/sdk-services");
|
|
747
|
+
var import_resource = require("@tinycloud/sdk-services/encryption/resource");
|
|
747
748
|
var DEFAULT_MANIFEST_SPACE = "applications";
|
|
748
749
|
var SERVICE_SHORT_TO_LONG = Object.freeze({
|
|
749
750
|
kv: "tinycloud.kv",
|
|
@@ -773,6 +774,7 @@ var KEY_APP_ID = new RegExp(`^${KEY_SEGMENT}$`);
|
|
|
773
774
|
var KEY_PATH = new RegExp(`^${KEY_SEGMENT}(?:/${KEY_SEGMENT}){2,7}$`);
|
|
774
775
|
|
|
775
776
|
// ../sdk-core/src/capabilities.ts
|
|
777
|
+
var import_resource2 = require("@tinycloud/sdk-services/encryption/resource");
|
|
776
778
|
function normalizeSpace(space) {
|
|
777
779
|
if (!space.startsWith("tinycloud:")) {
|
|
778
780
|
return space;
|
|
@@ -796,10 +798,9 @@ function isCapabilitySubset(requested, granted) {
|
|
|
796
798
|
const grantedActions = matchingScope.flatMap(
|
|
797
799
|
(entry) => expandActionShortNames(entry.service, entry.actions)
|
|
798
800
|
);
|
|
801
|
+
const namedKeyRequest = req.service === "tinycloud.encryption" && req.path.startsWith("urn:tinycloud:encryption:") && req.path.includes("/");
|
|
799
802
|
const covered = requestedActions.every(
|
|
800
|
-
(requestedAction) => grantedActions.some(
|
|
801
|
-
(grantedAction) => actionContains(grantedAction, requestedAction)
|
|
802
|
-
)
|
|
803
|
+
(requestedAction) => grantedActions.some((grantedAction) => namedKeyRequest ? grantedAction === requestedAction : actionContains(grantedAction, requestedAction))
|
|
803
804
|
);
|
|
804
805
|
if (!covered) {
|
|
805
806
|
missing.push(cloneEntry(req));
|
|
@@ -814,7 +815,9 @@ function canonicalizeEntryScopeMatches(requested, granted) {
|
|
|
814
815
|
if (normalizeSpace(requested.space ?? DEFAULT_MANIFEST_SPACE) !== normalizeSpace(granted.space ?? DEFAULT_MANIFEST_SPACE)) {
|
|
815
816
|
return false;
|
|
816
817
|
}
|
|
817
|
-
|
|
818
|
+
const namedKeyRequest = requested.service === "tinycloud.encryption" && requested.path.startsWith("urn:tinycloud:encryption:") && requested.path.includes("/");
|
|
819
|
+
const coveredPath = namedKeyRequest ? (0, import_resource2.encryptionResourceContains)(granted.path, requested.path) : pathContains(granted.path, requested.path);
|
|
820
|
+
if (!coveredPath) {
|
|
818
821
|
return false;
|
|
819
822
|
}
|
|
820
823
|
if (!recapCaveatsEqual(requested.caveats, granted.caveats)) {
|