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 {
.buildClient();
OffsetDateTime expires = calcTokenExpirationDate(duration, timeUnit);
UserDelegationKey key = rbacKeySource.getUserDelegationKey(null, expires);
BlobSasPermission readOnlyPerms = BlobSasPermission.parse("r");
BlobServiceSasSignatureValues tokenProps = new BlobServiceSasSignatureValues(expires, readOnlyPerms);
BlobSasPermission permissions = BlobSasPermission.parse("crw");
BlobServiceSasSignatureValues tokenProps = new BlobServiceSasSignatureValues(expires, permissions);
String sasToken = tokenSource.generateUserDelegationSas(tokenProps, key);
String sasUri = String.format("%s?%s", blobUrl, sasToken);
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