Skip to content

Commit

Permalink
Merge pull request #48 from Open-MBEE/release/4.0.9
Browse files Browse the repository at this point in the history
Release/4.0.9
  • Loading branch information
HuiJun authored Sep 1, 2022
2 parents f590a99 + d80b0ff commit f1a3129
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ services:
- elasticsearch
- minio
ports:
- 8080:8080
- 8080:8080
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
master_doc = 'index'

# The full version, including alpha/beta/rc tags
release = '4.0.0'
release = '4.0.9'


# -- General configuration ---------------------------------------------------
Expand Down
6 changes: 4 additions & 2 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,13 @@ LDAP Configuration
Storage Configuration
---------------------

If aws s3 environment is used and s3.access_key and s3.secret_key are not defined, credentials will be taken according to the `aws default credential provider chain <https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/credentials.html>`_.

s3.access_key
This is the access key for the S3 bucket. Required.
This is the access key for the S3 bucket. Required (Optional if using AWS).

s3.secret_key
This is the secret key for the S3 bucket. Required.
This is the secret key for the S3 bucket. Required (Optional if using AWS).

s3.region
This is the region that the S3 bucket is located in. Required.
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version=4.0.8b
version=4.0.9
group=org.openmbee.mms

mmsVersion=4.0.8
mmsVersion=4.0.9
springBootVersion=2.6.7
2 changes: 1 addition & 1 deletion openapi/api-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ info:
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.txt
version: 4.0.4
version: 4.0.9
contact:
name: OpenMBEE
url: http://openmbee.org
Expand Down
2 changes: 1 addition & 1 deletion openapi/doc-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"invokerPackage": "org.openmbee.mms",
"groupId": "org.openmbee.mms",
"artifactId": "mms-client",
"artifactVersion": "4.0.4"
"artifactVersion": "4.0.9"
}
2 changes: 1 addition & 1 deletion openapi/java-config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"groupId": "org.openmbee.mms",
"artifactId": "mms-java-client",
"artifactVersion": "4.0.4",
"artifactVersion": "4.0.9",
"artifactUrl": "https://github.com/Open-MBEE/mms",
"artifactDescription": "Java OpenAPI Client for MMS",
"library": "jersey2",
Expand Down
2 changes: 1 addition & 1 deletion openapi/python-config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"packageName": "mms_python_client",
"projectName": "mms-python-client",
"packageVersion": "4.0.4"
"packageVersion": "4.0.9"
}
2 changes: 1 addition & 1 deletion src/main/java/org/openmbee/mms/mmsri/MMSRIApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
@OpenAPIDefinition(
info = @Info(
title = "MMS Reference Implementation API",
version = "4.0.4",
version = "4.0.9",
description = "Documentation for MMS API",
license = @License(name = "Apache 2.0", url = "http://www.apache.org/licenses/LICENSE-2.0.txt")
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter implements
@Value("${mms.hsts.enabled:false}")
private boolean hsts;

@Value("${cors.allowed.origins:*}")
private String allowedOrigins;

@Autowired
AuthSecurityConfig authSecurityConfig;

Expand Down Expand Up @@ -77,14 +80,16 @@ public void addCorsMappings(CorsRegistry registry) {
.allowedMethods("*")
.allowCredentials(true)
.maxAge(3600L)
.allowedOriginPatterns("*");
.allowedOriginPatterns(allowedOrigins.split(","));
}

private CorsFilter corsFilter() {
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
CorsConfiguration config = new CorsConfiguration();
config.setAllowCredentials(true);
config.addAllowedOriginPattern("*");
for (String origin: allowedOrigins.split(",")) {
config.addAllowedOriginPattern(origin);
}
config.addAllowedHeader("*");
config.addAllowedMethod("*");
config.setMaxAge(3600L);
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/application.properties.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ mms.admin.username=test
mms.admin.password=test
mms.stream.batch.size=100000

cors.allowed.origins=*

# jwt issued by mms for logins via /authentication
jwt.secret=make_me_something_really_long
jwt.expiration=86400
Expand Down

0 comments on commit f1a3129

Please sign in to comment.