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
Domain Data Mgmt Services
Seismic
Seismic DMS Suite
seismic-dms-cpp-lib
Commits
11ffc9ca
Commit
11ffc9ca
authored
Nov 02, 2021
by
Sacha Brants
Browse files
Merge branch 'jorgen.lind/fix_ibm_segfault' into 'master'
fix: IbmStorage uninitialized memory See merge request
!101
parents
70892e2e
f96426f1
Pipeline
#75387
passed with stages
in 10 minutes and 3 seconds
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
devops/osdu/compile/azure.yml
View file @
11ffc9ca
...
...
@@ -39,10 +39,10 @@ azure-gen-token-test:
INTEGRATION_TESTER
:
$AZURE_PRINCIPAL_ID
script
:
-
apt-get update
-
apt-get install -y python
-
apt-get install -y python-pip
-
pip install msal
-
svctoken=$(python devops/scripts/azure_jwt_client.py)
-
apt-get install -y python
3
-
apt-get install -y python
3
-pip
-
pip
3
install msal
-
svctoken=$(python
3
devops/scripts/azure_jwt_client.py)
-
echo $svctoken > .token
artifacts
:
paths
:
...
...
src/src/lib/cloud/providers/ibm/IbmStorage.cc
View file @
11ffc9ca
...
...
@@ -110,29 +110,28 @@ namespace seismicdrive
bool
IbmStorage
::
getToken
()
{
s
as_token
=
auth_provider
->
getStorageAuthToken
(
sdResource
,
sdReadOnly
);
s
td
::
lock_guard
<
std
::
mutex
>
guard
(
mutex
);
s
td
::
string
new_sas_token
=
sdutils
::
trimBearer
(
sas_token
);
auto
pos
=
new_
sas
_t
oken
.
find
(
':'
);
s
asToken
=
authProvider
->
getStorageAuthToken
(
sdResource
,
sdReadOnly
);
sasToken
=
sdutils
::
trimBearer
(
sasToken
);
auto
pos
=
sas
T
oken
.
find
(
':'
);
if
(
pos
==
std
::
string
::
npos
)
{
return
false
;
auto
accessKeyId
=
new_sas_token
.
substr
(
0
,
pos
);
auto
nextId
=
new_sas_token
.
substr
(
pos
+
1
);
}
auto
accessKeyId
=
sasToken
.
substr
(
0
,
pos
);
auto
nextId
=
sasToken
.
substr
(
pos
+
1
);
pos
=
nextId
.
find
(
':'
);
if
(
pos
==
std
::
string
::
npos
)
{
return
false
;
}
auto
secretKey
=
nextId
.
substr
(
0
,
pos
);
auto
sessionToken
=
nextId
.
substr
(
pos
+
1
);
Aws
::
String
aws_AccessKeyId
(
accessKeyId
.
c_str
(),
accessKeyId
.
size
());
s3_credentials
.
SetAWSAccessKeyId
(
Aws
::
String
(
aws_AccessKeyId
));
Aws
::
String
aws_SecretKey
(
secretKey
.
c_str
(),
secretKey
.
size
());
s3_credentials
.
SetAWSSecretKey
(
Aws
::
String
(
aws_SecretKey
));
Aws
::
String
aws_SessionToken
(
sessionToken
.
c_str
(),
sessionToken
.
size
());
s3_credentials
.
SetSessionToken
(
Aws
::
String
(
aws_SessionToken
));
s3_credentials
.
SetAWSAccessKeyId
({
accessKeyId
.
data
(),
accessKeyId
.
size
()
});
s3_credentials
.
SetAWSSecretKey
({
secretKey
.
data
(),
secretKey
.
size
()
});
s3_credentials
.
SetSessionToken
({
sessionToken
.
data
(),
sessionToken
.
size
()
});
return
true
;
}
...
...
@@ -164,6 +163,7 @@ namespace seismicdrive
config
.
endpointOverride
=
{
ibm_cos_url
.
data
(),
ibm_cos_url
.
size
()};
log
(
2
)
<<
"MINIO Endpoint "
+
config
.
endpointOverride
;
// config.endpointOverride = "minio-endpoint-without-https";
std
::
lock_guard
<
std
::
mutex
>
guard
(
mutex
);
return
std
::
make_shared
<
Aws
::
S3
::
S3Client
>
(
s3_credentials
,
config
,
Aws
::
Client
::
AWSAuthV4Signer
::
PayloadSigningPolicy
::
Never
,
false
);
}
...
...
src/src/lib/cloud/providers/ibm/IbmStorage.h
View file @
11ffc9ca
...
...
@@ -234,8 +234,6 @@ namespace seismicdrive
std
::
unique_ptr
<
const
HttpContext
>
context
;
int
_loggingMode
{
0
};
AuthProvider
*
auth_provider
;
std
::
string
sas_token
;
IbmApiInitialize
myInit
;
Aws
::
Auth
::
AWSCredentials
s3_credentials
;
...
...
Write
Preview
Supports
Markdown
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