@azure/storage-file-share 12.25.0-alpha.20240826.1 → 12.25.0-alpha.20240827.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +47 -47
- package/dist/index.js.map +1 -1
- package/dist-esm/storage-blob/src/BatchResponse.js +1 -1
- package/dist-esm/storage-blob/src/BatchResponse.js.map +1 -1
- package/dist-esm/storage-blob/src/BatchResponseParser.js +1 -1
- package/dist-esm/storage-blob/src/BatchResponseParser.js.map +1 -1
- package/dist-esm/storage-blob/src/BatchUtils.js +1 -1
- package/dist-esm/storage-blob/src/BatchUtils.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobBatch.js +1 -1
- package/dist-esm/storage-blob/src/BlobBatch.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobBatchClient.js +1 -1
- package/dist-esm/storage-blob/src/BlobBatchClient.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobDownloadResponse.js +1 -1
- package/dist-esm/storage-blob/src/BlobDownloadResponse.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobLeaseClient.js +1 -1
- package/dist-esm/storage-blob/src/BlobLeaseClient.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobQueryResponse.js +1 -1
- package/dist-esm/storage-blob/src/BlobQueryResponse.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobServiceClient.js +1 -1
- package/dist-esm/storage-blob/src/BlobServiceClient.js.map +1 -1
- package/dist-esm/storage-blob/src/Clients.js +1 -1
- package/dist-esm/storage-blob/src/Clients.js.map +1 -1
- package/dist-esm/storage-blob/src/ContainerClient.js.map +1 -1
- package/dist-esm/storage-blob/src/PageBlobRangeResponse.js +1 -1
- package/dist-esm/storage-blob/src/PageBlobRangeResponse.js.map +1 -1
- package/dist-esm/storage-blob/src/Pipeline.js +1 -1
- package/dist-esm/storage-blob/src/Pipeline.js.map +1 -1
- package/dist-esm/storage-blob/src/Range.js +1 -1
- package/dist-esm/storage-blob/src/Range.js.map +1 -1
- package/dist-esm/storage-blob/src/StorageBrowserPolicyFactory.js +1 -1
- package/dist-esm/storage-blob/src/StorageBrowserPolicyFactory.js.map +1 -1
- package/dist-esm/storage-blob/src/StorageClient.js +1 -1
- package/dist-esm/storage-blob/src/StorageClient.js.map +1 -1
- package/dist-esm/storage-blob/src/StorageContextClient.js +1 -1
- package/dist-esm/storage-blob/src/StorageContextClient.js.map +1 -1
- package/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js +1 -1
- package/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js.map +1 -1
- package/dist-esm/storage-blob/src/credentials/AnonymousCredential.js +1 -1
- package/dist-esm/storage-blob/src/credentials/AnonymousCredential.js.map +1 -1
- package/dist-esm/storage-blob/src/credentials/Credential.js +1 -1
- package/dist-esm/storage-blob/src/credentials/Credential.js.map +1 -1
- package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.browser.js +1 -1
- package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.browser.js.map +1 -1
- package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js +1 -1
- package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js.map +1 -1
- package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.browser.js +1 -1
- package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.browser.js.map +1 -1
- package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js +1 -1
- package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js.map +1 -1
- package/dist-esm/storage-blob/src/generatedModels.js +1 -1
- package/dist-esm/storage-blob/src/generatedModels.js.map +1 -1
- package/dist-esm/storage-blob/src/index.js +1 -1
- package/dist-esm/storage-blob/src/index.js.map +1 -1
- package/dist-esm/storage-blob/src/log.js +1 -1
- package/dist-esm/storage-blob/src/log.js.map +1 -1
- package/dist-esm/storage-blob/src/models.js +1 -1
- package/dist-esm/storage-blob/src/models.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/AnonymousCredentialPolicy.js +1 -1
- package/dist-esm/storage-blob/src/policies/AnonymousCredentialPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/CredentialPolicy.js +1 -1
- package/dist-esm/storage-blob/src/policies/CredentialPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/RequestPolicy.js +1 -1
- package/dist-esm/storage-blob/src/policies/RequestPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js +1 -1
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicyV2.js +1 -1
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicyV2.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.browser.js +1 -1
- package/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.browser.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.js +1 -1
- package/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js +1 -1
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js +1 -1
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js +1 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.browser.js +1 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.browser.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js +1 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js.map +1 -1
- package/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js +1 -1
- package/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/AccountSASPermissions.js +1 -1
- package/dist-esm/storage-blob/src/sas/AccountSASPermissions.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/AccountSASResourceTypes.js +1 -1
- package/dist-esm/storage-blob/src/sas/AccountSASResourceTypes.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/AccountSASServices.js +1 -1
- package/dist-esm/storage-blob/src/sas/AccountSASServices.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js +1 -1
- package/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/BlobSASPermissions.js +1 -1
- package/dist-esm/storage-blob/src/sas/BlobSASPermissions.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js +1 -1
- package/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js +1 -1
- package/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/SASQueryParameters.js +1 -1
- package/dist-esm/storage-blob/src/sas/SASQueryParameters.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/SasIPRange.js +1 -1
- package/dist-esm/storage-blob/src/sas/SasIPRange.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/Batch.js +1 -1
- package/dist-esm/storage-blob/src/utils/Batch.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js +1 -1
- package/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/Mutex.js +1 -1
- package/dist-esm/storage-blob/src/utils/Mutex.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js +1 -1
- package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/SharedKeyComparator.js +1 -1
- package/dist-esm/storage-blob/src/utils/SharedKeyComparator.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/cache.js +1 -1
- package/dist-esm/storage-blob/src/utils/cache.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/constants.js +1 -1
- package/dist-esm/storage-blob/src/utils/constants.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/tracing.js +1 -1
- package/dist-esm/storage-blob/src/utils/tracing.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/utils.common.js +1 -1
- package/dist-esm/storage-blob/src/utils/utils.common.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/utils.node.js +1 -1
- package/dist-esm/storage-blob/src/utils/utils.node.js.map +1 -1
- package/dist-esm/storage-file-share/src/AccountSASPermissions.js +1 -1
- package/dist-esm/storage-file-share/src/AccountSASPermissions.js.map +1 -1
- package/dist-esm/storage-file-share/src/AccountSASResourceTypes.js +1 -1
- package/dist-esm/storage-file-share/src/AccountSASResourceTypes.js.map +1 -1
- package/dist-esm/storage-file-share/src/AccountSASServices.js +1 -1
- package/dist-esm/storage-file-share/src/AccountSASServices.js.map +1 -1
- package/dist-esm/storage-file-share/src/AccountSASSignatureValues.js +1 -1
- package/dist-esm/storage-file-share/src/AccountSASSignatureValues.js.map +1 -1
- package/dist-esm/storage-file-share/src/Clients.js +1 -1
- package/dist-esm/storage-file-share/src/Clients.js.map +1 -1
- package/dist-esm/storage-file-share/src/FileDownloadResponse.browser.js +1 -1
- package/dist-esm/storage-file-share/src/FileDownloadResponse.browser.js.map +1 -1
- package/dist-esm/storage-file-share/src/FileDownloadResponse.js +1 -1
- package/dist-esm/storage-file-share/src/FileDownloadResponse.js.map +1 -1
- package/dist-esm/storage-file-share/src/FileSASPermissions.js +1 -1
- package/dist-esm/storage-file-share/src/FileSASPermissions.js.map +1 -1
- package/dist-esm/storage-file-share/src/FileSASSignatureValues.js +1 -1
- package/dist-esm/storage-file-share/src/FileSASSignatureValues.js.map +1 -1
- package/dist-esm/storage-file-share/src/FileSystemAttributes.js +1 -1
- package/dist-esm/storage-file-share/src/FileSystemAttributes.js.map +1 -1
- package/dist-esm/storage-file-share/src/Pipeline.js +1 -1
- package/dist-esm/storage-file-share/src/Pipeline.js.map +1 -1
- package/dist-esm/storage-file-share/src/Range.js +1 -1
- package/dist-esm/storage-file-share/src/Range.js.map +1 -1
- package/dist-esm/storage-file-share/src/SASQueryParameters.js +1 -1
- package/dist-esm/storage-file-share/src/SASQueryParameters.js.map +1 -1
- package/dist-esm/storage-file-share/src/SasIPRange.js +1 -1
- package/dist-esm/storage-file-share/src/SasIPRange.js.map +1 -1
- package/dist-esm/storage-file-share/src/ShareClientInternal.js +1 -1
- package/dist-esm/storage-file-share/src/ShareClientInternal.js.map +1 -1
- package/dist-esm/storage-file-share/src/ShareSASPermissions.js +1 -1
- package/dist-esm/storage-file-share/src/ShareSASPermissions.js.map +1 -1
- package/dist-esm/storage-file-share/src/ShareServiceClient.js +1 -1
- package/dist-esm/storage-file-share/src/ShareServiceClient.js.map +1 -1
- package/dist-esm/storage-file-share/src/StorageClient.js +1 -1
- package/dist-esm/storage-file-share/src/StorageClient.js.map +1 -1
- package/dist-esm/storage-file-share/src/StorageContextClient.js +1 -1
- package/dist-esm/storage-file-share/src/StorageContextClient.js.map +1 -1
- package/dist-esm/storage-file-share/src/StorageRetryPolicyFactory.js +1 -1
- package/dist-esm/storage-file-share/src/StorageRetryPolicyFactory.js.map +1 -1
- package/dist-esm/storage-file-share/src/generatedModels.js +1 -1
- package/dist-esm/storage-file-share/src/generatedModels.js.map +1 -1
- package/dist-esm/storage-file-share/src/index.browser.js +1 -1
- package/dist-esm/storage-file-share/src/index.browser.js.map +1 -1
- package/dist-esm/storage-file-share/src/index.js +1 -1
- package/dist-esm/storage-file-share/src/index.js.map +1 -1
- package/dist-esm/storage-file-share/src/log.js +1 -1
- package/dist-esm/storage-file-share/src/log.js.map +1 -1
- package/dist-esm/storage-file-share/src/models.js +1 -1
- package/dist-esm/storage-file-share/src/models.js.map +1 -1
- package/dist-esm/storage-file-share/src/policies/StorageRetryPolicy.js +1 -1
- package/dist-esm/storage-file-share/src/policies/StorageRetryPolicy.js.map +1 -1
- package/dist-esm/storage-file-share/src/policies/StorageRetryPolicyV2.js +1 -1
- package/dist-esm/storage-file-share/src/policies/StorageRetryPolicyV2.js.map +1 -1
- package/dist-esm/storage-file-share/src/utils/Batch.js +1 -1
- package/dist-esm/storage-file-share/src/utils/Batch.js.map +1 -1
- package/dist-esm/storage-file-share/src/utils/BufferScheduler.js +1 -1
- package/dist-esm/storage-file-share/src/utils/BufferScheduler.js.map +1 -1
- package/dist-esm/storage-file-share/src/utils/RetriableReadableStream.js +1 -1
- package/dist-esm/storage-file-share/src/utils/RetriableReadableStream.js.map +1 -1
- package/dist-esm/storage-file-share/src/utils/constants.js +1 -1
- package/dist-esm/storage-file-share/src/utils/constants.js.map +1 -1
- package/dist-esm/storage-file-share/src/utils/tracing.js +1 -1
- package/dist-esm/storage-file-share/src/utils/tracing.js.map +1 -1
- package/dist-esm/storage-file-share/src/utils/utils.browser.js +1 -1
- package/dist-esm/storage-file-share/src/utils/utils.browser.js.map +1 -1
- package/dist-esm/storage-file-share/src/utils/utils.common.js +1 -1
- package/dist-esm/storage-file-share/src/utils/utils.common.js.map +1 -1
- package/dist-esm/storage-file-share/src/utils/utils.node.js +1 -1
- package/dist-esm/storage-file-share/src/utils/utils.node.js.map +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AccountSASPermissions.js","sourceRoot":"","sources":["../../../../../storage-blob/src/sas/AccountSASPermissions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;GAQG;AACH,MAAM,OAAO,qBAAqB;IAAlC;QA4GE;;WAEG;QACI,SAAI,GAAY,KAAK,CAAC;QAE7B;;WAEG;QACI,UAAK,GAAY,KAAK,CAAC;QAE9B;;WAEG;QACI,WAAM,GAAY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CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;YACb,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;YACb,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,qBAAqB,EAAE,CAAC;YAC/B,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;YACzB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,OAAO,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9B,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * This is a helper class to construct a string representing the permissions granted by an AccountSAS. Setting a value\n * to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the\n * values are set, this should be serialized with toString and set as the permissions field on an\n * {@link AccountSASSignatureValues} object. It is possible to construct the permissions string without this class, but\n * the order of the permissions is particular and this class guarantees correctness.\n */\nexport class AccountSASPermissions {\n /**\n * Parse initializes the AccountSASPermissions fields from a string.\n *\n * @param permissions -\n */\n public static parse(permissions: string): AccountSASPermissions {\n const accountSASPermissions = new AccountSASPermissions();\n\n for (const c of permissions) {\n switch (c) {\n case \"r\":\n accountSASPermissions.read = true;\n break;\n case \"w\":\n accountSASPermissions.write = true;\n break;\n case \"d\":\n accountSASPermissions.delete = true;\n break;\n case \"x\":\n accountSASPermissions.deleteVersion = true;\n break;\n case \"l\":\n accountSASPermissions.list = true;\n break;\n case \"a\":\n accountSASPermissions.add = true;\n break;\n case \"c\":\n accountSASPermissions.create = true;\n break;\n case \"u\":\n accountSASPermissions.update = true;\n break;\n case \"p\":\n accountSASPermissions.process = true;\n break;\n case \"t\":\n accountSASPermissions.tag = true;\n break;\n case \"f\":\n accountSASPermissions.filter = true;\n break;\n case \"i\":\n accountSASPermissions.setImmutabilityPolicy = true;\n break;\n case \"y\":\n accountSASPermissions.permanentDelete = true;\n break;\n default:\n throw new RangeError(`Invalid permission character: ${c}`);\n }\n }\n\n return accountSASPermissions;\n }\n\n /**\n * Creates a {@link AccountSASPermissions} from a raw object which contains same keys as it\n * and boolean values for them.\n *\n * @param permissionLike -\n */\n public static from(permissionLike: AccountSASPermissionsLike): AccountSASPermissions {\n const accountSASPermissions = new AccountSASPermissions();\n if (permissionLike.read) {\n accountSASPermissions.read = true;\n }\n if (permissionLike.write) {\n accountSASPermissions.write = true;\n }\n if (permissionLike.delete) {\n accountSASPermissions.delete = true;\n }\n if (permissionLike.deleteVersion) {\n accountSASPermissions.deleteVersion = true;\n }\n if (permissionLike.filter) {\n accountSASPermissions.filter = true;\n }\n if (permissionLike.tag) {\n accountSASPermissions.tag = true;\n }\n if (permissionLike.list) {\n accountSASPermissions.list = true;\n }\n if (permissionLike.add) {\n accountSASPermissions.add = true;\n }\n if (permissionLike.create) {\n accountSASPermissions.create = true;\n }\n if (permissionLike.update) {\n accountSASPermissions.update = true;\n }\n if (permissionLike.process) {\n accountSASPermissions.process = true;\n }\n if (permissionLike.setImmutabilityPolicy) {\n accountSASPermissions.setImmutabilityPolicy = true;\n }\n if (permissionLike.permanentDelete) {\n accountSASPermissions.permanentDelete = true;\n }\n return accountSASPermissions;\n }\n\n /**\n * Permission to read resources and list queues and tables granted.\n */\n public read: boolean = false;\n\n /**\n * Permission to write resources granted.\n */\n public write: boolean = false;\n\n /**\n * Permission to delete blobs and files granted.\n */\n public delete: boolean = false;\n\n /**\n * Permission to delete versions granted.\n */\n public deleteVersion: boolean = false;\n\n /**\n * Permission to list blob containers, blobs, shares, directories, and files granted.\n */\n public list: boolean = false;\n\n /**\n * Permission to add messages, table entities, and append to blobs granted.\n */\n public add: boolean = false;\n\n /**\n * Permission to create blobs and files granted.\n */\n public create: boolean = false;\n\n /**\n * Permissions to update messages and table entities granted.\n */\n public update: boolean = false;\n\n /**\n * Permission to get and delete messages granted.\n */\n public process: boolean = false;\n\n /**\n * Specfies Tag access granted.\n */\n public tag: boolean = false;\n\n /**\n * Permission to filter blobs.\n */\n public filter: boolean = false;\n\n /**\n * Permission to set immutability policy.\n */\n public setImmutabilityPolicy: boolean = false;\n\n /**\n * Specifies that Permanent Delete is permitted.\n */\n public permanentDelete: boolean = false;\n\n /**\n * Produces the SAS permissions string for an Azure Storage account.\n * Call this method to set AccountSASSignatureValues Permissions field.\n *\n * Using this method will guarantee the resource types are in\n * an order accepted by the service.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n *\n */\n public toString(): string {\n // The order of the characters should be as specified here to ensure correctness:\n // https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n // Use a string array instead of string concatenating += operator for performance\n const permissions: string[] = [];\n if (this.read) {\n permissions.push(\"r\");\n }\n if (this.write) {\n permissions.push(\"w\");\n }\n if (this.delete) {\n permissions.push(\"d\");\n }\n if (this.deleteVersion) {\n permissions.push(\"x\");\n }\n if (this.filter) {\n permissions.push(\"f\");\n }\n if (this.tag) {\n permissions.push(\"t\");\n }\n if (this.list) {\n permissions.push(\"l\");\n }\n if (this.add) {\n permissions.push(\"a\");\n }\n if (this.create) {\n permissions.push(\"c\");\n }\n if (this.update) {\n permissions.push(\"u\");\n }\n if (this.process) {\n permissions.push(\"p\");\n }\n if (this.setImmutabilityPolicy) {\n permissions.push(\"i\");\n }\n if (this.permanentDelete) {\n permissions.push(\"y\");\n }\n return permissions.join(\"\");\n }\n}\n\n/**\n * A type that looks like an account SAS permission.\n * Used in {@link AccountSASPermissions} to parse SAS permissions from raw objects.\n */\nexport interface AccountSASPermissionsLike {\n /**\n * Permission to read resources and list queues and tables granted.\n */\n read?: boolean;\n\n /**\n * Permission to write resources granted.\n */\n write?: boolean;\n\n /**\n * Permission to delete blobs and files granted.\n */\n delete?: boolean;\n\n /**\n * Permission to delete versions granted.\n */\n deleteVersion?: boolean;\n\n /**\n * Permission to list blob containers, blobs, shares, directories, and files granted.\n */\n list?: boolean;\n\n /**\n * Permission to add messages, table entities, and append to blobs granted.\n */\n add?: boolean;\n\n /**\n * Permission to create blobs and files granted.\n */\n create?: boolean;\n\n /**\n * Permissions to update messages and table entities granted.\n */\n update?: boolean;\n\n /**\n * Permission to get and delete messages granted.\n */\n process?: boolean;\n\n /**\n * Specfies Tag access granted.\n */\n tag?: boolean;\n\n /**\n * Permission to filter blobs.\n */\n filter?: boolean;\n\n /**\n * Permission to set immutability policy.\n */\n setImmutabilityPolicy?: boolean;\n\n /**\n * Specifies that Permanent Delete is permitted.\n */\n permanentDelete?: boolean;\n}\n"]}
|
1
|
+
{"version":3,"file":"AccountSASPermissions.js","sourceRoot":"","sources":["../../../../../storage-blob/src/sas/AccountSASPermissions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;GAQG;AACH,MAAM,OAAO,qBAAqB;IAAlC;QA4GE;;WAEG;QACI,SAAI,GAAY,KAAK,CAAC;QAE7B;;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AAC,aAAa,EAAE,CAAC;YACvB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;YACb,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;YACb,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,qBAAqB,EAAE,CAAC;YAC/B,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;YACzB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,OAAO,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9B,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * This is a helper class to construct a string representing the permissions granted by an AccountSAS. Setting a value\n * to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the\n * values are set, this should be serialized with toString and set as the permissions field on an\n * {@link AccountSASSignatureValues} object. It is possible to construct the permissions string without this class, but\n * the order of the permissions is particular and this class guarantees correctness.\n */\nexport class AccountSASPermissions {\n /**\n * Parse initializes the AccountSASPermissions fields from a string.\n *\n * @param permissions -\n */\n public static parse(permissions: string): AccountSASPermissions {\n const accountSASPermissions = new AccountSASPermissions();\n\n for (const c of permissions) {\n switch (c) {\n case \"r\":\n accountSASPermissions.read = true;\n break;\n case \"w\":\n accountSASPermissions.write = true;\n break;\n case \"d\":\n accountSASPermissions.delete = true;\n break;\n case \"x\":\n accountSASPermissions.deleteVersion = true;\n break;\n case \"l\":\n accountSASPermissions.list = true;\n break;\n case \"a\":\n accountSASPermissions.add = true;\n break;\n case \"c\":\n accountSASPermissions.create = true;\n break;\n case \"u\":\n accountSASPermissions.update = true;\n break;\n case \"p\":\n accountSASPermissions.process = true;\n break;\n case \"t\":\n accountSASPermissions.tag = true;\n break;\n case \"f\":\n accountSASPermissions.filter = true;\n break;\n case \"i\":\n accountSASPermissions.setImmutabilityPolicy = true;\n break;\n case \"y\":\n accountSASPermissions.permanentDelete = true;\n break;\n default:\n throw new RangeError(`Invalid permission character: ${c}`);\n }\n }\n\n return accountSASPermissions;\n }\n\n /**\n * Creates a {@link AccountSASPermissions} from a raw object which contains same keys as it\n * and boolean values for them.\n *\n * @param permissionLike -\n */\n public static from(permissionLike: AccountSASPermissionsLike): AccountSASPermissions {\n const accountSASPermissions = new AccountSASPermissions();\n if (permissionLike.read) {\n accountSASPermissions.read = true;\n }\n if (permissionLike.write) {\n accountSASPermissions.write = true;\n }\n if (permissionLike.delete) {\n accountSASPermissions.delete = true;\n }\n if (permissionLike.deleteVersion) {\n accountSASPermissions.deleteVersion = true;\n }\n if (permissionLike.filter) {\n accountSASPermissions.filter = true;\n }\n if (permissionLike.tag) {\n accountSASPermissions.tag = true;\n }\n if (permissionLike.list) {\n accountSASPermissions.list = true;\n }\n if (permissionLike.add) {\n accountSASPermissions.add = true;\n }\n if (permissionLike.create) {\n accountSASPermissions.create = true;\n }\n if (permissionLike.update) {\n accountSASPermissions.update = true;\n }\n if (permissionLike.process) {\n accountSASPermissions.process = true;\n }\n if (permissionLike.setImmutabilityPolicy) {\n accountSASPermissions.setImmutabilityPolicy = true;\n }\n if (permissionLike.permanentDelete) {\n accountSASPermissions.permanentDelete = true;\n }\n return accountSASPermissions;\n }\n\n /**\n * Permission to read resources and list queues and tables granted.\n */\n public read: boolean = false;\n\n /**\n * Permission to write resources granted.\n */\n public write: boolean = false;\n\n /**\n * Permission to delete blobs and files granted.\n */\n public delete: boolean = false;\n\n /**\n * Permission to delete versions granted.\n */\n public deleteVersion: boolean = false;\n\n /**\n * Permission to list blob containers, blobs, shares, directories, and files granted.\n */\n public list: boolean = false;\n\n /**\n * Permission to add messages, table entities, and append to blobs granted.\n */\n public add: boolean = false;\n\n /**\n * Permission to create blobs and files granted.\n */\n public create: boolean = false;\n\n /**\n * Permissions to update messages and table entities granted.\n */\n public update: boolean = false;\n\n /**\n * Permission to get and delete messages granted.\n */\n public process: boolean = false;\n\n /**\n * Specfies Tag access granted.\n */\n public tag: boolean = false;\n\n /**\n * Permission to filter blobs.\n */\n public filter: boolean = false;\n\n /**\n * Permission to set immutability policy.\n */\n public setImmutabilityPolicy: boolean = false;\n\n /**\n * Specifies that Permanent Delete is permitted.\n */\n public permanentDelete: boolean = false;\n\n /**\n * Produces the SAS permissions string for an Azure Storage account.\n * Call this method to set AccountSASSignatureValues Permissions field.\n *\n * Using this method will guarantee the resource types are in\n * an order accepted by the service.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n *\n */\n public toString(): string {\n // The order of the characters should be as specified here to ensure correctness:\n // https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n // Use a string array instead of string concatenating += operator for performance\n const permissions: string[] = [];\n if (this.read) {\n permissions.push(\"r\");\n }\n if (this.write) {\n permissions.push(\"w\");\n }\n if (this.delete) {\n permissions.push(\"d\");\n }\n if (this.deleteVersion) {\n permissions.push(\"x\");\n }\n if (this.filter) {\n permissions.push(\"f\");\n }\n if (this.tag) {\n permissions.push(\"t\");\n }\n if (this.list) {\n permissions.push(\"l\");\n }\n if (this.add) {\n permissions.push(\"a\");\n }\n if (this.create) {\n permissions.push(\"c\");\n }\n if (this.update) {\n permissions.push(\"u\");\n }\n if (this.process) {\n permissions.push(\"p\");\n }\n if (this.setImmutabilityPolicy) {\n permissions.push(\"i\");\n }\n if (this.permanentDelete) {\n permissions.push(\"y\");\n }\n return permissions.join(\"\");\n }\n}\n\n/**\n * A type that looks like an account SAS permission.\n * Used in {@link AccountSASPermissions} to parse SAS permissions from raw objects.\n */\nexport interface AccountSASPermissionsLike {\n /**\n * Permission to read resources and list queues and tables granted.\n */\n read?: boolean;\n\n /**\n * Permission to write resources granted.\n */\n write?: boolean;\n\n /**\n * Permission to delete blobs and files granted.\n */\n delete?: boolean;\n\n /**\n * Permission to delete versions granted.\n */\n deleteVersion?: boolean;\n\n /**\n * Permission to list blob containers, blobs, shares, directories, and files granted.\n */\n list?: boolean;\n\n /**\n * Permission to add messages, table entities, and append to blobs granted.\n */\n add?: boolean;\n\n /**\n * Permission to create blobs and files granted.\n */\n create?: boolean;\n\n /**\n * Permissions to update messages and table entities granted.\n */\n update?: boolean;\n\n /**\n * Permission to get and delete messages granted.\n */\n process?: boolean;\n\n /**\n * Specfies Tag access granted.\n */\n tag?: boolean;\n\n /**\n * Permission to filter blobs.\n */\n filter?: boolean;\n\n /**\n * Permission to set immutability policy.\n */\n setImmutabilityPolicy?: boolean;\n\n /**\n * Specifies that Permanent Delete is permitted.\n */\n permanentDelete?: boolean;\n}\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AccountSASResourceTypes.js","sourceRoot":"","sources":["../../../../../storage-blob/src/sas/AccountSASResourceTypes.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;G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file":"AccountSASResourceTypes.js","sourceRoot":"","sources":["../../../../../storage-blob/src/sas/AccountSASResourceTypes.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;GAQG;AACH,MAAM,OAAO,uBAAuB;IAApC;QA6BE;;WAEG;QACI,YAAO,GAAY,KAAK,CAAC;QAEhC;;WAEG;QACI,cAAS,GAAY,KAAK,CAAC;QAElC;;WAEG;QACI,WAAM,GAAY,KAAK,CAAC;IAqBjC,CAAC;IA9DC;;;;;OAKG;IACI,MAAM,CAAC,KAAK,CAAC,aAAqB;QACvC,MAAM,uBAAuB,GAAG,IAAI,uBAAuB,EAAE,CAAC;QAE9D,KAAK,MAAM,CAAC,IAAI,aAAa,EAAE,CAAC;YAC9B,QAAQ,CAAC,EAAE,CAAC;gBACV,KAAK,GAAG;oBACN,uBAAuB,CAAC,OAAO,GAAG,IAAI,CAAC;oBACvC,MAAM;gBACR,KAAK,GAAG;oBACN,uBAAuB,CAAC,SAAS,GAAG,IAAI,CAAC;oBACzC,MAAM;gBACR,KAAK,GAAG;oBACN,uBAAuB,CAAC,MAAM,GAAG,IAAI,CAAC;oBACtC,MAAM;gBACR;oBACE,MAAM,IAAI,UAAU,CAAC,0BAA0B,CAAC,EAAE,CAAC,CAAC;YACxD,CAAC;QACH,CAAC;QAED,OAAO,uBAAuB,CAAC;IACjC,CAAC;IAiBD;;;;;OAKG;IACI,QAAQ;QACb,MAAM,aAAa,GAAa,EAAE,CAAC;QACnC,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC;QACD,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC;QACD,OAAO,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * This is a helper class to construct a string representing the resources accessible by an AccountSAS. Setting a value\n * to true means that any SAS which uses these permissions will grant access to that resource type. Once all the\n * values are set, this should be serialized with toString and set as the resources field on an\n * {@link AccountSASSignatureValues} object. It is possible to construct the resources string without this class, but\n * the order of the resources is particular and this class guarantees correctness.\n */\nexport class AccountSASResourceTypes {\n /**\n * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an\n * Error if it encounters a character that does not correspond to a valid resource type.\n *\n * @param resourceTypes -\n */\n public static parse(resourceTypes: string): AccountSASResourceTypes {\n const accountSASResourceTypes = new AccountSASResourceTypes();\n\n for (const c of resourceTypes) {\n switch (c) {\n case \"s\":\n accountSASResourceTypes.service = true;\n break;\n case \"c\":\n accountSASResourceTypes.container = true;\n break;\n case \"o\":\n accountSASResourceTypes.object = true;\n break;\n default:\n throw new RangeError(`Invalid resource type: ${c}`);\n }\n }\n\n return accountSASResourceTypes;\n }\n\n /**\n * Permission to access service level APIs granted.\n */\n public service: boolean = false;\n\n /**\n * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted.\n */\n public container: boolean = false;\n\n /**\n * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted.\n */\n public object: boolean = false;\n\n /**\n * Converts the given resource types to a string.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n *\n */\n public toString(): string {\n const resourceTypes: string[] = [];\n if (this.service) {\n resourceTypes.push(\"s\");\n }\n if (this.container) {\n resourceTypes.push(\"c\");\n }\n if (this.object) {\n resourceTypes.push(\"o\");\n }\n return resourceTypes.join(\"\");\n }\n}\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AccountSASServices.js","sourceRoot":"","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CAAC,KAAK,EAAE,CAAC;YACf,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACrB,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACrB,CAAC;QACD,OAAO,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC3B,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT
|
1
|
+
{"version":3,"file":"AccountSASServices.js","sourceRoot":"","sources":["../../../../../storage-blob/src/sas/AccountSASServices.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;GAQG;AACH,MAAM,OAAO,kBAAkB;IAA/B;QAgCE;;WAEG;QACI,SAAI,GAAY,KAAK,CAAC;QAE7B;;WAEG;QACI,SAAI,GAAY,KAAK,CAAC;QAE7B;;WAEG;QACI,UAAK,GAAY,KAAK,CAAC;QAE9B;;WAEG;QACI,UAAK,GAAY,KAAK,CAAC;IAsBhC,CAAC;IAvEC;;;;;OAKG;IACI,MAAM,CAAC,KAAK,CAAC,QAAgB;QAClC,MAAM,kBAAkB,GAAG,IAAI,kBAAkB,EAAE,CAAC;QAEpD,KAAK,MAAM,CAAC,IAAI,QAAQ,EAAE,CAAC;YACzB,QAAQ,CAAC,EAAE,CAAC;gBACV,KAAK,GAAG;oBACN,kBAAkB,CAAC,IAAI,GAAG,IAAI,CAAC;oBAC/B,MAAM;gBACR,KAAK,GAAG;oBACN,kBAAkB,CAAC,IAAI,GAAG,IAAI,CAAC;oBAC/B,MAAM;gBACR,KAAK,GAAG;oBACN,kBAAkB,CAAC,KAAK,GAAG,IAAI,CAAC;oBAChC,MAAM;gBACR,KAAK,GAAG;oBACN,kBAAkB,CAAC,KAAK,GAAG,IAAI,CAAC;oBAChC,MAAM;gBACR;oBACE,MAAM,IAAI,UAAU,CAAC,8BAA8B,CAAC,EAAE,CAAC,CAAC;YAC5D,CAAC;QACH,CAAC;QAED,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IAsBD;;;OAGG;IACI,QAAQ;QACb,MAAM,QAAQ,GAAa,EAAE,CAAC;QAC9B,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACrB,CAAC;QACD,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACrB,CAAC;QACD,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACrB,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACrB,CAAC;QACD,OAAO,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC3B,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * This is a helper class to construct a string representing the services accessible by an AccountSAS. Setting a value\n * to true means that any SAS which uses these permissions will grant access to that service. Once all the\n * values are set, this should be serialized with toString and set as the services field on an\n * {@link AccountSASSignatureValues} object. It is possible to construct the services string without this class, but\n * the order of the services is particular and this class guarantees correctness.\n */\nexport class AccountSASServices {\n /**\n * Creates an {@link AccountSASServices} from the specified services string. This method will throw an\n * Error if it encounters a character that does not correspond to a valid service.\n *\n * @param services -\n */\n public static parse(services: string): AccountSASServices {\n const accountSASServices = new AccountSASServices();\n\n for (const c of services) {\n switch (c) {\n case \"b\":\n accountSASServices.blob = true;\n break;\n case \"f\":\n accountSASServices.file = true;\n break;\n case \"q\":\n accountSASServices.queue = true;\n break;\n case \"t\":\n accountSASServices.table = true;\n break;\n default:\n throw new RangeError(`Invalid service character: ${c}`);\n }\n }\n\n return accountSASServices;\n }\n\n /**\n * Permission to access blob resources granted.\n */\n public blob: boolean = false;\n\n /**\n * Permission to access file resources granted.\n */\n public file: boolean = false;\n\n /**\n * Permission to access queue resources granted.\n */\n public queue: boolean = false;\n\n /**\n * Permission to access table resources granted.\n */\n public table: boolean = false;\n\n /**\n * Converts the given services to a string.\n *\n */\n public toString(): string {\n const services: string[] = [];\n if (this.blob) {\n services.push(\"b\");\n }\n if (this.table) {\n services.push(\"t\");\n }\n if (this.queue) {\n services.push(\"q\");\n }\n if (this.file) {\n services.push(\"f\");\n }\n return services.join(\"\");\n }\n}\n"]}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
2
|
-
// Licensed under the MIT
|
2
|
+
// Licensed under the MIT License.
|
3
3
|
import { AccountSASPermissions } from "./AccountSASPermissions";
|
4
4
|
import { AccountSASResourceTypes } from "./AccountSASResourceTypes";
|
5
5
|
import { AccountSASServices } from "./AccountSASServices";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AccountSASSignatureValues.js","sourceRoot":"","sources":["../../../../../storage-blob/src/sas/AccountSASSignatureValues.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAc,eAAe,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAe,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAmE7D;;;;;;;;;;GAUG;AACH,MAAM,UAAU,iCAAiC,CAC/C,yBAAoD,EACpD,mBAA+C;IAE/C,OAAO,yCAAyC,CAAC,yBAAyB,EAA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AChE,yBAAyB,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE;YAC3F,yBAAyB,CAAC,QAAQ,CAAC,CAAC,CAAC,yBAAyB,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;YAC5E,OAAO;YACP,EAAE,EAAE,uDAAuD;SAC5D,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;IAED,MAAM,SAAS,GAAW,mBAAmB,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;IAE9E,OAAO;QACL,kBAAkB,EAAE,IAAI,kBAAkB,CACxC,OAAO,EACP,SAAS,EACT,iBAAiB,CAAC,QAAQ,EAAE,EAC5B,cAAc,EACd,mBAAmB,EACnB,yBAAyB,CAAC,QAAQ,EAClC,yBAAyB,CAAC,QAAQ,EAClC,yBAAyB,CAAC,SAAS,EACnC,yBAAyB,CAAC,OAAO,EACjC,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,yBAAyB,CAAC,eAAe,CAC1C;QACD,YAAY,EAAE,YAAY;KAC3B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AccountSASPermissions } from \"./AccountSASPermissions\";\nimport { AccountSASResourceTypes } from \"./AccountSASResourceTypes\";\nimport { AccountSASServices } from \"./AccountSASServices\";\nimport { StorageSharedKeyCredential } from \"../credentials/StorageSharedKeyCredential\";\nimport { SasIPRange, ipRangeToString } from \"./SasIPRange\";\nimport { SASProtocol, SASQueryParameters } from \"./SASQueryParameters\";\nimport { SERVICE_VERSION } from \"../utils/constants\";\nimport { truncatedISO8061Date } from \"../utils/utils.common\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * AccountSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage account. Once\n * all the values here are set appropriately, call {@link generateAccountSASQueryParameters} to obtain a representation\n * of the SAS which can actually be applied to blob urls. Note: that both this class and {@link SASQueryParameters}\n * exist because the former is mutable and a logical representation while the latter is immutable and used to generate\n * actual REST requests.\n *\n * @see https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1\n * for more conceptual information on SAS\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n * for descriptions of the parameters, including which are required\n */\nexport interface AccountSASSignatureValues {\n /**\n * If not provided, this defaults to the service version targeted by this version of the library.\n */\n version?: string;\n\n /**\n * Optional. SAS protocols allowed.\n */\n protocol?: SASProtocol;\n\n /**\n * Optional. When the SAS will take effect.\n */\n startsOn?: Date;\n\n /**\n * The time after which the SAS will no longer work.\n */\n expiresOn: Date;\n\n /**\n * Specifies which operations the SAS user may perform. Please refer to {@link AccountSASPermissions} for help\n * constructing the permissions string.\n */\n permissions: AccountSASPermissions;\n\n /**\n * Optional. IP range allowed.\n */\n ipRange?: SasIPRange;\n\n /**\n * The values that indicate the services accessible with this SAS. Please refer to {@link AccountSASServices} to\n * construct this value.\n */\n services: string;\n\n /**\n * The values that indicate the resource types accessible with this SAS. Please refer\n * to {@link AccountSASResourceTypes} to construct this value.\n */\n resourceTypes: string;\n\n /**\n * Optional. Encryption scope to use when sending requests authorized with this SAS URI.\n */\n encryptionScope?: string;\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Generates a {@link SASQueryParameters} object which contains all SAS query parameters needed to make an actual\n * REST request.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n *\n * @param accountSASSignatureValues -\n * @param sharedKeyCredential -\n */\nexport function generateAccountSASQueryParameters(\n accountSASSignatureValues: AccountSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential,\n): SASQueryParameters {\n return generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential)\n .sasQueryParameters;\n}\n\nexport function generateAccountSASQueryParametersInternal(\n accountSASSignatureValues: AccountSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential,\n): { sasQueryParameters: SASQueryParameters; stringToSign: string } {\n const version = accountSASSignatureValues.version\n ? accountSASSignatureValues.version\n : SERVICE_VERSION;\n\n if (\n accountSASSignatureValues.permissions &&\n accountSASSignatureValues.permissions.setImmutabilityPolicy &&\n version < \"2020-08-04\"\n ) {\n throw RangeError(\"'version' must be >= '2020-08-04' when provided 'i' permission.\");\n }\n\n if (\n accountSASSignatureValues.permissions &&\n accountSASSignatureValues.permissions.deleteVersion &&\n version < \"2019-10-10\"\n ) {\n throw RangeError(\"'version' must be >= '2019-10-10' when provided 'x' permission.\");\n }\n\n if (\n accountSASSignatureValues.permissions &&\n accountSASSignatureValues.permissions.permanentDelete &&\n version < \"2019-10-10\"\n ) {\n throw RangeError(\"'version' must be >= '2019-10-10' when provided 'y' permission.\");\n }\n\n if (\n accountSASSignatureValues.permissions &&\n accountSASSignatureValues.permissions.tag &&\n version < \"2019-12-12\"\n ) {\n throw RangeError(\"'version' must be >= '2019-12-12' when provided 't' permission.\");\n }\n\n if (\n accountSASSignatureValues.permissions &&\n accountSASSignatureValues.permissions.filter &&\n version < \"2019-12-12\"\n ) {\n throw RangeError(\"'version' must be >= '2019-12-12' when provided 'f' permission.\");\n }\n\n if (accountSASSignatureValues.encryptionScope && version < \"2020-12-06\") {\n throw RangeError(\"'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.\");\n }\n\n const parsedPermissions = AccountSASPermissions.parse(\n accountSASSignatureValues.permissions.toString(),\n );\n const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString();\n const parsedResourceTypes = AccountSASResourceTypes.parse(\n accountSASSignatureValues.resourceTypes,\n ).toString();\n\n let stringToSign: string;\n\n if (version >= \"2020-12-06\") {\n stringToSign = [\n sharedKeyCredential.accountName,\n parsedPermissions,\n parsedServices,\n parsedResourceTypes,\n accountSASSignatureValues.startsOn\n ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)\n : \"\",\n truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),\n accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : \"\",\n accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : \"\",\n version,\n accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : \"\",\n \"\", // Account SAS requires an additional newline character\n ].join(\"\\n\");\n } else {\n stringToSign = [\n sharedKeyCredential.accountName,\n parsedPermissions,\n parsedServices,\n parsedResourceTypes,\n accountSASSignatureValues.startsOn\n ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)\n : \"\",\n truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),\n accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : \"\",\n accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : \"\",\n version,\n \"\", // Account SAS requires an additional newline character\n ].join(\"\\n\");\n }\n\n const signature: string = sharedKeyCredential.computeHMACSHA256(stringToSign);\n\n return {\n sasQueryParameters: new SASQueryParameters(\n version,\n signature,\n parsedPermissions.toString(),\n parsedServices,\n parsedResourceTypes,\n accountSASSignatureValues.protocol,\n accountSASSignatureValues.startsOn,\n accountSASSignatureValues.expiresOn,\n accountSASSignatureValues.ipRange,\n undefined,\n undefined,\n undefined,\n undefined,\n undefined,\n undefined,\n undefined,\n undefined,\n undefined,\n undefined,\n accountSASSignatureValues.encryptionScope,\n ),\n stringToSign: stringToSign,\n };\n}\n"]}
|
1
|
+
{"version":3,"file":"AccountSASSignatureValues.js","sourceRoot":"","sources":["../../../../../storage-blob/src/sas/AccountSASSignatureValues.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,k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AC1F,EAAE,EAAE,uDAAuD;SAC5D,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;SAAM,CAAC;QACN,YAAY,GAAG;YACb,mBAAmB,CAAC,WAAW;YAC/B,iBAAiB;YACjB,cAAc;YACd,mBAAmB;YACnB,yBAAyB,CAAC,QAAQ;gBAChC,CAAC,CAAC,oBAAoB,CAAC,yBAAyB,CAAC,QAAQ,EAAE,KAAK,CAAC;gBACjE,CAAC,CAAC,EAAE;YACN,oBAAoB,CAAC,yBAAyB,CAAC,SAAS,EAAE,KAAK,CAAC;YAChE,yBAAyB,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE;YAC3F,yBAAyB,CAAC,QAAQ,CAAC,CAAC,CAAC,yBAAyB,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;YAC5E,OAAO;YACP,EAAE,EAAE,uDAAuD;SAC5D,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;IAED,MAAM,SAAS,GAAW,mBAAmB,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;IAE9E,OAAO;QACL,kBAAkB,EAAE,IAAI,kBAAkB,CACxC,OAAO,EACP,SAAS,EACT,iBAAiB,CAAC,QAAQ,EAAE,EAC5B,cAAc,EACd,mBAAmB,EACnB,yBAAyB,CAAC,QAAQ,EAClC,yBAAyB,CAAC,QAAQ,EAClC,yBAAyB,CAAC,SAAS,EACnC,yBAAyB,CAAC,OAAO,EACjC,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,yBAAyB,CAAC,eAAe,CAC1C;QACD,YAAY,EAAE,YAAY;KAC3B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AccountSASPermissions } from \"./AccountSASPermissions\";\nimport { AccountSASResourceTypes } from \"./AccountSASResourceTypes\";\nimport { AccountSASServices } from \"./AccountSASServices\";\nimport { StorageSharedKeyCredential } from \"../credentials/StorageSharedKeyCredential\";\nimport { SasIPRange, ipRangeToString } from \"./SasIPRange\";\nimport { SASProtocol, SASQueryParameters } from \"./SASQueryParameters\";\nimport { SERVICE_VERSION } from \"../utils/constants\";\nimport { truncatedISO8061Date } from \"../utils/utils.common\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * AccountSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage account. Once\n * all the values here are set appropriately, call {@link generateAccountSASQueryParameters} to obtain a representation\n * of the SAS which can actually be applied to blob urls. Note: that both this class and {@link SASQueryParameters}\n * exist because the former is mutable and a logical representation while the latter is immutable and used to generate\n * actual REST requests.\n *\n * @see https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1\n * for more conceptual information on SAS\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n * for descriptions of the parameters, including which are required\n */\nexport interface AccountSASSignatureValues {\n /**\n * If not provided, this defaults to the service version targeted by this version of the library.\n */\n version?: string;\n\n /**\n * Optional. SAS protocols allowed.\n */\n protocol?: SASProtocol;\n\n /**\n * Optional. When the SAS will take effect.\n */\n startsOn?: Date;\n\n /**\n * The time after which the SAS will no longer work.\n */\n expiresOn: Date;\n\n /**\n * Specifies which operations the SAS user may perform. Please refer to {@link AccountSASPermissions} for help\n * constructing the permissions string.\n */\n permissions: AccountSASPermissions;\n\n /**\n * Optional. IP range allowed.\n */\n ipRange?: SasIPRange;\n\n /**\n * The values that indicate the services accessible with this SAS. Please refer to {@link AccountSASServices} to\n * construct this value.\n */\n services: string;\n\n /**\n * The values that indicate the resource types accessible with this SAS. Please refer\n * to {@link AccountSASResourceTypes} to construct this value.\n */\n resourceTypes: string;\n\n /**\n * Optional. Encryption scope to use when sending requests authorized with this SAS URI.\n */\n encryptionScope?: string;\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Generates a {@link SASQueryParameters} object which contains all SAS query parameters needed to make an actual\n * REST request.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n *\n * @param accountSASSignatureValues -\n * @param sharedKeyCredential -\n */\nexport function generateAccountSASQueryParameters(\n accountSASSignatureValues: AccountSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential,\n): SASQueryParameters {\n return generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential)\n .sasQueryParameters;\n}\n\nexport function generateAccountSASQueryParametersInternal(\n accountSASSignatureValues: AccountSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential,\n): { sasQueryParameters: SASQueryParameters; stringToSign: string } {\n const version = accountSASSignatureValues.version\n ? accountSASSignatureValues.version\n : SERVICE_VERSION;\n\n if (\n accountSASSignatureValues.permissions &&\n accountSASSignatureValues.permissions.setImmutabilityPolicy &&\n version < \"2020-08-04\"\n ) {\n throw RangeError(\"'version' must be >= '2020-08-04' when provided 'i' permission.\");\n }\n\n if (\n accountSASSignatureValues.permissions &&\n accountSASSignatureValues.permissions.deleteVersion &&\n version < \"2019-10-10\"\n ) {\n throw RangeError(\"'version' must be >= '2019-10-10' when provided 'x' permission.\");\n }\n\n if (\n accountSASSignatureValues.permissions &&\n accountSASSignatureValues.permissions.permanentDelete &&\n version < \"2019-10-10\"\n ) {\n throw RangeError(\"'version' must be >= '2019-10-10' when provided 'y' permission.\");\n }\n\n if (\n accountSASSignatureValues.permissions &&\n accountSASSignatureValues.permissions.tag &&\n version < \"2019-12-12\"\n ) {\n throw RangeError(\"'version' must be >= '2019-12-12' when provided 't' permission.\");\n }\n\n if (\n accountSASSignatureValues.permissions &&\n accountSASSignatureValues.permissions.filter &&\n version < \"2019-12-12\"\n ) {\n throw RangeError(\"'version' must be >= '2019-12-12' when provided 'f' permission.\");\n }\n\n if (accountSASSignatureValues.encryptionScope && version < \"2020-12-06\") {\n throw RangeError(\"'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.\");\n }\n\n const parsedPermissions = AccountSASPermissions.parse(\n accountSASSignatureValues.permissions.toString(),\n );\n const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString();\n const parsedResourceTypes = AccountSASResourceTypes.parse(\n accountSASSignatureValues.resourceTypes,\n ).toString();\n\n let stringToSign: string;\n\n if (version >= \"2020-12-06\") {\n stringToSign = [\n sharedKeyCredential.accountName,\n parsedPermissions,\n parsedServices,\n parsedResourceTypes,\n accountSASSignatureValues.startsOn\n ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)\n : \"\",\n truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),\n accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : \"\",\n accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : \"\",\n version,\n accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : \"\",\n \"\", // Account SAS requires an additional newline character\n ].join(\"\\n\");\n } else {\n stringToSign = [\n sharedKeyCredential.accountName,\n parsedPermissions,\n parsedServices,\n parsedResourceTypes,\n accountSASSignatureValues.startsOn\n ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)\n : \"\",\n truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),\n accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : \"\",\n accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : \"\",\n version,\n \"\", // Account SAS requires an additional newline character\n ].join(\"\\n\");\n }\n\n const signature: string = sharedKeyCredential.computeHMACSHA256(stringToSign);\n\n return {\n sasQueryParameters: new SASQueryParameters(\n version,\n signature,\n parsedPermissions.toString(),\n parsedServices,\n parsedResourceTypes,\n accountSASSignatureValues.protocol,\n accountSASSignatureValues.startsOn,\n accountSASSignatureValues.expiresOn,\n accountSASSignatureValues.ipRange,\n undefined,\n undefined,\n undefined,\n undefined,\n undefined,\n undefined,\n undefined,\n undefined,\n undefined,\n undefined,\n accountSASSignatureValues.encryptionScope,\n ),\n stringToSign: stringToSign,\n };\n}\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"BlobSASPermissions.js","sourceRoot":"","sources":["../../../../../storage-blob/src/sas/BlobSASPermissions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;GAQG;AACH,MAAM,OAAO,kBAAkB;IAA/B;QAiGE;;WAEG;QACI,SAAI,GAAY,KAAK,CAAC;QAE7B;;WAEG;QACI,QAAG,GAAY,KAAK,CAAC;QAE5B;;WAEG;QACI,WAAM,GAAY,KAAK,CAAC;QAE/B;;WAEG;QACI,UAAK,GAAY,KAAK,CAAC;QAE9B;;WAEG;QACI,WAAM,GAAY,KAAK,CAAC;QAE/B;;WAEG;QACI,kBAAa,GAAY,KAAK,CAAC;QAEtC;;WAEG;QACI,QAAG,GAAY,KAAK,CAAC;QAE5B;;WAEG;QACI,SAAI,GAAY,KAAK,CAAC;QAE7B;;WAEG;QACI,YAAO,GAAY,KAAK,CAAC;QAEhC;;WAEG;QACI,0BAAqB,GAAY,KAAK,CAAC;QAE9C;;WAEG;QACI,oBAAe,GAAY,KAAK,CAAC;IA6C1C,CAAC;IAlMC;;;;;OAKG;IACI,MAAM,CAAC,KAAK,CAAC,WAAmB;QACrC,MAAM,kBAAkB,GAAG,IAAI,kBAAkB,EAAE,CAAC;QAEpD,KAAK,MAAM,IAAI,IAAI,WAAW,EAAE,CAAC;YAC/B,QAAQ,IAAI,EAAE,CAAC;gBACb,KAAK,GAAG;oBACN,kBAAkB,CAAC,IAAI,GAAG,IAAI,CAAC;oBAC/B,MAAM;gBACR,KAAK,GAAG;oBACN,kBAAkB,CAAC,GAAG,GAAG,IAAI,CAAC;oBAC9B,MAAM;gBACR,KAAK,GAAG;oBACN,kBAAkB,CAAC,MAAM,GAAG,IAAI,CAAC;oBACjC,MAAM;gBACR,KAAK,GA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AChB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YACvB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;YACb,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,qBAAqB,EAAE,CAAC;YAC/B,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;YACzB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,OAAO,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9B,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a blob. Setting\n * a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all\n * the values are set, this should be serialized with toString and set as the permissions field on a\n * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but\n * the order of the permissions is particular and this class guarantees correctness.\n */\nexport class BlobSASPermissions {\n /**\n * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an\n * Error if it encounters a character that does not correspond to a valid permission.\n *\n * @param permissions -\n */\n public static parse(permissions: string): BlobSASPermissions {\n const blobSASPermissions = new BlobSASPermissions();\n\n for (const char of permissions) {\n switch (char) {\n case \"r\":\n blobSASPermissions.read = true;\n break;\n case \"a\":\n blobSASPermissions.add = true;\n break;\n case \"c\":\n blobSASPermissions.create = true;\n break;\n case \"w\":\n blobSASPermissions.write = true;\n break;\n case \"d\":\n blobSASPermissions.delete = true;\n break;\n case \"x\":\n blobSASPermissions.deleteVersion = true;\n break;\n case \"t\":\n blobSASPermissions.tag = true;\n break;\n case \"m\":\n blobSASPermissions.move = true;\n break;\n case \"e\":\n blobSASPermissions.execute = true;\n break;\n case \"i\":\n blobSASPermissions.setImmutabilityPolicy = true;\n break;\n case \"y\":\n blobSASPermissions.permanentDelete = true;\n break;\n default:\n throw new RangeError(`Invalid permission: ${char}`);\n }\n }\n\n return blobSASPermissions;\n }\n\n /**\n * Creates a {@link BlobSASPermissions} from a raw object which contains same keys as it\n * and boolean values for them.\n *\n * @param permissionLike -\n */\n public static from(permissionLike: BlobSASPermissionsLike): BlobSASPermissions {\n const blobSASPermissions = new BlobSASPermissions();\n if (permissionLike.read) {\n blobSASPermissions.read = true;\n }\n if (permissionLike.add) {\n blobSASPermissions.add = true;\n }\n if (permissionLike.create) {\n blobSASPermissions.create = true;\n }\n if (permissionLike.write) {\n blobSASPermissions.write = true;\n }\n if (permissionLike.delete) {\n blobSASPermissions.delete = true;\n }\n if (permissionLike.deleteVersion) {\n blobSASPermissions.deleteVersion = true;\n }\n if (permissionLike.tag) {\n blobSASPermissions.tag = true;\n }\n if (permissionLike.move) {\n blobSASPermissions.move = true;\n }\n if (permissionLike.execute) {\n blobSASPermissions.execute = true;\n }\n if (permissionLike.setImmutabilityPolicy) {\n blobSASPermissions.setImmutabilityPolicy = true;\n }\n if (permissionLike.permanentDelete) {\n blobSASPermissions.permanentDelete = true;\n }\n return blobSASPermissions;\n }\n\n /**\n * Specifies Read access granted.\n */\n public read: boolean = false;\n\n /**\n * Specifies Add access granted.\n */\n public add: boolean = false;\n\n /**\n * Specifies Create access granted.\n */\n public create: boolean = false;\n\n /**\n * Specifies Write access granted.\n */\n public write: boolean = false;\n\n /**\n * Specifies Delete access granted.\n */\n public delete: boolean = false;\n\n /**\n * Specifies Delete version access granted.\n */\n public deleteVersion: boolean = false;\n\n /**\n * Specfies Tag access granted.\n */\n public tag: boolean = false;\n\n /**\n * Specifies Move access granted.\n */\n public move: boolean = false;\n\n /**\n * Specifies Execute access granted.\n */\n public execute: boolean = false;\n\n /**\n * Specifies SetImmutabilityPolicy access granted.\n */\n public setImmutabilityPolicy: boolean = false;\n\n /**\n * Specifies that Permanent Delete is permitted.\n */\n public permanentDelete: boolean = false;\n\n /**\n * Converts the given permissions to a string. Using this method will guarantee the permissions are in an\n * order accepted by the service.\n *\n * @returns A string which represents the BlobSASPermissions\n */\n public toString(): string {\n const permissions: string[] = [];\n if (this.read) {\n permissions.push(\"r\");\n }\n if (this.add) {\n permissions.push(\"a\");\n }\n if (this.create) {\n permissions.push(\"c\");\n }\n if (this.write) {\n permissions.push(\"w\");\n }\n if (this.delete) {\n permissions.push(\"d\");\n }\n if (this.deleteVersion) {\n permissions.push(\"x\");\n }\n if (this.tag) {\n permissions.push(\"t\");\n }\n if (this.move) {\n permissions.push(\"m\");\n }\n if (this.execute) {\n permissions.push(\"e\");\n }\n if (this.setImmutabilityPolicy) {\n permissions.push(\"i\");\n }\n if (this.permanentDelete) {\n permissions.push(\"y\");\n }\n return permissions.join(\"\");\n }\n}\n\n/**\n * A type that looks like a Blob SAS permission.\n * Used in {@link BlobSASPermissions} to parse SAS permissions from raw objects.\n */\nexport interface BlobSASPermissionsLike {\n /**\n * Specifies Read access granted.\n */\n read?: boolean;\n\n /**\n * Specifies Add access granted.\n */\n add?: boolean;\n\n /**\n * Specifies Create access granted.\n */\n create?: boolean;\n\n /**\n * Specifies Write access granted.\n */\n write?: boolean;\n\n /**\n * Specifies Delete access granted.\n */\n delete?: boolean;\n\n /**\n * Specifies Delete version access granted.\n */\n deleteVersion?: boolean;\n\n /**\n * Specfies Tag access granted.\n */\n tag?: boolean;\n\n /**\n * Specifies Move access granted.\n */\n move?: boolean;\n\n /**\n * Specifies Execute access granted.\n */\n execute?: boolean;\n\n /**\n * Specifies SetImmutabilityPolicy access granted.\n */\n setImmutabilityPolicy?: boolean;\n\n /**\n * Specifies that Permanent Delete is permitted.\n */\n permanentDelete?: boolean;\n}\n"]}
|
1
|
+
{"version":3,"file":"BlobSASPermissions.js","sourceRoot":"","sources":["../../../../../storage-blob/src/sas/BlobSASPermissions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;GAQG;AACH,MAAM,OAAO,kBAAkB;IAA/B;QAiGE;;WAEG;QACI,SAAI,GAAY,KAAK,CAAC;QAE7B;;WAEG;QACI,QAAG,GAAY,KAAK,CAAC;QAE5B;;WAEG;QACI,WAAM,GAAY,KAAK,CAAC;QAE/B;;WAEG;QACI,UAAK,GAAY,KAAK,CAAC;QAE9B;;WAEG;QACI,WAAM,GAAY,KAAK,CAAC;QAE/B;;WAEG;QACI,kBAAa,GAAY,KAAK,CAAC;QAEtC;;WAEG;QACI,QAAG,GAAY,KAAK,CAAC;QAE5B;;WAEG;QACI,SAAI,GAAY,KAAK,CAAC;QAE7B;;WAEG;QACI,YAAO,GAAY,KAAK,CAAC;QAEhC;;WAEG;QACI,0BAAqB,GAAY,KAAK,CAAC;QAE9C;;WAEG;QACI,oBAAe,GAAY,KAAK,CAAC;IA6C1C,CAAC;IAlMC;;;;;OAKG;IACI,MAAM,CAAC,KAAK,CAAC,WAAmB;QACrC,MAAM,kBAAkB,GAAG,IAAI,kBAAkB,EAAE,CAAC;QAEpD,KAAK,MAAM,IAAI,IAAI,WAAW,EAAE,CAAC;YAC/B,QAAQ,IAAI,EAAE,CAAC;gBACb,KAAK,GAAG;oBACN,kBAAkB,CAAC,IAAI,GAAG,IAAI,CAAC;oBAC/B,MAAM;gBACR,KAAK,GAAG;oBACN,kBAAkB,CAAC,GAAG,GAAG,IAAI,CAAC;oBAC9B,MAAM;gBACR,KAAK,GAAG;oBACN,kBAAkB,CAAC,MAAM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AAC;QACD,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YACvB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;YACb,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,qBAAqB,EAAE,CAAC;YAC/B,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;YACzB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,OAAO,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9B,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a blob. Setting\n * a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all\n * the values are set, this should be serialized with toString and set as the permissions field on a\n * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but\n * the order of the permissions is particular and this class guarantees correctness.\n */\nexport class BlobSASPermissions {\n /**\n * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an\n * Error if it encounters a character that does not correspond to a valid permission.\n *\n * @param permissions -\n */\n public static parse(permissions: string): BlobSASPermissions {\n const blobSASPermissions = new BlobSASPermissions();\n\n for (const char of permissions) {\n switch (char) {\n case \"r\":\n blobSASPermissions.read = true;\n break;\n case \"a\":\n blobSASPermissions.add = true;\n break;\n case \"c\":\n blobSASPermissions.create = true;\n break;\n case \"w\":\n blobSASPermissions.write = true;\n break;\n case \"d\":\n blobSASPermissions.delete = true;\n break;\n case \"x\":\n blobSASPermissions.deleteVersion = true;\n break;\n case \"t\":\n blobSASPermissions.tag = true;\n break;\n case \"m\":\n blobSASPermissions.move = true;\n break;\n case \"e\":\n blobSASPermissions.execute = true;\n break;\n case \"i\":\n blobSASPermissions.setImmutabilityPolicy = true;\n break;\n case \"y\":\n blobSASPermissions.permanentDelete = true;\n break;\n default:\n throw new RangeError(`Invalid permission: ${char}`);\n }\n }\n\n return blobSASPermissions;\n }\n\n /**\n * Creates a {@link BlobSASPermissions} from a raw object which contains same keys as it\n * and boolean values for them.\n *\n * @param permissionLike -\n */\n public static from(permissionLike: BlobSASPermissionsLike): BlobSASPermissions {\n const blobSASPermissions = new BlobSASPermissions();\n if (permissionLike.read) {\n blobSASPermissions.read = true;\n }\n if (permissionLike.add) {\n blobSASPermissions.add = true;\n }\n if (permissionLike.create) {\n blobSASPermissions.create = true;\n }\n if (permissionLike.write) {\n blobSASPermissions.write = true;\n }\n if (permissionLike.delete) {\n blobSASPermissions.delete = true;\n }\n if (permissionLike.deleteVersion) {\n blobSASPermissions.deleteVersion = true;\n }\n if (permissionLike.tag) {\n blobSASPermissions.tag = true;\n }\n if (permissionLike.move) {\n blobSASPermissions.move = true;\n }\n if (permissionLike.execute) {\n blobSASPermissions.execute = true;\n }\n if (permissionLike.setImmutabilityPolicy) {\n blobSASPermissions.setImmutabilityPolicy = true;\n }\n if (permissionLike.permanentDelete) {\n blobSASPermissions.permanentDelete = true;\n }\n return blobSASPermissions;\n }\n\n /**\n * Specifies Read access granted.\n */\n public read: boolean = false;\n\n /**\n * Specifies Add access granted.\n */\n public add: boolean = false;\n\n /**\n * Specifies Create access granted.\n */\n public create: boolean = false;\n\n /**\n * Specifies Write access granted.\n */\n public write: boolean = false;\n\n /**\n * Specifies Delete access granted.\n */\n public delete: boolean = false;\n\n /**\n * Specifies Delete version access granted.\n */\n public deleteVersion: boolean = false;\n\n /**\n * Specfies Tag access granted.\n */\n public tag: boolean = false;\n\n /**\n * Specifies Move access granted.\n */\n public move: boolean = false;\n\n /**\n * Specifies Execute access granted.\n */\n public execute: boolean = false;\n\n /**\n * Specifies SetImmutabilityPolicy access granted.\n */\n public setImmutabilityPolicy: boolean = false;\n\n /**\n * Specifies that Permanent Delete is permitted.\n */\n public permanentDelete: boolean = false;\n\n /**\n * Converts the given permissions to a string. Using this method will guarantee the permissions are in an\n * order accepted by the service.\n *\n * @returns A string which represents the BlobSASPermissions\n */\n public toString(): string {\n const permissions: string[] = [];\n if (this.read) {\n permissions.push(\"r\");\n }\n if (this.add) {\n permissions.push(\"a\");\n }\n if (this.create) {\n permissions.push(\"c\");\n }\n if (this.write) {\n permissions.push(\"w\");\n }\n if (this.delete) {\n permissions.push(\"d\");\n }\n if (this.deleteVersion) {\n permissions.push(\"x\");\n }\n if (this.tag) {\n permissions.push(\"t\");\n }\n if (this.move) {\n permissions.push(\"m\");\n }\n if (this.execute) {\n permissions.push(\"e\");\n }\n if (this.setImmutabilityPolicy) {\n permissions.push(\"i\");\n }\n if (this.permanentDelete) {\n permissions.push(\"y\");\n }\n return permissions.join(\"\");\n }\n}\n\n/**\n * A type that looks like a Blob SAS permission.\n * Used in {@link BlobSASPermissions} to parse SAS permissions from raw objects.\n */\nexport interface BlobSASPermissionsLike {\n /**\n * Specifies Read access granted.\n */\n read?: boolean;\n\n /**\n * Specifies Add access granted.\n */\n add?: boolean;\n\n /**\n * Specifies Create access granted.\n */\n create?: boolean;\n\n /**\n * Specifies Write access granted.\n */\n write?: boolean;\n\n /**\n * Specifies Delete access granted.\n */\n delete?: boolean;\n\n /**\n * Specifies Delete version access granted.\n */\n deleteVersion?: boolean;\n\n /**\n * Specfies Tag access granted.\n */\n tag?: boolean;\n\n /**\n * Specifies Move access granted.\n */\n move?: boolean;\n\n /**\n * Specifies Execute access granted.\n */\n execute?: boolean;\n\n /**\n * Specifies SetImmutabilityPolicy access granted.\n */\n setImmutabilityPolicy?: boolean;\n\n /**\n * Specifies that Permanent Delete is permitted.\n */\n permanentDelete?: boolean;\n}\n"]}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
2
|
-
// Licensed under the MIT
|
2
|
+
// Licensed under the MIT License.
|
3
3
|
import { BlobSASPermissions } from "./BlobSASPermissions";
|
4
4
|
import { ContainerSASPermissions } from "./ContainerSASPermissions";
|
5
5
|
import { StorageSharedKeyCredential } from "../credentials/StorageSharedKeyCredential";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"BlobSASSignatureValues.js","sourceRoot":"","sources":["../../../../../storage-blob/src/sas/BlobSASSignatureValues.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AACvF,OAAO,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AACzF,OAAO,EAAE,eAAe,EAAc,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAe,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AA4O7D,MAAM,UAAU,8BAA8B,CAC5C,sBAA8C,EAC9C,sCAAsF,EACtF,WAAoB;IAEpB,OAAO,sCAAsC,CAC3C,sBAAsB,EACtB,sCAAsC,EACtC,WAAW,CACZ,CAAC,kBAAkB,CAAC;AACvB,CAAC;AAED,MAAM,UAAU,sCAAsC,CAC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IACE,sBAAsB,CAAC,WAAW;QAClC,sBAAsB,CAAC,WAAW,CAAC,GAAG;QACtC,OAAO,GAAG,YAAY,EACtB,CAAC;QACD,MAAM,UAAU,CAAC,kEAAkE,CAAC,CAAC;IACvF,CAAC;IAED,IACE,OAAO,GAAG,YAAY;QACtB,sBAAsB,CAAC,WAAW;QAClC,CAAC,sBAAsB,CAAC,WAAW,CAAC,IAAI,IAAI,sBAAsB,CAAC,WAAW,CAAC,OAAO,CAAC,EACvF,CAAC;QACD,MAAM,UAAU,CAAC,6EAA6E,CAAC,CAAC;IAClG,CAAC;IAED,IACE,OAAO,GAAG,YAAY;QACtB,sBAAsB,CAAC,WAAW;QACjC,sBAAsB,CAAC,WAAuC,CAAC,YAAY,EAC5E,CAAC;QACD,MAAM,UAAU,CAAC,sEAAsE,CAAC,CAAC;IAC3F,CAAC;IAED,IACE,OAAO,GAAG,YAAY;QACtB,CAAC,sBAAsB,CAAC,0BAA0B,IAAI,sBAAsB,CAAC,aAAa,CAAC,EAC3F,CAAC;QACD,MAAM,UAAU,CACd,mGAAmG,CACpG,CAAC;IACJ,CAAC;IAED,IAAI,sBAAsB,CAAC,eAAe,IAAI,OAAO,GAAG,YAAY,EAAE,CAAC;QACrE,MAAM,UAAU,CAAC,2EAA2E,CAAC,CAAC;IAChG,CAAC;IAED,sBAAsB,CAAC,OAAO,GAAG,OAAO,CAAC;IACzC,OAAO,sBAAsB,CAAC;AAChC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { BlobSASPermissions } from \"./BlobSASPermissions\";\nimport { UserDelegationKey } from \"../BlobServiceClient\";\nimport { ContainerSASPermissions } from \"./ContainerSASPermissions\";\nimport { StorageSharedKeyCredential } from \"../credentials/StorageSharedKeyCredential\";\nimport { UserDelegationKeyCredential } from \"../credentials/UserDelegationKeyCredential\";\nimport { ipRangeToString, SasIPRange } from \"./SasIPRange\";\nimport { SASProtocol, SASQueryParameters } from \"./SASQueryParameters\";\nimport { SERVICE_VERSION } from \"../utils/constants\";\nimport { truncatedISO8061Date } from \"../utils/utils.common\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * BlobSASSignatureValues is used to help generating Blob service SAS tokens for containers or blobs.\n */\nexport interface BlobSASSignatureValues {\n /**\n * The version of the service this SAS will target. If not specified, it will default to the version targeted by the\n * library.\n */\n version?: string;\n\n /**\n * Optional. SAS protocols, HTTPS only or HTTPSandHTTP\n */\n protocol?: SASProtocol;\n\n /**\n * Optional. When the SAS will take effect.\n */\n startsOn?: Date;\n\n /**\n * Optional only when identifier is provided. The time after which the SAS will no longer work.\n */\n expiresOn?: Date;\n\n /**\n * Optional only when identifier is provided.\n * Please refer to either {@link ContainerSASPermissions} or {@link BlobSASPermissions} depending on the resource\n * being accessed for help constructing the permissions string.\n */\n permissions?: BlobSASPermissions | ContainerSASPermissions;\n\n /**\n * Optional. IP ranges allowed in this SAS.\n */\n ipRange?: SasIPRange;\n\n /**\n * The name of the container the SAS user may access.\n */\n containerName: string;\n\n /**\n * Optional. The blob name of the SAS user may access. Required if snapshotTime or versionId is provided.\n */\n blobName?: string;\n\n /**\n * Optional. Snapshot timestamp string the SAS user may access. Only supported from API version 2018-11-09.\n */\n snapshotTime?: string;\n\n /**\n * Optional. VersionId of the blob version the SAS user may access. Only supported from API version 2019-10-10.\n */\n versionId?: string;\n\n /**\n * Optional. The name of the access policy on the container this SAS references if any.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy\n */\n identifier?: string;\n\n /**\n * Optional. Encryption scope to use when sending requests authorized with this SAS URI.\n */\n encryptionScope?: string;\n\n /**\n * Optional. The cache-control header for the SAS.\n */\n cacheControl?: string;\n\n /**\n * Optional. The content-disposition header for the SAS.\n */\n contentDisposition?: string;\n\n /**\n * Optional. The content-encoding header for the SAS.\n */\n contentEncoding?: string;\n\n /**\n * Optional. The content-language header for the SAS.\n */\n contentLanguage?: string;\n\n /**\n * Optional. The content-type header for the SAS.\n */\n contentType?: string;\n\n /**\n * Optional. Beginning in version 2020-02-10, specifies the Authorized AAD Object ID in GUID format. The AAD Object ID of a user\n * authorized by the owner of the user delegation key to perform the action granted by the SAS. The Azure Storage service will\n * ensure that the owner of the user delegation key has the required permissions before granting access but no additional permission\n * check for the user specified in this value will be performed. This is only used for User Delegation SAS.\n */\n preauthorizedAgentObjectId?: string;\n\n /**\n * Optional. Beginning in version 2020-02-10, this is a GUID value that will be logged in the storage diagnostic logs and can be used to\n * correlate SAS generation with storage resource access. This is only used for User Delegation SAS.\n */\n correlationId?: string;\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn and identifier.\n *\n * WARNING: When identifier is not provided, permissions and expiresOn are required.\n * You MUST assign value to identifier or expiresOn & permissions manually if you initial with\n * this constructor.\n *\n * Fill in the required details before running the following snippets.\n *\n * Example usage:\n *\n * ```js\n * // Generate service level SAS for a container\n * const containerSAS = generateBlobSASQueryParameters({\n * containerName, // Required\n * permissions: ContainerSASPermissions.parse(\"racwdl\"), // Required\n * startsOn: new Date(), // Optional\n * expiresOn: new Date(new Date().valueOf() + 86400 * 1000), // Required. Date type\n * ipRange: { start: \"0.0.0.0\", end: \"255.255.255.255\" }, // Optional\n * protocol: SASProtocol.HttpsAndHttp, // Optional\n * version: \"2016-05-31\" // Optional\n * },\n * sharedKeyCredential // StorageSharedKeyCredential - `new StorageSharedKeyCredential(account, accountKey)`\n * ).toString();\n * ```\n *\n * Example using an identifier:\n *\n * ```js\n * // Generate service level SAS for a container with identifier\n * // startsOn & permissions are optional when identifier is provided\n * const identifier = \"unique-id\";\n * await containerClient.setAccessPolicy(undefined, [\n * {\n * accessPolicy: {\n * expiresOn: new Date(new Date().valueOf() + 86400 * 1000), // Date type\n * permissions: ContainerSASPermissions.parse(\"racwdl\").toString(),\n * startsOn: new Date() // Date type\n * },\n * id: identifier\n * }\n * ]);\n *\n * const containerSAS = generateBlobSASQueryParameters(\n * {\n * containerName, // Required\n * identifier // Required\n * },\n * sharedKeyCredential // StorageSharedKeyCredential - `new StorageSharedKeyCredential(account, accountKey)`\n * ).toString();\n * ```\n *\n * Example using a blob name:\n *\n * ```js\n * // Generate service level SAS for a blob\n * const blobSAS = generateBlobSASQueryParameters({\n * containerName, // Required\n * blobName, // Required\n * permissions: BlobSASPermissions.parse(\"racwd\"), // Required\n * startsOn: new Date(), // Optional\n * expiresOn: new Date(new Date().valueOf() + 86400 * 1000), // Required. Date type\n * cacheControl: \"cache-control-override\", // Optional\n * contentDisposition: \"content-disposition-override\", // Optional\n * contentEncoding: \"content-encoding-override\", // Optional\n * contentLanguage: \"content-language-override\", // Optional\n * contentType: \"content-type-override\", // Optional\n * ipRange: { start: \"0.0.0.0\", end: \"255.255.255.255\" }, // Optional\n * protocol: SASProtocol.HttpsAndHttp, // Optional\n * version: \"2016-05-31\" // Optional\n * },\n * sharedKeyCredential // StorageSharedKeyCredential - `new StorageSharedKeyCredential(account, accountKey)`\n * ).toString();\n * ```\n *\n * @param blobSASSignatureValues -\n * @param sharedKeyCredential -\n */\nexport function generateBlobSASQueryParameters(\n blobSASSignatureValues: BlobSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential,\n): SASQueryParameters;\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Creates an instance of SASQueryParameters.\n * WARNING: identifier will be ignored when generating user delegation SAS, permissions and expiresOn are required.\n *\n * Example usage:\n *\n * ```js\n * // Generate user delegation SAS for a container\n * const userDelegationKey = await blobServiceClient.getUserDelegationKey(startsOn, expiresOn);\n * const containerSAS = generateBlobSASQueryParameters({\n * containerName, // Required\n * permissions: ContainerSASPermissions.parse(\"racwdl\"), // Required\n * startsOn, // Optional. Date type\n * expiresOn, // Required. Date type\n * ipRange: { start: \"0.0.0.0\", end: \"255.255.255.255\" }, // Optional\n * protocol: SASProtocol.HttpsAndHttp, // Optional\n * version: \"2018-11-09\" // Must greater than or equal to 2018-11-09 to generate user delegation SAS\n * },\n * userDelegationKey, // UserDelegationKey\n * accountName\n * ).toString();\n * ```\n *\n * @param blobSASSignatureValues -\n * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`\n * @param accountName -\n */\nexport function generateBlobSASQueryParameters(\n blobSASSignatureValues: BlobSASSignatureValues,\n userDelegationKey: UserDelegationKey,\n accountName: string,\n): SASQueryParameters;\n\nexport function generateBlobSASQueryParameters(\n blobSASSignatureValues: BlobSASSignatureValues,\n sharedKeyCredentialOrUserDelegationKey: StorageSharedKeyCredential | UserDelegationKey,\n accountName?: string,\n): SASQueryParameters {\n return generateBlobSASQueryParametersInternal(\n blobSASSignatureValues,\n sharedKeyCredentialOrUserDelegationKey,\n accountName,\n ).sasQueryParameters;\n}\n\nexport function generateBlobSASQueryParametersInternal(\n blobSASSignatureValues: BlobSASSignatureValues,\n sharedKeyCredentialOrUserDelegationKey: StorageSharedKeyCredential | UserDelegationKey,\n accountName?: string,\n): { sasQueryParameters: SASQueryParameters; stringToSign: string } {\n const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION;\n\n const sharedKeyCredential =\n sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential\n ? sharedKeyCredentialOrUserDelegationKey\n : undefined;\n let userDelegationKeyCredential: UserDelegationKeyCredential | undefined;\n\n if (sharedKeyCredential === undefined && accountName !== undefined) {\n userDelegationKeyCredential = new UserDelegationKeyCredential(\n accountName,\n sharedKeyCredentialOrUserDelegationKey as UserDelegationKey,\n );\n }\n\n if (sharedKeyCredential === undefined && userDelegationKeyCredential === undefined) {\n throw TypeError(\"Invalid sharedKeyCredential, userDelegationKey or accountName.\");\n }\n\n // Version 2020-12-06 adds support for encryptionscope in SAS.\n if (version >= \"2020-12-06\") {\n if (sharedKeyCredential !== undefined) {\n return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential);\n } else {\n return generateBlobSASQueryParametersUDK20201206(\n blobSASSignatureValues,\n userDelegationKeyCredential!,\n );\n }\n }\n\n // Version 2019-12-12 adds support for the blob tags permission.\n // Version 2018-11-09 adds support for the signed resource and signed blob snapshot time fields.\n // https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas#constructing-the-signature-string\n if (version >= \"2018-11-09\") {\n if (sharedKeyCredential !== undefined) {\n return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential);\n } else {\n // Version 2020-02-10 delegation SAS signature construction includes preauthorizedAgentObjectId, agentObjectId, correlationId.\n if (version >= \"2020-02-10\") {\n return generateBlobSASQueryParametersUDK20200210(\n blobSASSignatureValues,\n userDelegationKeyCredential!,\n );\n } else {\n return generateBlobSASQueryParametersUDK20181109(\n blobSASSignatureValues,\n userDelegationKeyCredential!,\n );\n }\n }\n }\n\n if (version >= \"2015-04-05\") {\n if (sharedKeyCredential !== undefined) {\n return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential);\n } else {\n throw new RangeError(\n \"'version' must be >= '2018-11-09' when generating user delegation SAS using user delegation key.\",\n );\n }\n }\n\n throw new RangeError(\"'version' must be >= '2015-04-05'.\");\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2015-04-05 AND BEFORE 2018-11-09.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn and identifier.\n *\n * WARNING: When identifier is not provided, permissions and expiresOn are required.\n * You MUST assign value to identifier or expiresOn & permissions manually if you initial with\n * this constructor.\n *\n * @param blobSASSignatureValues -\n * @param sharedKeyCredential -\n */\nfunction generateBlobSASQueryParameters20150405(\n blobSASSignatureValues: BlobSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential,\n): { sasQueryParameters: SASQueryParameters; stringToSign: string } {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n\n if (\n !blobSASSignatureValues.identifier &&\n !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)\n ) {\n throw new RangeError(\n \"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.\",\n );\n }\n\n let resource: string = \"c\";\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n }\n\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions: string | undefined;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(\n blobSASSignatureValues.permissions.toString(),\n ).toString();\n } else {\n verifiedPermissions = ContainerSASPermissions.parse(\n blobSASSignatureValues.permissions.toString(),\n ).toString();\n }\n }\n\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(\n sharedKeyCredential.accountName,\n blobSASSignatureValues.containerName,\n blobSASSignatureValues.blobName,\n ),\n blobSASSignatureValues.identifier,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : \"\",\n blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : \"\",\n blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : \"\",\n blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : \"\",\n blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : \"\",\n ].join(\"\\n\");\n\n const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);\n\n return {\n sasQueryParameters: new SASQueryParameters(\n blobSASSignatureValues.version!,\n signature,\n verifiedPermissions,\n undefined,\n undefined,\n blobSASSignatureValues.protocol,\n blobSASSignatureValues.startsOn,\n blobSASSignatureValues.expiresOn,\n blobSASSignatureValues.ipRange,\n blobSASSignatureValues.identifier,\n resource,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType,\n ),\n stringToSign: stringToSign,\n };\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2018-11-09.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn and identifier.\n *\n * WARNING: When identifier is not provided, permissions and expiresOn are required.\n * You MUST assign value to identifier or expiresOn & permissions manually if you initial with\n * this constructor.\n *\n * @param blobSASSignatureValues -\n * @param sharedKeyCredential -\n */\nfunction generateBlobSASQueryParameters20181109(\n blobSASSignatureValues: BlobSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential,\n): { sasQueryParameters: SASQueryParameters; stringToSign: string } {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n\n if (\n !blobSASSignatureValues.identifier &&\n !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)\n ) {\n throw new RangeError(\n \"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.\",\n );\n }\n\n let resource: string = \"c\";\n let timestamp = blobSASSignatureValues.snapshotTime;\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n if (blobSASSignatureValues.snapshotTime) {\n resource = \"bs\";\n } else if (blobSASSignatureValues.versionId) {\n resource = \"bv\";\n timestamp = blobSASSignatureValues.versionId;\n }\n }\n\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions: string | undefined;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(\n blobSASSignatureValues.permissions.toString(),\n ).toString();\n } else {\n verifiedPermissions = ContainerSASPermissions.parse(\n blobSASSignatureValues.permissions.toString(),\n ).toString();\n }\n }\n\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(\n sharedKeyCredential.accountName,\n blobSASSignatureValues.containerName,\n blobSASSignatureValues.blobName,\n ),\n blobSASSignatureValues.identifier,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n resource,\n timestamp,\n blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : \"\",\n blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : \"\",\n blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : \"\",\n blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : \"\",\n blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : \"\",\n ].join(\"\\n\");\n\n const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);\n\n return {\n sasQueryParameters: new SASQueryParameters(\n blobSASSignatureValues.version!,\n signature,\n verifiedPermissions,\n undefined,\n undefined,\n blobSASSignatureValues.protocol,\n blobSASSignatureValues.startsOn,\n blobSASSignatureValues.expiresOn,\n blobSASSignatureValues.ipRange,\n blobSASSignatureValues.identifier,\n resource,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType,\n ),\n stringToSign: stringToSign,\n };\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2020-12-06.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn and identifier.\n *\n * WARNING: When identifier is not provided, permissions and expiresOn are required.\n * You MUST assign value to identifier or expiresOn & permissions manually if you initial with\n * this constructor.\n *\n * @param blobSASSignatureValues -\n * @param sharedKeyCredential -\n */\nfunction generateBlobSASQueryParameters20201206(\n blobSASSignatureValues: BlobSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential,\n): { sasQueryParameters: SASQueryParameters; stringToSign: string } {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n\n if (\n !blobSASSignatureValues.identifier &&\n !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)\n ) {\n throw new RangeError(\n \"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.\",\n );\n }\n\n let resource: string = \"c\";\n let timestamp = blobSASSignatureValues.snapshotTime;\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n if (blobSASSignatureValues.snapshotTime) {\n resource = \"bs\";\n } else if (blobSASSignatureValues.versionId) {\n resource = \"bv\";\n timestamp = blobSASSignatureValues.versionId;\n }\n }\n\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions: string | undefined;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(\n blobSASSignatureValues.permissions.toString(),\n ).toString();\n } else {\n verifiedPermissions = ContainerSASPermissions.parse(\n blobSASSignatureValues.permissions.toString(),\n ).toString();\n }\n }\n\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(\n sharedKeyCredential.accountName,\n blobSASSignatureValues.containerName,\n blobSASSignatureValues.blobName,\n ),\n blobSASSignatureValues.identifier,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n resource,\n timestamp,\n blobSASSignatureValues.encryptionScope,\n blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : \"\",\n blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : \"\",\n blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : \"\",\n blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : \"\",\n blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : \"\",\n ].join(\"\\n\");\n\n const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);\n\n return {\n sasQueryParameters: new SASQueryParameters(\n blobSASSignatureValues.version!,\n signature,\n verifiedPermissions,\n undefined,\n undefined,\n blobSASSignatureValues.protocol,\n blobSASSignatureValues.startsOn,\n blobSASSignatureValues.expiresOn,\n blobSASSignatureValues.ipRange,\n blobSASSignatureValues.identifier,\n resource,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType,\n undefined,\n undefined,\n undefined,\n blobSASSignatureValues.encryptionScope,\n ),\n stringToSign: stringToSign,\n };\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2018-11-09.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn.\n *\n * WARNING: identifier will be ignored, permissions and expiresOn are required.\n *\n * @param blobSASSignatureValues -\n * @param userDelegationKeyCredential -\n */\nfunction generateBlobSASQueryParametersUDK20181109(\n blobSASSignatureValues: BlobSASSignatureValues,\n userDelegationKeyCredential: UserDelegationKeyCredential,\n): { sasQueryParameters: SASQueryParameters; stringToSign: string } {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n\n // Stored access policies are not supported for a user delegation SAS.\n if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) {\n throw new RangeError(\n \"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.\",\n );\n }\n\n let resource: string = \"c\";\n let timestamp = blobSASSignatureValues.snapshotTime;\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n if (blobSASSignatureValues.snapshotTime) {\n resource = \"bs\";\n } else if (blobSASSignatureValues.versionId) {\n resource = \"bv\";\n timestamp = blobSASSignatureValues.versionId;\n }\n }\n\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions: string | undefined;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(\n blobSASSignatureValues.permissions.toString(),\n ).toString();\n } else {\n verifiedPermissions = ContainerSASPermissions.parse(\n blobSASSignatureValues.permissions.toString(),\n ).toString();\n }\n }\n\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(\n userDelegationKeyCredential.accountName,\n blobSASSignatureValues.containerName,\n blobSASSignatureValues.blobName,\n ),\n userDelegationKeyCredential.userDelegationKey.signedObjectId,\n userDelegationKeyCredential.userDelegationKey.signedTenantId,\n userDelegationKeyCredential.userDelegationKey.signedStartsOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedExpiresOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedService,\n userDelegationKeyCredential.userDelegationKey.signedVersion,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n resource,\n timestamp,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType,\n ].join(\"\\n\");\n\n const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);\n return {\n sasQueryParameters: new SASQueryParameters(\n blobSASSignatureValues.version!,\n signature,\n verifiedPermissions,\n undefined,\n undefined,\n blobSASSignatureValues.protocol,\n blobSASSignatureValues.startsOn,\n blobSASSignatureValues.expiresOn,\n blobSASSignatureValues.ipRange,\n blobSASSignatureValues.identifier,\n resource,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType,\n userDelegationKeyCredential.userDelegationKey,\n ),\n stringToSign: stringToSign,\n };\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2020-02-10.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn.\n *\n * WARNING: identifier will be ignored, permissions and expiresOn are required.\n *\n * @param blobSASSignatureValues -\n * @param userDelegationKeyCredential -\n */\nfunction generateBlobSASQueryParametersUDK20200210(\n blobSASSignatureValues: BlobSASSignatureValues,\n userDelegationKeyCredential: UserDelegationKeyCredential,\n): { sasQueryParameters: SASQueryParameters; stringToSign: string } {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n\n // Stored access policies are not supported for a user delegation SAS.\n if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) {\n throw new RangeError(\n \"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.\",\n );\n }\n\n let resource: string = \"c\";\n let timestamp = blobSASSignatureValues.snapshotTime;\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n if (blobSASSignatureValues.snapshotTime) {\n resource = \"bs\";\n } else if (blobSASSignatureValues.versionId) {\n resource = \"bv\";\n timestamp = blobSASSignatureValues.versionId;\n }\n }\n\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions: string | undefined;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(\n blobSASSignatureValues.permissions.toString(),\n ).toString();\n } else {\n verifiedPermissions = ContainerSASPermissions.parse(\n blobSASSignatureValues.permissions.toString(),\n ).toString();\n }\n }\n\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(\n userDelegationKeyCredential.accountName,\n blobSASSignatureValues.containerName,\n blobSASSignatureValues.blobName,\n ),\n userDelegationKeyCredential.userDelegationKey.signedObjectId,\n userDelegationKeyCredential.userDelegationKey.signedTenantId,\n userDelegationKeyCredential.userDelegationKey.signedStartsOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedExpiresOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedService,\n userDelegationKeyCredential.userDelegationKey.signedVersion,\n blobSASSignatureValues.preauthorizedAgentObjectId,\n undefined, // agentObjectId\n blobSASSignatureValues.correlationId,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n resource,\n timestamp,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType,\n ].join(\"\\n\");\n\n const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);\n return {\n sasQueryParameters: new SASQueryParameters(\n blobSASSignatureValues.version!,\n signature,\n verifiedPermissions,\n undefined,\n undefined,\n blobSASSignatureValues.protocol,\n blobSASSignatureValues.startsOn,\n blobSASSignatureValues.expiresOn,\n blobSASSignatureValues.ipRange,\n blobSASSignatureValues.identifier,\n resource,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType,\n userDelegationKeyCredential.userDelegationKey,\n blobSASSignatureValues.preauthorizedAgentObjectId,\n blobSASSignatureValues.correlationId,\n ),\n stringToSign: stringToSign,\n };\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2020-12-06.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn.\n *\n * WARNING: identifier will be ignored, permissions and expiresOn are required.\n *\n * @param blobSASSignatureValues -\n * @param userDelegationKeyCredential -\n */\nfunction generateBlobSASQueryParametersUDK20201206(\n blobSASSignatureValues: BlobSASSignatureValues,\n userDelegationKeyCredential: UserDelegationKeyCredential,\n): { sasQueryParameters: SASQueryParameters; stringToSign: string } {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n\n // Stored access policies are not supported for a user delegation SAS.\n if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) {\n throw new RangeError(\n \"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.\",\n );\n }\n\n let resource: string = \"c\";\n let timestamp = blobSASSignatureValues.snapshotTime;\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n if (blobSASSignatureValues.snapshotTime) {\n resource = \"bs\";\n } else if (blobSASSignatureValues.versionId) {\n resource = \"bv\";\n timestamp = blobSASSignatureValues.versionId;\n }\n }\n\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions: string | undefined;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(\n blobSASSignatureValues.permissions.toString(),\n ).toString();\n } else {\n verifiedPermissions = ContainerSASPermissions.parse(\n blobSASSignatureValues.permissions.toString(),\n ).toString();\n }\n }\n\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(\n userDelegationKeyCredential.accountName,\n blobSASSignatureValues.containerName,\n blobSASSignatureValues.blobName,\n ),\n userDelegationKeyCredential.userDelegationKey.signedObjectId,\n userDelegationKeyCredential.userDelegationKey.signedTenantId,\n userDelegationKeyCredential.userDelegationKey.signedStartsOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedExpiresOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedService,\n userDelegationKeyCredential.userDelegationKey.signedVersion,\n blobSASSignatureValues.preauthorizedAgentObjectId,\n undefined, // agentObjectId\n blobSASSignatureValues.correlationId,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n resource,\n timestamp,\n blobSASSignatureValues.encryptionScope,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType,\n ].join(\"\\n\");\n\n const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);\n return {\n sasQueryParameters: new SASQueryParameters(\n blobSASSignatureValues.version!,\n signature,\n verifiedPermissions,\n undefined,\n undefined,\n blobSASSignatureValues.protocol,\n blobSASSignatureValues.startsOn,\n blobSASSignatureValues.expiresOn,\n blobSASSignatureValues.ipRange,\n blobSASSignatureValues.identifier,\n resource,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType,\n userDelegationKeyCredential.userDelegationKey,\n blobSASSignatureValues.preauthorizedAgentObjectId,\n blobSASSignatureValues.correlationId,\n blobSASSignatureValues.encryptionScope,\n ),\n stringToSign: stringToSign,\n };\n}\n\nfunction getCanonicalName(accountName: string, containerName: string, blobName?: string): string {\n // Container: \"/blob/account/containerName\"\n // Blob: \"/blob/account/containerName/blobName\"\n const elements: string[] = [`/blob/${accountName}/${containerName}`];\n if (blobName) {\n elements.push(`/${blobName}`);\n }\n return elements.join(\"\");\n}\n\nfunction SASSignatureValuesSanityCheckAndAutofill(\n blobSASSignatureValues: BlobSASSignatureValues,\n): BlobSASSignatureValues {\n const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION;\n if (blobSASSignatureValues.snapshotTime && version < \"2018-11-09\") {\n throw RangeError(\"'version' must be >= '2018-11-09' when providing 'snapshotTime'.\");\n }\n if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.snapshotTime) {\n throw RangeError(\"Must provide 'blobName' when providing 'snapshotTime'.\");\n }\n\n if (blobSASSignatureValues.versionId && version < \"2019-10-10\") {\n throw RangeError(\"'version' must be >= '2019-10-10' when providing 'versionId'.\");\n }\n if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.versionId) {\n throw RangeError(\"Must provide 'blobName' when providing 'versionId'.\");\n }\n\n if (\n blobSASSignatureValues.permissions &&\n blobSASSignatureValues.permissions.setImmutabilityPolicy &&\n version < \"2020-08-04\"\n ) {\n throw RangeError(\"'version' must be >= '2020-08-04' when provided 'i' permission.\");\n }\n\n if (\n blobSASSignatureValues.permissions &&\n blobSASSignatureValues.permissions.deleteVersion &&\n version < \"2019-10-10\"\n ) {\n throw RangeError(\"'version' must be >= '2019-10-10' when providing 'x' permission.\");\n }\n\n if (\n blobSASSignatureValues.permissions &&\n blobSASSignatureValues.permissions.permanentDelete &&\n version < \"2019-10-10\"\n ) {\n throw RangeError(\"'version' must be >= '2019-10-10' when providing 'y' permission.\");\n }\n\n if (\n blobSASSignatureValues.permissions &&\n blobSASSignatureValues.permissions.tag &&\n version < \"2019-12-12\"\n ) {\n throw RangeError(\"'version' must be >= '2019-12-12' when providing 't' permission.\");\n }\n\n if (\n version < \"2020-02-10\" &&\n blobSASSignatureValues.permissions &&\n (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)\n ) {\n throw RangeError(\"'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.\");\n }\n\n if (\n version < \"2021-04-10\" &&\n blobSASSignatureValues.permissions &&\n (blobSASSignatureValues.permissions as ContainerSASPermissions).filterByTags\n ) {\n throw RangeError(\"'version' must be >= '2021-04-10' when providing the 'f' permission.\");\n }\n\n if (\n version < \"2020-02-10\" &&\n (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)\n ) {\n throw RangeError(\n \"'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.\",\n );\n }\n\n if (blobSASSignatureValues.encryptionScope && version < \"2020-12-06\") {\n throw RangeError(\"'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.\");\n }\n\n blobSASSignatureValues.version = version;\n return blobSASSignatureValues;\n}\n"]}
|
1
|
+
{"version":3,"file":"BlobSASSignatureValues.js","sourceRoot":"","sources":["../../../../../storage-blob/src/sas/BlobSASSignatureValues.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AACvF,OAAO,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AACzF,OAAO,EAAE,eAAe,EAAc,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAe,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AA4O7D,MAAM,UAAU,8BAA8B,CAC5C,sBAA8C,EAC9C,sCAAsF,EACtF,WAAoB;IAEpB,OAAO,sCAAsC,CAC3C,sBAAsB,EACtB,sCAAsC,EACtC,WAAW,CACZ,CAAC,kBAAkB,CAAC;AACvB,CAAC;AAED,MAAM,UAAU,sCAAsC,CACpD,sBAA8C,EAC9C,sCAAsF,EACtF,WAAoB;IAEpB,MAAM,OAAO,GAAG,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAC,sBAAsB,CAAC,OAAO,CAA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E,CAAC,CAAC;IACvF,CAAC;IAED,IACE,OAAO,GAAG,YAAY;QACtB,sBAAsB,CAAC,WAAW;QAClC,CAAC,sBAAsB,CAAC,WAAW,CAAC,IAAI,IAAI,sBAAsB,CAAC,WAAW,CAAC,OAAO,CAAC,EACvF,CAAC;QACD,MAAM,UAAU,CAAC,6EAA6E,CAAC,CAAC;IAClG,CAAC;IAED,IACE,OAAO,GAAG,YAAY;QACtB,sBAAsB,CAAC,WAAW;QACjC,sBAAsB,CAAC,WAAuC,CAAC,YAAY,EAC5E,CAAC;QACD,MAAM,UAAU,CAAC,sEAAsE,CAAC,CAAC;IAC3F,CAAC;IAED,IACE,OAAO,GAAG,YAAY;QACtB,CAAC,sBAAsB,CAAC,0BAA0B,IAAI,sBAAsB,CAAC,aAAa,CAAC,EAC3F,CAAC;QACD,MAAM,UAAU,CACd,mGAAmG,CACpG,CAAC;IACJ,CAAC;IAED,IAAI,sBAAsB,CAAC,eAAe,IAAI,OAAO,GAAG,YAAY,EAAE,CAAC;QACrE,MAAM,UAAU,CAAC,2EAA2E,CAAC,CAAC;IAChG,CAAC;IAED,sBAAsB,CAAC,OAAO,GAAG,OAAO,CAAC;IACzC,OAAO,sBAAsB,CAAC;AAChC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { BlobSASPermissions } from \"./BlobSASPermissions\";\nimport { UserDelegationKey } from \"../BlobServiceClient\";\nimport { ContainerSASPermissions } from \"./ContainerSASPermissions\";\nimport { StorageSharedKeyCredential } from \"../credentials/StorageSharedKeyCredential\";\nimport { UserDelegationKeyCredential } from \"../credentials/UserDelegationKeyCredential\";\nimport { ipRangeToString, SasIPRange } from \"./SasIPRange\";\nimport { SASProtocol, SASQueryParameters } from \"./SASQueryParameters\";\nimport { SERVICE_VERSION } from \"../utils/constants\";\nimport { truncatedISO8061Date } from \"../utils/utils.common\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * BlobSASSignatureValues is used to help generating Blob service SAS tokens for containers or blobs.\n */\nexport interface BlobSASSignatureValues {\n /**\n * The version of the service this SAS will target. If not specified, it will default to the version targeted by the\n * library.\n */\n version?: string;\n\n /**\n * Optional. SAS protocols, HTTPS only or HTTPSandHTTP\n */\n protocol?: SASProtocol;\n\n /**\n * Optional. When the SAS will take effect.\n */\n startsOn?: Date;\n\n /**\n * Optional only when identifier is provided. The time after which the SAS will no longer work.\n */\n expiresOn?: Date;\n\n /**\n * Optional only when identifier is provided.\n * Please refer to either {@link ContainerSASPermissions} or {@link BlobSASPermissions} depending on the resource\n * being accessed for help constructing the permissions string.\n */\n permissions?: BlobSASPermissions | ContainerSASPermissions;\n\n /**\n * Optional. IP ranges allowed in this SAS.\n */\n ipRange?: SasIPRange;\n\n /**\n * The name of the container the SAS user may access.\n */\n containerName: string;\n\n /**\n * Optional. The blob name of the SAS user may access. Required if snapshotTime or versionId is provided.\n */\n blobName?: string;\n\n /**\n * Optional. Snapshot timestamp string the SAS user may access. Only supported from API version 2018-11-09.\n */\n snapshotTime?: string;\n\n /**\n * Optional. VersionId of the blob version the SAS user may access. Only supported from API version 2019-10-10.\n */\n versionId?: string;\n\n /**\n * Optional. The name of the access policy on the container this SAS references if any.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy\n */\n identifier?: string;\n\n /**\n * Optional. Encryption scope to use when sending requests authorized with this SAS URI.\n */\n encryptionScope?: string;\n\n /**\n * Optional. The cache-control header for the SAS.\n */\n cacheControl?: string;\n\n /**\n * Optional. The content-disposition header for the SAS.\n */\n contentDisposition?: string;\n\n /**\n * Optional. The content-encoding header for the SAS.\n */\n contentEncoding?: string;\n\n /**\n * Optional. The content-language header for the SAS.\n */\n contentLanguage?: string;\n\n /**\n * Optional. The content-type header for the SAS.\n */\n contentType?: string;\n\n /**\n * Optional. Beginning in version 2020-02-10, specifies the Authorized AAD Object ID in GUID format. The AAD Object ID of a user\n * authorized by the owner of the user delegation key to perform the action granted by the SAS. The Azure Storage service will\n * ensure that the owner of the user delegation key has the required permissions before granting access but no additional permission\n * check for the user specified in this value will be performed. This is only used for User Delegation SAS.\n */\n preauthorizedAgentObjectId?: string;\n\n /**\n * Optional. Beginning in version 2020-02-10, this is a GUID value that will be logged in the storage diagnostic logs and can be used to\n * correlate SAS generation with storage resource access. This is only used for User Delegation SAS.\n */\n correlationId?: string;\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn and identifier.\n *\n * WARNING: When identifier is not provided, permissions and expiresOn are required.\n * You MUST assign value to identifier or expiresOn & permissions manually if you initial with\n * this constructor.\n *\n * Fill in the required details before running the following snippets.\n *\n * Example usage:\n *\n * ```js\n * // Generate service level SAS for a container\n * const containerSAS = generateBlobSASQueryParameters({\n * containerName, // Required\n * permissions: ContainerSASPermissions.parse(\"racwdl\"), // Required\n * startsOn: new Date(), // Optional\n * expiresOn: new Date(new Date().valueOf() + 86400 * 1000), // Required. Date type\n * ipRange: { start: \"0.0.0.0\", end: \"255.255.255.255\" }, // Optional\n * protocol: SASProtocol.HttpsAndHttp, // Optional\n * version: \"2016-05-31\" // Optional\n * },\n * sharedKeyCredential // StorageSharedKeyCredential - `new StorageSharedKeyCredential(account, accountKey)`\n * ).toString();\n * ```\n *\n * Example using an identifier:\n *\n * ```js\n * // Generate service level SAS for a container with identifier\n * // startsOn & permissions are optional when identifier is provided\n * const identifier = \"unique-id\";\n * await containerClient.setAccessPolicy(undefined, [\n * {\n * accessPolicy: {\n * expiresOn: new Date(new Date().valueOf() + 86400 * 1000), // Date type\n * permissions: ContainerSASPermissions.parse(\"racwdl\").toString(),\n * startsOn: new Date() // Date type\n * },\n * id: identifier\n * }\n * ]);\n *\n * const containerSAS = generateBlobSASQueryParameters(\n * {\n * containerName, // Required\n * identifier // Required\n * },\n * sharedKeyCredential // StorageSharedKeyCredential - `new StorageSharedKeyCredential(account, accountKey)`\n * ).toString();\n * ```\n *\n * Example using a blob name:\n *\n * ```js\n * // Generate service level SAS for a blob\n * const blobSAS = generateBlobSASQueryParameters({\n * containerName, // Required\n * blobName, // Required\n * permissions: BlobSASPermissions.parse(\"racwd\"), // Required\n * startsOn: new Date(), // Optional\n * expiresOn: new Date(new Date().valueOf() + 86400 * 1000), // Required. Date type\n * cacheControl: \"cache-control-override\", // Optional\n * contentDisposition: \"content-disposition-override\", // Optional\n * contentEncoding: \"content-encoding-override\", // Optional\n * contentLanguage: \"content-language-override\", // Optional\n * contentType: \"content-type-override\", // Optional\n * ipRange: { start: \"0.0.0.0\", end: \"255.255.255.255\" }, // Optional\n * protocol: SASProtocol.HttpsAndHttp, // Optional\n * version: \"2016-05-31\" // Optional\n * },\n * sharedKeyCredential // StorageSharedKeyCredential - `new StorageSharedKeyCredential(account, accountKey)`\n * ).toString();\n * ```\n *\n * @param blobSASSignatureValues -\n * @param sharedKeyCredential -\n */\nexport function generateBlobSASQueryParameters(\n blobSASSignatureValues: BlobSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential,\n): SASQueryParameters;\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Creates an instance of SASQueryParameters.\n * WARNING: identifier will be ignored when generating user delegation SAS, permissions and expiresOn are required.\n *\n * Example usage:\n *\n * ```js\n * // Generate user delegation SAS for a container\n * const userDelegationKey = await blobServiceClient.getUserDelegationKey(startsOn, expiresOn);\n * const containerSAS = generateBlobSASQueryParameters({\n * containerName, // Required\n * permissions: ContainerSASPermissions.parse(\"racwdl\"), // Required\n * startsOn, // Optional. Date type\n * expiresOn, // Required. Date type\n * ipRange: { start: \"0.0.0.0\", end: \"255.255.255.255\" }, // Optional\n * protocol: SASProtocol.HttpsAndHttp, // Optional\n * version: \"2018-11-09\" // Must greater than or equal to 2018-11-09 to generate user delegation SAS\n * },\n * userDelegationKey, // UserDelegationKey\n * accountName\n * ).toString();\n * ```\n *\n * @param blobSASSignatureValues -\n * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`\n * @param accountName -\n */\nexport function generateBlobSASQueryParameters(\n blobSASSignatureValues: BlobSASSignatureValues,\n userDelegationKey: UserDelegationKey,\n accountName: string,\n): SASQueryParameters;\n\nexport function generateBlobSASQueryParameters(\n blobSASSignatureValues: BlobSASSignatureValues,\n sharedKeyCredentialOrUserDelegationKey: StorageSharedKeyCredential | UserDelegationKey,\n accountName?: string,\n): SASQueryParameters {\n return generateBlobSASQueryParametersInternal(\n blobSASSignatureValues,\n sharedKeyCredentialOrUserDelegationKey,\n accountName,\n ).sasQueryParameters;\n}\n\nexport function generateBlobSASQueryParametersInternal(\n blobSASSignatureValues: BlobSASSignatureValues,\n sharedKeyCredentialOrUserDelegationKey: StorageSharedKeyCredential | UserDelegationKey,\n accountName?: string,\n): { sasQueryParameters: SASQueryParameters; stringToSign: string } {\n const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION;\n\n const sharedKeyCredential =\n sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential\n ? sharedKeyCredentialOrUserDelegationKey\n : undefined;\n let userDelegationKeyCredential: UserDelegationKeyCredential | undefined;\n\n if (sharedKeyCredential === undefined && accountName !== undefined) {\n userDelegationKeyCredential = new UserDelegationKeyCredential(\n accountName,\n sharedKeyCredentialOrUserDelegationKey as UserDelegationKey,\n );\n }\n\n if (sharedKeyCredential === undefined && userDelegationKeyCredential === undefined) {\n throw TypeError(\"Invalid sharedKeyCredential, userDelegationKey or accountName.\");\n }\n\n // Version 2020-12-06 adds support for encryptionscope in SAS.\n if (version >= \"2020-12-06\") {\n if (sharedKeyCredential !== undefined) {\n return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential);\n } else {\n return generateBlobSASQueryParametersUDK20201206(\n blobSASSignatureValues,\n userDelegationKeyCredential!,\n );\n }\n }\n\n // Version 2019-12-12 adds support for the blob tags permission.\n // Version 2018-11-09 adds support for the signed resource and signed blob snapshot time fields.\n // https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas#constructing-the-signature-string\n if (version >= \"2018-11-09\") {\n if (sharedKeyCredential !== undefined) {\n return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential);\n } else {\n // Version 2020-02-10 delegation SAS signature construction includes preauthorizedAgentObjectId, agentObjectId, correlationId.\n if (version >= \"2020-02-10\") {\n return generateBlobSASQueryParametersUDK20200210(\n blobSASSignatureValues,\n userDelegationKeyCredential!,\n );\n } else {\n return generateBlobSASQueryParametersUDK20181109(\n blobSASSignatureValues,\n userDelegationKeyCredential!,\n );\n }\n }\n }\n\n if (version >= \"2015-04-05\") {\n if (sharedKeyCredential !== undefined) {\n return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential);\n } else {\n throw new RangeError(\n \"'version' must be >= '2018-11-09' when generating user delegation SAS using user delegation key.\",\n );\n }\n }\n\n throw new RangeError(\"'version' must be >= '2015-04-05'.\");\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2015-04-05 AND BEFORE 2018-11-09.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn and identifier.\n *\n * WARNING: When identifier is not provided, permissions and expiresOn are required.\n * You MUST assign value to identifier or expiresOn & permissions manually if you initial with\n * this constructor.\n *\n * @param blobSASSignatureValues -\n * @param sharedKeyCredential -\n */\nfunction generateBlobSASQueryParameters20150405(\n blobSASSignatureValues: BlobSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential,\n): { sasQueryParameters: SASQueryParameters; stringToSign: string } {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n\n if (\n !blobSASSignatureValues.identifier &&\n !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)\n ) {\n throw new RangeError(\n \"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.\",\n );\n }\n\n let resource: string = \"c\";\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n }\n\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions: string | undefined;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(\n blobSASSignatureValues.permissions.toString(),\n ).toString();\n } else {\n verifiedPermissions = ContainerSASPermissions.parse(\n blobSASSignatureValues.permissions.toString(),\n ).toString();\n }\n }\n\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(\n sharedKeyCredential.accountName,\n blobSASSignatureValues.containerName,\n blobSASSignatureValues.blobName,\n ),\n blobSASSignatureValues.identifier,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : \"\",\n blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : \"\",\n blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : \"\",\n blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : \"\",\n blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : \"\",\n ].join(\"\\n\");\n\n const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);\n\n return {\n sasQueryParameters: new SASQueryParameters(\n blobSASSignatureValues.version!,\n signature,\n verifiedPermissions,\n undefined,\n undefined,\n blobSASSignatureValues.protocol,\n blobSASSignatureValues.startsOn,\n blobSASSignatureValues.expiresOn,\n blobSASSignatureValues.ipRange,\n blobSASSignatureValues.identifier,\n resource,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType,\n ),\n stringToSign: stringToSign,\n };\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2018-11-09.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn and identifier.\n *\n * WARNING: When identifier is not provided, permissions and expiresOn are required.\n * You MUST assign value to identifier or expiresOn & permissions manually if you initial with\n * this constructor.\n *\n * @param blobSASSignatureValues -\n * @param sharedKeyCredential -\n */\nfunction generateBlobSASQueryParameters20181109(\n blobSASSignatureValues: BlobSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential,\n): { sasQueryParameters: SASQueryParameters; stringToSign: string } {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n\n if (\n !blobSASSignatureValues.identifier &&\n !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)\n ) {\n throw new RangeError(\n \"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.\",\n );\n }\n\n let resource: string = \"c\";\n let timestamp = blobSASSignatureValues.snapshotTime;\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n if (blobSASSignatureValues.snapshotTime) {\n resource = \"bs\";\n } else if (blobSASSignatureValues.versionId) {\n resource = \"bv\";\n timestamp = blobSASSignatureValues.versionId;\n }\n }\n\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions: string | undefined;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(\n blobSASSignatureValues.permissions.toString(),\n ).toString();\n } else {\n verifiedPermissions = ContainerSASPermissions.parse(\n blobSASSignatureValues.permissions.toString(),\n ).toString();\n }\n }\n\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(\n sharedKeyCredential.accountName,\n blobSASSignatureValues.containerName,\n blobSASSignatureValues.blobName,\n ),\n blobSASSignatureValues.identifier,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n resource,\n timestamp,\n blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : \"\",\n blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : \"\",\n blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : \"\",\n blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : \"\",\n blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : \"\",\n ].join(\"\\n\");\n\n const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);\n\n return {\n sasQueryParameters: new SASQueryParameters(\n blobSASSignatureValues.version!,\n signature,\n verifiedPermissions,\n undefined,\n undefined,\n blobSASSignatureValues.protocol,\n blobSASSignatureValues.startsOn,\n blobSASSignatureValues.expiresOn,\n blobSASSignatureValues.ipRange,\n blobSASSignatureValues.identifier,\n resource,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType,\n ),\n stringToSign: stringToSign,\n };\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2020-12-06.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn and identifier.\n *\n * WARNING: When identifier is not provided, permissions and expiresOn are required.\n * You MUST assign value to identifier or expiresOn & permissions manually if you initial with\n * this constructor.\n *\n * @param blobSASSignatureValues -\n * @param sharedKeyCredential -\n */\nfunction generateBlobSASQueryParameters20201206(\n blobSASSignatureValues: BlobSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential,\n): { sasQueryParameters: SASQueryParameters; stringToSign: string } {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n\n if (\n !blobSASSignatureValues.identifier &&\n !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)\n ) {\n throw new RangeError(\n \"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.\",\n );\n }\n\n let resource: string = \"c\";\n let timestamp = blobSASSignatureValues.snapshotTime;\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n if (blobSASSignatureValues.snapshotTime) {\n resource = \"bs\";\n } else if (blobSASSignatureValues.versionId) {\n resource = \"bv\";\n timestamp = blobSASSignatureValues.versionId;\n }\n }\n\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions: string | undefined;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(\n blobSASSignatureValues.permissions.toString(),\n ).toString();\n } else {\n verifiedPermissions = ContainerSASPermissions.parse(\n blobSASSignatureValues.permissions.toString(),\n ).toString();\n }\n }\n\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(\n sharedKeyCredential.accountName,\n blobSASSignatureValues.containerName,\n blobSASSignatureValues.blobName,\n ),\n blobSASSignatureValues.identifier,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n resource,\n timestamp,\n blobSASSignatureValues.encryptionScope,\n blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : \"\",\n blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : \"\",\n blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : \"\",\n blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : \"\",\n blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : \"\",\n ].join(\"\\n\");\n\n const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);\n\n return {\n sasQueryParameters: new SASQueryParameters(\n blobSASSignatureValues.version!,\n signature,\n verifiedPermissions,\n undefined,\n undefined,\n blobSASSignatureValues.protocol,\n blobSASSignatureValues.startsOn,\n blobSASSignatureValues.expiresOn,\n blobSASSignatureValues.ipRange,\n blobSASSignatureValues.identifier,\n resource,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType,\n undefined,\n undefined,\n undefined,\n blobSASSignatureValues.encryptionScope,\n ),\n stringToSign: stringToSign,\n };\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2018-11-09.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn.\n *\n * WARNING: identifier will be ignored, permissions and expiresOn are required.\n *\n * @param blobSASSignatureValues -\n * @param userDelegationKeyCredential -\n */\nfunction generateBlobSASQueryParametersUDK20181109(\n blobSASSignatureValues: BlobSASSignatureValues,\n userDelegationKeyCredential: UserDelegationKeyCredential,\n): { sasQueryParameters: SASQueryParameters; stringToSign: string } {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n\n // Stored access policies are not supported for a user delegation SAS.\n if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) {\n throw new RangeError(\n \"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.\",\n );\n }\n\n let resource: string = \"c\";\n let timestamp = blobSASSignatureValues.snapshotTime;\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n if (blobSASSignatureValues.snapshotTime) {\n resource = \"bs\";\n } else if (blobSASSignatureValues.versionId) {\n resource = \"bv\";\n timestamp = blobSASSignatureValues.versionId;\n }\n }\n\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions: string | undefined;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(\n blobSASSignatureValues.permissions.toString(),\n ).toString();\n } else {\n verifiedPermissions = ContainerSASPermissions.parse(\n blobSASSignatureValues.permissions.toString(),\n ).toString();\n }\n }\n\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(\n userDelegationKeyCredential.accountName,\n blobSASSignatureValues.containerName,\n blobSASSignatureValues.blobName,\n ),\n userDelegationKeyCredential.userDelegationKey.signedObjectId,\n userDelegationKeyCredential.userDelegationKey.signedTenantId,\n userDelegationKeyCredential.userDelegationKey.signedStartsOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedExpiresOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedService,\n userDelegationKeyCredential.userDelegationKey.signedVersion,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n resource,\n timestamp,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType,\n ].join(\"\\n\");\n\n const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);\n return {\n sasQueryParameters: new SASQueryParameters(\n blobSASSignatureValues.version!,\n signature,\n verifiedPermissions,\n undefined,\n undefined,\n blobSASSignatureValues.protocol,\n blobSASSignatureValues.startsOn,\n blobSASSignatureValues.expiresOn,\n blobSASSignatureValues.ipRange,\n blobSASSignatureValues.identifier,\n resource,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType,\n userDelegationKeyCredential.userDelegationKey,\n ),\n stringToSign: stringToSign,\n };\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2020-02-10.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn.\n *\n * WARNING: identifier will be ignored, permissions and expiresOn are required.\n *\n * @param blobSASSignatureValues -\n * @param userDelegationKeyCredential -\n */\nfunction generateBlobSASQueryParametersUDK20200210(\n blobSASSignatureValues: BlobSASSignatureValues,\n userDelegationKeyCredential: UserDelegationKeyCredential,\n): { sasQueryParameters: SASQueryParameters; stringToSign: string } {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n\n // Stored access policies are not supported for a user delegation SAS.\n if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) {\n throw new RangeError(\n \"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.\",\n );\n }\n\n let resource: string = \"c\";\n let timestamp = blobSASSignatureValues.snapshotTime;\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n if (blobSASSignatureValues.snapshotTime) {\n resource = \"bs\";\n } else if (blobSASSignatureValues.versionId) {\n resource = \"bv\";\n timestamp = blobSASSignatureValues.versionId;\n }\n }\n\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions: string | undefined;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(\n blobSASSignatureValues.permissions.toString(),\n ).toString();\n } else {\n verifiedPermissions = ContainerSASPermissions.parse(\n blobSASSignatureValues.permissions.toString(),\n ).toString();\n }\n }\n\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(\n userDelegationKeyCredential.accountName,\n blobSASSignatureValues.containerName,\n blobSASSignatureValues.blobName,\n ),\n userDelegationKeyCredential.userDelegationKey.signedObjectId,\n userDelegationKeyCredential.userDelegationKey.signedTenantId,\n userDelegationKeyCredential.userDelegationKey.signedStartsOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedExpiresOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedService,\n userDelegationKeyCredential.userDelegationKey.signedVersion,\n blobSASSignatureValues.preauthorizedAgentObjectId,\n undefined, // agentObjectId\n blobSASSignatureValues.correlationId,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n resource,\n timestamp,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType,\n ].join(\"\\n\");\n\n const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);\n return {\n sasQueryParameters: new SASQueryParameters(\n blobSASSignatureValues.version!,\n signature,\n verifiedPermissions,\n undefined,\n undefined,\n blobSASSignatureValues.protocol,\n blobSASSignatureValues.startsOn,\n blobSASSignatureValues.expiresOn,\n blobSASSignatureValues.ipRange,\n blobSASSignatureValues.identifier,\n resource,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType,\n userDelegationKeyCredential.userDelegationKey,\n blobSASSignatureValues.preauthorizedAgentObjectId,\n blobSASSignatureValues.correlationId,\n ),\n stringToSign: stringToSign,\n };\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2020-12-06.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn.\n *\n * WARNING: identifier will be ignored, permissions and expiresOn are required.\n *\n * @param blobSASSignatureValues -\n * @param userDelegationKeyCredential -\n */\nfunction generateBlobSASQueryParametersUDK20201206(\n blobSASSignatureValues: BlobSASSignatureValues,\n userDelegationKeyCredential: UserDelegationKeyCredential,\n): { sasQueryParameters: SASQueryParameters; stringToSign: string } {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n\n // Stored access policies are not supported for a user delegation SAS.\n if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) {\n throw new RangeError(\n \"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.\",\n );\n }\n\n let resource: string = \"c\";\n let timestamp = blobSASSignatureValues.snapshotTime;\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n if (blobSASSignatureValues.snapshotTime) {\n resource = \"bs\";\n } else if (blobSASSignatureValues.versionId) {\n resource = \"bv\";\n timestamp = blobSASSignatureValues.versionId;\n }\n }\n\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions: string | undefined;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(\n blobSASSignatureValues.permissions.toString(),\n ).toString();\n } else {\n verifiedPermissions = ContainerSASPermissions.parse(\n blobSASSignatureValues.permissions.toString(),\n ).toString();\n }\n }\n\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(\n userDelegationKeyCredential.accountName,\n blobSASSignatureValues.containerName,\n blobSASSignatureValues.blobName,\n ),\n userDelegationKeyCredential.userDelegationKey.signedObjectId,\n userDelegationKeyCredential.userDelegationKey.signedTenantId,\n userDelegationKeyCredential.userDelegationKey.signedStartsOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedExpiresOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedService,\n userDelegationKeyCredential.userDelegationKey.signedVersion,\n blobSASSignatureValues.preauthorizedAgentObjectId,\n undefined, // agentObjectId\n blobSASSignatureValues.correlationId,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n resource,\n timestamp,\n blobSASSignatureValues.encryptionScope,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType,\n ].join(\"\\n\");\n\n const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);\n return {\n sasQueryParameters: new SASQueryParameters(\n blobSASSignatureValues.version!,\n signature,\n verifiedPermissions,\n undefined,\n undefined,\n blobSASSignatureValues.protocol,\n blobSASSignatureValues.startsOn,\n blobSASSignatureValues.expiresOn,\n blobSASSignatureValues.ipRange,\n blobSASSignatureValues.identifier,\n resource,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType,\n userDelegationKeyCredential.userDelegationKey,\n blobSASSignatureValues.preauthorizedAgentObjectId,\n blobSASSignatureValues.correlationId,\n blobSASSignatureValues.encryptionScope,\n ),\n stringToSign: stringToSign,\n };\n}\n\nfunction getCanonicalName(accountName: string, containerName: string, blobName?: string): string {\n // Container: \"/blob/account/containerName\"\n // Blob: \"/blob/account/containerName/blobName\"\n const elements: string[] = [`/blob/${accountName}/${containerName}`];\n if (blobName) {\n elements.push(`/${blobName}`);\n }\n return elements.join(\"\");\n}\n\nfunction SASSignatureValuesSanityCheckAndAutofill(\n blobSASSignatureValues: BlobSASSignatureValues,\n): BlobSASSignatureValues {\n const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION;\n if (blobSASSignatureValues.snapshotTime && version < \"2018-11-09\") {\n throw RangeError(\"'version' must be >= '2018-11-09' when providing 'snapshotTime'.\");\n }\n if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.snapshotTime) {\n throw RangeError(\"Must provide 'blobName' when providing 'snapshotTime'.\");\n }\n\n if (blobSASSignatureValues.versionId && version < \"2019-10-10\") {\n throw RangeError(\"'version' must be >= '2019-10-10' when providing 'versionId'.\");\n }\n if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.versionId) {\n throw RangeError(\"Must provide 'blobName' when providing 'versionId'.\");\n }\n\n if (\n blobSASSignatureValues.permissions &&\n blobSASSignatureValues.permissions.setImmutabilityPolicy &&\n version < \"2020-08-04\"\n ) {\n throw RangeError(\"'version' must be >= '2020-08-04' when provided 'i' permission.\");\n }\n\n if (\n blobSASSignatureValues.permissions &&\n blobSASSignatureValues.permissions.deleteVersion &&\n version < \"2019-10-10\"\n ) {\n throw RangeError(\"'version' must be >= '2019-10-10' when providing 'x' permission.\");\n }\n\n if (\n blobSASSignatureValues.permissions &&\n blobSASSignatureValues.permissions.permanentDelete &&\n version < \"2019-10-10\"\n ) {\n throw RangeError(\"'version' must be >= '2019-10-10' when providing 'y' permission.\");\n }\n\n if (\n blobSASSignatureValues.permissions &&\n blobSASSignatureValues.permissions.tag &&\n version < \"2019-12-12\"\n ) {\n throw RangeError(\"'version' must be >= '2019-12-12' when providing 't' permission.\");\n }\n\n if (\n version < \"2020-02-10\" &&\n blobSASSignatureValues.permissions &&\n (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)\n ) {\n throw RangeError(\"'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.\");\n }\n\n if (\n version < \"2021-04-10\" &&\n blobSASSignatureValues.permissions &&\n (blobSASSignatureValues.permissions as ContainerSASPermissions).filterByTags\n ) {\n throw RangeError(\"'version' must be >= '2021-04-10' when providing the 'f' permission.\");\n }\n\n if (\n version < \"2020-02-10\" &&\n (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)\n ) {\n throw RangeError(\n \"'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.\",\n );\n }\n\n if (blobSASSignatureValues.encryptionScope && version < \"2020-12-06\") {\n throw RangeError(\"'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.\");\n }\n\n blobSASSignatureValues.version = version;\n return blobSASSignatureValues;\n}\n"]}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
2
|
-
// Licensed under the MIT
|
2
|
+
// Licensed under the MIT License.
|
3
3
|
/**
|
4
4
|
* This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a container.
|
5
5
|
* Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation.
|