Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
System
File
Commits
bfffd084
Commit
bfffd084
authored
Aug 21, 2020
by
Erik Leckner
Browse files
file-azure
parent
424a8143
Pipeline
#6391
passed with stage
in 4 minutes and 29 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
provider/file-azure/src/main/java/org/opengroup/osdu/file/provider/azure/repository/StorageRepository.java
View file @
bfffd084
...
...
@@ -22,6 +22,8 @@ import java.net.URI;
import
java.net.URL
;
import
java.nio.charset.StandardCharsets
;
import
java.util.concurrent.TimeUnit
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.opengroup.osdu.file.model.SignedObject
;
...
...
@@ -30,7 +32,6 @@ import org.opengroup.osdu.file.provider.azure.storage.BlobId;
import
org.opengroup.osdu.file.provider.azure.storage.BlobInfo
;
import
org.opengroup.osdu.file.provider.azure.storage.Storage
;
import
org.opengroup.osdu.file.provider.interfaces.IStorageRepository
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.MediaType
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.web.util.UriUtils
;
...
...
provider/file-azure/src/main/java/org/opengroup/osdu/file/provider/azure/service/AzureTokenServiceImpl.java
View file @
bfffd084
...
...
@@ -67,7 +67,8 @@ public class AzureTokenServiceImpl {
.
endpoint
(
blobUrl
)
.
buildClient
();
OffsetDateTime
expires
=
calcTokenExpirationDate
(
duration
,
timeUnit
);
UserDelegationKey
key
=
rbacKeySource
.
getUserDelegationKey
(
null
,
expires
);
UserDelegationKey
key
=
rbacKeySource
.
getUserDelegationKey
(
OffsetDateTime
.
now
(
ZoneOffset
.
UTC
).
minusMinutes
(
1
),
expires
);
BlobSasPermission
permissions
=
BlobSasPermission
.
parse
(
"crw"
);
BlobServiceSasSignatureValues
tokenProps
=
new
BlobServiceSasSignatureValues
(
expires
,
permissions
);
String
sasToken
=
tokenSource
.
generateUserDelegationSas
(
tokenProps
,
key
);
...
...
provider/file-azure/src/main/java/org/opengroup/osdu/file/provider/azure/storage/StorageImpl.java
View file @
bfffd084
...
...
@@ -35,7 +35,6 @@ import com.azure.identity.ClientSecretCredentialBuilder;
import
com.azure.storage.blob.BlobContainerClient
;
import
com.azure.storage.blob.BlobContainerClientBuilder
;
import
com.azure.storage.blob.BlobUrlParts
;
import
com.azure.storage.blob.specialized.BlockBlobClient
;
import
lombok.SneakyThrows
;
import
lombok.extern.slf4j.Slf4j
;
import
org.opengroup.osdu.file.provider.azure.common.base.MoreObjects
;
...
...
@@ -44,7 +43,6 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.stereotype.Service
;
import
javax.inject.Inject
;
import
java.io.ByteArrayInputStream
;
import
java.net.MalformedURLException
;
import
java.net.URL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment