Skip to content
GitLab
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
Partition
Commits
5bc42245
Commit
5bc42245
authored
Mar 01, 2021
by
Matt Wise
Browse files
Aws integration
parent
67d4e822
Changes
15
Hide whitespace changes
Inline
Side-by-side
partition-core/pom.xml
View file @
5bc42245
...
...
@@ -18,14 +18,14 @@
<modelVersion>
4.0.0
</modelVersion>
<groupId>
org.opengroup.osdu
</groupId>
<artifactId>
partition-core
</artifactId>
<version>
0.6.
0
-SNAPSHOT
</version>
<version>
0.6.
1
-SNAPSHOT
</version>
<description>
Core project for the partition service
</description>
<packaging>
jar
</packaging>
<parent>
<groupId>
org.opengroup.osdu
</groupId>
<artifactId>
partition
</artifactId>
<version>
0.6.
0
-SNAPSHOT
</version>
<version>
0.6.
1
-SNAPSHOT
</version>
<relativePath>
../pom.xml
</relativePath>
</parent>
...
...
pom.xml
View file @
5bc42245
...
...
@@ -18,7 +18,7 @@
<modelVersion>
4.0.0
</modelVersion>
<groupId>
org.opengroup.osdu
</groupId>
<artifactId>
partition
</artifactId>
<version>
0.6.
0
-SNAPSHOT
</version>
<version>
0.6.
1
-SNAPSHOT
</version>
<description>
Partition Service
</description>
<properties>
...
...
provider/partition-aws/pom.xml
View file @
5bc42245
...
...
@@ -21,13 +21,13 @@
<parent>
<artifactId>
partition
</artifactId>
<groupId>
org.opengroup.osdu
</groupId>
<version>
0.6.
0
-SNAPSHOT
</version>
<version>
0.6.
1
-SNAPSHOT
</version>
<relativePath>
../../pom.xml
</relativePath>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
partition-aws
</artifactId>
<version>
0.6.
0
-SNAPSHOT
</version>
<version>
0.6.
1
-SNAPSHOT
</version>
<description>
Partition service on AWS
</description>
<packaging>
jar
</packaging>
...
...
@@ -63,7 +63,7 @@
<dependency>
<groupId>
org.opengroup.osdu
</groupId>
<artifactId>
partition-core
</artifactId>
<version>
0.6.
0
-SNAPSHOT
</version>
<version>
0.6.
1
-SNAPSHOT
</version>
</dependency>
<!-- AWS managed packages -->
...
...
provider/partition-azure/pom.xml
View file @
5bc42245
...
...
@@ -4,20 +4,20 @@
<parent>
<artifactId>
partition
</artifactId>
<groupId>
org.opengroup.osdu
</groupId>
<version>
0.6.
0
-SNAPSHOT
</version>
<version>
0.6.
1
-SNAPSHOT
</version>
<relativePath>
../../pom.xml
</relativePath>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
partition-azure
</artifactId>
<version>
0.6.
0
-SNAPSHOT
</version>
<version>
0.6.
1
-SNAPSHOT
</version>
<description>
Partition service on Azure
</description>
<packaging>
jar
</packaging>
<properties>
<osdu.partition-core.version>
0.6.
0
-SNAPSHOT
</osdu.partition-core.version>
<osdu.partition-core.version>
0.6.
1
-SNAPSHOT
</osdu.partition-core.version>
<osdu.corelibazure.version>
0.0.44
</osdu.corelibazure.version>
<osdu.oscorecommon.version>
0.3.
16
</osdu.oscorecommon.version>
<osdu.oscorecommon.version>
0.3.
28
</osdu.oscorecommon.version>
<azure.version>
2.3.5
</azure.version>
<junit.version>
4.12
</junit.version>
<mockito.version>
2.25.0
</mockito.version>
...
...
provider/partition-gcp/pom.xml
View file @
5bc42245
...
...
@@ -5,12 +5,12 @@
<parent>
<artifactId>
partition
</artifactId>
<groupId>
org.opengroup.osdu
</groupId>
<version>
0.6.
0
-SNAPSHOT
</version>
<version>
0.6.
1
-SNAPSHOT
</version>
<relativePath>
../../pom.xml
</relativePath>
</parent>
<artifactId>
partition-gcp
</artifactId>
<version>
0.6.
0
-SNAPSHOT
</version>
<version>
0.6.
1
-SNAPSHOT
</version>
<description>
Partition service on GCP
</description>
<packaging>
jar
</packaging>
...
...
@@ -19,12 +19,12 @@
<dependency>
<groupId>
org.opengroup.osdu
</groupId>
<artifactId>
partition-core
</artifactId>
<version>
0.6.
0
-SNAPSHOT
</version>
<version>
0.6.
1
-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
org.opengroup.osdu
</groupId>
<artifactId>
os-core-common
</artifactId>
<version>
0.3.
16
</version>
<version>
0.3.
28
</version>
</dependency>
<dependency>
...
...
provider/partition-gcp/src/main/java/org/opengroup/osdu/partition/provider/gcp/security/EntitlementsClientFactory.java
View file @
5bc42245
...
...
@@ -18,9 +18,13 @@
package
org.opengroup.osdu.partition.provider.gcp.security
;
import
lombok.RequiredArgsConstructor
;
import
javax.inject.Inject
;
import
org.opengroup.osdu.core.common.entitlements.EntitlementsAPIConfig
;
import
org.opengroup.osdu.core.common.entitlements.EntitlementsFactory
;
import
org.opengroup.osdu.core.common.entitlements.IEntitlementsFactory
;
import
org.opengroup.osdu.core.common.http.json.HttpResponseBodyMapper
;
import
org.opengroup.osdu.partition.provider.gcp.config.PropertiesConfiguration
;
import
org.springframework.beans.factory.config.AbstractFactoryBean
;
import
org.springframework.stereotype.Component
;
...
...
@@ -31,13 +35,17 @@ public class EntitlementsClientFactory extends AbstractFactoryBean<IEntitlements
private
final
PropertiesConfiguration
properties
;
@Inject
private
HttpResponseBodyMapper
httpResponseBodyMapper
;
@Override
protected
IEntitlementsFactory
createInstance
()
throws
Exception
{
return
new
EntitlementsFactory
(
EntitlementsAPIConfig
.
builder
()
.
rootUrl
(
properties
.
getAuthorizeApi
())
.
build
());
.
build
(),
httpResponseBodyMapper
);
}
@Override
...
...
provider/partition-ibm/pom.xml
View file @
5bc42245
...
...
@@ -9,13 +9,13 @@
<parent>
<artifactId>
partition
</artifactId>
<groupId>
org.opengroup.osdu
</groupId>
<version>
0.6.
0
-SNAPSHOT
</version>
<version>
0.6.
1
-SNAPSHOT
</version>
<relativePath>
../../pom.xml
</relativePath>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
partition-ibm
</artifactId>
<version>
0.6.
0
-SNAPSHOT
</version>
<version>
0.6.
1
-SNAPSHOT
</version>
<description>
Partition service on IBM
</description>
<packaging>
jar
</packaging>
...
...
@@ -28,7 +28,7 @@
<dependency>
<groupId>
org.opengroup.osdu
</groupId>
<artifactId>
os-core-common
</artifactId>
<version>
0.3.
16
</version>
<version>
0.3.
28
</version>
</dependency>
<dependency>
<groupId>
org.opengroup.osdu
</groupId>
...
...
@@ -38,7 +38,7 @@
<dependency>
<groupId>
org.opengroup.osdu
</groupId>
<artifactId>
partition-core
</artifactId>
<version>
0.6.
0
-SNAPSHOT
</version>
<version>
0.6.
1
-SNAPSHOT
</version>
</dependency>
...
...
provider/partition-ibm/src/main/java/org/opengroup/osdu/partition/provider/ibm/security/EntitlementsClientFactory.java
View file @
5bc42245
...
...
@@ -3,9 +3,12 @@
package
org.opengroup.osdu.partition.provider.ibm.security
;
import
javax.inject.Inject
;
import
org.opengroup.osdu.core.common.entitlements.EntitlementsAPIConfig
;
import
org.opengroup.osdu.core.common.entitlements.EntitlementsFactory
;
import
org.opengroup.osdu.core.common.entitlements.IEntitlementsFactory
;
import
org.opengroup.osdu.core.common.http.json.HttpResponseBodyMapper
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.config.AbstractFactoryBean
;
import
org.springframework.stereotype.Component
;
...
...
@@ -19,6 +22,9 @@ public class EntitlementsClientFactory extends AbstractFactoryBean<IEntitlements
@Value
(
"${AUTHORIZE_API_KEY:}"
)
private
String
AUTHORIZE_API_KEY
;
@Inject
private
HttpResponseBodyMapper
httpResponseBodyMapper
;
@Override
protected
IEntitlementsFactory
createInstance
()
throws
Exception
{
...
...
@@ -26,7 +32,8 @@ public class EntitlementsClientFactory extends AbstractFactoryBean<IEntitlements
.
builder
()
.
rootUrl
(
AUTHORIZE_API
)
.
apiKey
(
AUTHORIZE_API_KEY
)
.
build
());
.
build
(),
httpResponseBodyMapper
);
}
@Override
...
...
testing/partition-test-aws/pom.xml
View file @
5bc42245
...
...
@@ -19,14 +19,14 @@
<parent>
<groupId>
org.opengroup.osdu
</groupId>
<artifactId>
os-partition-testing
</artifactId>
<version>
0.6.
0
-SNAPSHOT
</version>
<version>
0.6.
1
-SNAPSHOT
</version>
<relativePath>
../pom.xml
</relativePath>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
org.opengroup.osdu.partition
</groupId>
<artifactId>
partition-test-aws
</artifactId>
<version>
0.6.
0
-SNAPSHOT
</version>
<version>
0.6.
1
-SNAPSHOT
</version>
<packaging>
jar
</packaging>
<properties>
...
...
@@ -65,7 +65,7 @@
<dependency>
<groupId>
org.opengroup.osdu.partition
</groupId>
<artifactId>
partition-test-core
</artifactId>
<version>
0.6.
0
-SNAPSHOT
</version>
<version>
0.6.
1
-SNAPSHOT
</version>
</dependency>
<dependency>
...
...
testing/partition-test-azure/pom.xml
View file @
5bc42245
...
...
@@ -20,13 +20,13 @@
<parent>
<groupId>
org.opengroup.osdu
</groupId>
<artifactId>
os-partition-testing
</artifactId>
<version>
0.6.
0
-SNAPSHOT
</version>
<version>
0.6.
1
-SNAPSHOT
</version>
<relativePath>
../pom.xml
</relativePath>
</parent>
<groupId>
org.opengroup.osdu.partition
</groupId>
<artifactId>
partition-test-azure
</artifactId>
<version>
0.6.
0
-SNAPSHOT
</version>
<version>
0.6.
1
-SNAPSHOT
</version>
<packaging>
jar
</packaging>
<properties>
...
...
@@ -65,7 +65,7 @@
<dependency>
<groupId>
org.opengroup.osdu.partition
</groupId>
<artifactId>
partition-test-core
</artifactId>
<version>
0.6.
0
-SNAPSHOT
</version>
<version>
0.6.
1
-SNAPSHOT
</version>
</dependency>
<dependency>
...
...
testing/partition-test-core/pom.xml
View file @
5bc42245
...
...
@@ -20,13 +20,13 @@
<parent>
<groupId>
org.opengroup.osdu
</groupId>
<artifactId>
os-partition-testing
</artifactId>
<version>
0.6.
0
-SNAPSHOT
</version>
<version>
0.6.
1
-SNAPSHOT
</version>
<relativePath>
../pom.xml
</relativePath>
</parent>
<groupId>
org.opengroup.osdu.partition
</groupId>
<artifactId>
partition-test-core
</artifactId>
<version>
0.6.
0
-SNAPSHOT
</version>
<version>
0.6.
1
-SNAPSHOT
</version>
<packaging>
jar
</packaging>
<properties>
...
...
testing/partition-test-core/src/main/java/org/opengroup/osdu/partition/api/UpdatePartitionTest.java
View file @
5bc42245
...
...
@@ -69,17 +69,17 @@ public abstract class UpdatePartitionTest extends BaseTestTemplate {
ClientResponse
response
=
this
.
descriptor
.
runWithCustomPayload
(
this
.
getId
(),
getValidBodyForUpdatePartition
(),
this
.
testUtils
.
getAccessToken
());
deleteResource
();
assertEquals
(
response
.
getStatus
(),
HttpStatus
.
NO_CONTENT
.
value
());
assertEquals
(
"
[
GET, POST, PUT, DELETE, OPTIONS, HEAD, PATCH
]
"
,
response
.
getHeaders
().
getFirst
(
"Access-Control-Allow-Methods"
));
assertEquals
(
"
[
origin, content-type, accept, authorization, data-partition-id, correlation-id, appkey
]
"
,
response
.
getHeaders
().
getFirst
(
"Access-Control-Allow-Headers"
));
assertEquals
(
"
[*]
"
,
response
.
getHeaders
().
getFirst
(
"Access-Control-Allow-Origin"
));
assertEquals
(
"
[
true
]
"
,
response
.
getHeaders
().
getFirst
(
"Access-Control-Allow-Credentials"
));
assertEquals
(
"
[
default-src 'self'
]
"
,
response
.
getHeaders
().
getFirst
(
"Content-Security-Policy"
));
assertEquals
(
"
[
max-age=31536000; includeSubDomains
]
"
,
response
.
getHeaders
().
getFirst
(
"Strict-Transport-Security"
));
assertEquals
(
"
[0]
"
,
response
.
getHeaders
().
getFirst
(
"Expires"
));
assertEquals
(
"GET, POST, PUT, DELETE, OPTIONS, HEAD, PATCH"
,
response
.
getHeaders
().
getFirst
(
"Access-Control-Allow-Methods"
));
assertEquals
(
"origin, content-type, accept, authorization, data-partition-id, correlation-id, appkey"
,
response
.
getHeaders
().
getFirst
(
"Access-Control-Allow-Headers"
));
assertEquals
(
"
*
"
,
response
.
getHeaders
().
getFirst
(
"Access-Control-Allow-Origin"
));
assertEquals
(
"true"
,
response
.
getHeaders
().
getFirst
(
"Access-Control-Allow-Credentials"
));
assertEquals
(
"default-src 'self'"
,
response
.
getHeaders
().
getFirst
(
"Content-Security-Policy"
));
assertEquals
(
"max-age=31536000; includeSubDomains"
,
response
.
getHeaders
().
getFirst
(
"Strict-Transport-Security"
));
assertEquals
(
"
0
"
,
response
.
getHeaders
().
getFirst
(
"Expires"
));
assertEquals
(
"DENY"
,
response
.
getHeaders
().
getFirst
(
"X-Frame-Options"
));
assertEquals
(
"private, max-age=300"
,
response
.
getHeaders
().
getFirst
(
"Cache-Control"
));
assertEquals
(
"
[
1; mode=block
]
"
,
response
.
getHeaders
().
getFirst
(
"X-XSS-Protection"
));
assertEquals
(
"
[
nosniff
]
"
,
response
.
getHeaders
().
getFirst
(
"X-Content-Type-Options"
));
assertEquals
(
"1; mode=block"
,
response
.
getHeaders
().
getFirst
(
"X-XSS-Protection"
));
assertEquals
(
"nosniff"
,
response
.
getHeaders
().
getFirst
(
"X-Content-Type-Options"
));
}
private
String
getInvalidBodyForUpdatePartition
()
{
...
...
testing/partition-test-gcp/pom.xml
View file @
5bc42245
...
...
@@ -6,13 +6,13 @@
<parent>
<groupId>
org.opengroup.osdu
</groupId>
<artifactId>
os-partition-testing
</artifactId>
<version>
0.6.
0
-SNAPSHOT
</version>
<version>
0.6.
1
-SNAPSHOT
</version>
<relativePath>
../pom.xml
</relativePath>
</parent>
<groupId>
org.opengroup.osdu.partition
</groupId>
<artifactId>
partition-test-gcp
</artifactId>
<version>
0.6.
0
-SNAPSHOT
</version>
<version>
0.6.
1
-SNAPSHOT
</version>
<packaging>
jar
</packaging>
<properties>
...
...
@@ -57,7 +57,7 @@
<dependency>
<groupId>
org.opengroup.osdu.partition
</groupId>
<artifactId>
partition-test-core
</artifactId>
<version>
0.6.
0
-SNAPSHOT
</version>
<version>
0.6.
1
-SNAPSHOT
</version>
</dependency>
<dependency>
...
...
testing/partition-test-ibm/pom.xml
View file @
5bc42245
...
...
@@ -6,13 +6,13 @@
<parent>
<groupId>
org.opengroup.osdu
</groupId>
<artifactId>
os-partition-testing
</artifactId>
<version>
0.6.
0
-SNAPSHOT
</version>
<version>
0.6.
1
-SNAPSHOT
</version>
<relativePath>
../pom.xml
</relativePath>
</parent>
<groupId>
org.opengroup.osdu.partition
</groupId>
<artifactId>
partition-test-ibm
</artifactId>
<version>
0.6.
0
-SNAPSHOT
</version>
<version>
0.6.
1
-SNAPSHOT
</version>
<packaging>
jar
</packaging>
<properties>
...
...
@@ -58,7 +58,7 @@
<dependency>
<groupId>
org.opengroup.osdu.partition
</groupId>
<artifactId>
partition-test-core
</artifactId>
<version>
0.6.
0
-SNAPSHOT
</version>
<version>
0.6.
1
-SNAPSHOT
</version>
</dependency>
<dependency>
...
...
testing/pom.xml
View file @
5bc42245
...
...
@@ -18,7 +18,7 @@
<modelVersion>
4.0.0
</modelVersion>
<groupId>
org.opengroup.osdu
</groupId>
<artifactId>
os-partition-testing
</artifactId>
<version>
0.6.
0
-SNAPSHOT
</version>
<version>
0.6.
1
-SNAPSHOT
</version>
<description>
Root partition test project
</description>
<packaging>
pom
</packaging>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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