Commit b02a042b authored by Erik Leckner's avatar Erik Leckner
Browse files

file-azure

parent c7f8cbe0
Pipeline #6224 passed with stage
in 5 minutes and 21 seconds
...@@ -68,8 +68,8 @@ public class AzureTokenServiceImpl { ...@@ -68,8 +68,8 @@ public class AzureTokenServiceImpl {
.buildClient(); .buildClient();
OffsetDateTime expires = calcTokenExpirationDate(duration, timeUnit); OffsetDateTime expires = calcTokenExpirationDate(duration, timeUnit);
UserDelegationKey key = rbacKeySource.getUserDelegationKey(null, expires); UserDelegationKey key = rbacKeySource.getUserDelegationKey(null, expires);
BlobSasPermission readOnlyPerms = BlobSasPermission.parse("r"); BlobSasPermission permissions = BlobSasPermission.parse("crw");
BlobServiceSasSignatureValues tokenProps = new BlobServiceSasSignatureValues(expires, readOnlyPerms); BlobServiceSasSignatureValues tokenProps = new BlobServiceSasSignatureValues(expires, permissions);
String sasToken = tokenSource.generateUserDelegationSas(tokenProps, key); String sasToken = tokenSource.generateUserDelegationSas(tokenProps, key);
String sasUri = String.format("%s?%s", blobUrl, sasToken); String sasUri = String.format("%s?%s", blobUrl, sasToken);
return sasUri; return sasUri;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment