radar-covid-backend-configuration-server 正在参加 2021 年度 OSC 中国开源项目评选,请投票支持!
radar-covid-backend-configuration-server 在 2021 年度 OSC 中国开源项目评选 中已获得 {{ projectVoteCount }} 票,请投票支持!
2021 年度 OSC 中国开源项目评选 正在火热进行中,快来投票支持你喜欢的开源项目!
2021 年度 OSC 中国开源项目评选 >>> 中场回顾
radar-covid-backend-configuration-server 获得 2021 年度 OSC 中国开源项目评选「最佳人气项目」 !
授权协议 MPL-2.0 License
开发语言 Java
操作系统 跨平台
软件类型 开源软件
所属分类 Web应用开发
开源组织
地区 不详
投 递 者 首席测试
适用人群 未知
收录时间 2021-11-05

软件简介

RadarCOVID Configuration Service

Introduction

Configuration Service in terms of the Radar COVID project enables:

  • Getting exposition settings to be used by apps.
  • Getting internationalized texts.
  • Getting list of Autonomous Communities and their information.
  • Getting languages available: es-ES, ca-ES, en-US,...
  • Getting countries of interest available: DE, AT, DK, IT,...

Prerequisites

These are the frameworks and tools used to develop the solution:

Contentful is also used as content platform to manage literals for the different languages, etc.

Installation and Getting Started

Building from Source

To build the project, you need to run this command:

mvn clean package -P <environment>

Where <environment> has these possible values:

  • local-env. To run the application from local (eg, from IDE o from Maven using mvn spring-boot:run). It is the default profile, using application.yml configuration file. If any properties need to be modified, you can create application-local.yml configuration file.
  • docker-env. To run the application in a Docker container with docker-compose, using application.yml configuration file. If any properties need to be modified, you can create application-docker.yml configuration file.
  • pre-env. To run the application in the Preproduction environment. Preproduction environment properties are configured in the infrastructure.
  • pro-env. To run the application in the Production environment. Production environment properties are configured in the infrastructure

The project also uses Maven profile aws-env to include dependencies when it is running on AWS environment, so the compilation command for Preproduction and Production environments would be:

mvn clean package -P pre-env,aws-env
mvn clean package -P pro-env,aws-env

All profiles will load the default configuration.

Running the Project

Depends on the environment you selected when you built the project, you can run the project:

  • From the IDE, if you selected local-env environment (or you didn't select any Maven profile).
  • From Docker. Once you build the project, you will have in configuration-server-boot/target/docker the files you would need to run the application from a container (Dockerfile and the Spring Boot fat-jar).

If you want to run the application inside a Docker container in local, once you built it, you should run:

docker-compose up -d postgres
docker-compose up -d backend

Database

This project doesn't use either Liquibase or Flyway because:

  1. DB-Admins should only have database privileges to maintain the database model (DDL).
  2. Applications should only have privileges to maintain the data (DML).

Because of this, there are two scripts:

API Documentation

Along with the application there comes with OpenAPI Specification, which you can access in your web browser when the Verification Service is running (unless in Production environment, where it is inactive by default):

<base-url>/openapi/api-docs

You can download the YAML version in /openapi/api-docs.yaml

If running in local, you can get:

Endpoints

Endpoint Description Default values Sample response
/masterData/ccaa?locale=<locale>[&additionalInfo=<additionalInfo>&platform=<platform>&version=<platformVersion>] Get Autonomous Communities available locale=es-ES
additionalInfo=false
Response with additionalInfo=true:
response-masterData-ccaa-additionalInfo.json
/masterData/locales?locale=<locale>[&platform=<platform>&version=<platformVersion>] Get locales available locale=es-ES response-masterData-locales.json
/masterData/countries?locale=<locale>[&platform=<platform>&version=<platformVersion>] Get countries available locale=es-ES response-masterData-countries.json
/settings Get application settings response-settings.json
/texts?ccaa=<ccaa>[&locale=<locale>&platform=<platform>&version=<platformVersion>] Get texts by locale and Autonomous Community ccaa=ES
locale=es-ES
Response with default parameters.
response-texts.json

NOTE: The sample responses are using default parameters so returns are in castellano. The real information is not in a JSON file; as we said before, we use Contentful to maintain the languages, texts, etc.

Modules

Configuration Service has four modules:

  • configuration-server-parent. Parent Maven project to define dependencies and plugins.
  • configuration-server-api. DTOs exposed.
  • configuration-server-boot. Main application, global configurations and properties. This module also has integration tests and Java architecture tests with ArchUnit.
  • configuration-server-service. Business and data layers.

Support and Feedback

The following channels are available for discussions, feedback, and support requests:

Type Channel
Issues

Contribute

If you want to contribute with this exciting project follow the steps in How to create a Pull Request in GitHub.

More details in CONTRIBUTING.md.

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.

展开阅读全文

代码

评论

点击引领话题📣 发布并加入讨论🔥
暂无内容
发表了博客
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
发表了问答
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
VMware Spring Security 权限许可和访问控制问题漏洞
权限、特权和访问控制
VMware Spring Security是美国威睿(Vmware)公司的一套为基于Spring的应用程序提供说明性安全保护的安全框架。 VMware Spring Security 中存在权限许可和访问控制问题漏洞。该漏洞源于攻击者可以通过Spring Security的多个SecurityContext更改绕过限制,以提升其权限。以下产品及版本受到影响:Spring Security 5.4.0 至 5.4.3 版本, Spring Security 5.3.0.RELEASE 至 5.3.7.RELEASE 版本, Spring Security 5.2.0.RELEASE 至 5.2.8.RELEASE 版本。
CVE-2021-22112 MPS-2021-2094
2022-08-08 20:51
Apache Tomcat 信息泄露漏洞
Apache Tomcat是美国阿帕奇(Apache)基金会的一款轻量级Web应用服务器。 Apache Tomcat存在信息泄露漏洞,该漏洞源于可以在响应新的 h2c 连接请求时复制请求头和数量有限的请求体,这意味着用户a和用户B都可以看到用户a的请求结果。
CVE-2021-25122 MPS-2021-2309
2022-08-08 20:51
Apache Tomcat 安全漏洞
输入验证不恰当
Apache Tomcat是美国阿帕奇(Apache)基金会的一款轻量级Web应用服务器。该程序实现了对Servlet和JavaServer Page(JSP)的支持。 Apache Tomcat 存在安全漏洞,该漏洞源于程序处理某些 TLS 数据包时存在无限循环,远程攻击者可以向应用程序发送特制的数据包,消耗所有可用的系统资源并导致拒绝服务条件。
CVE-2021-41079 MPS-2021-31848
2022-08-08 20:51
Spring Framework 输入验证错误漏洞
整数溢出或超界折返
Spring Security 5.5.7 之前的版本 5.5.x、5.6.4 之前的 5.6.x 以及更早的不受支持的版本包含整数溢出漏洞。当使用具有最大工作因子 (31) 的 BCrypt 类时,由于整数溢出错误,编码器不会执行任何盐轮。默认设置不受此 CVE 影响。
CVE-2022-22976 MPS-2022-1106
2022-08-08 20:51
spring-beans 远程代码执行漏洞(Spring4Shell)
表达式注入
spring-beans 负责实现 Spring 框架的 IOC 模块。 CVE-2010-1622 中曾出现由于参数自动绑定机制导致的问题, 通过黑名单的方式修复了该漏洞,但是 JDK9之后引入了 Module,使得可以通过 getModule 绕过前者的黑名单限制,导致远程代码执行。 org.springframework:spring-beans的5.3.0 至 5.3.17、5.2.0.RELEASE 至 5.2.19.RELEASE 版本都受到影响。
CVE-2022-22965 MPS-2022-6820
2022-08-08 20:51
Vmware Spring Framework 注入漏洞
输入验证不恰当
Vmware Spring Framework是美国威睿(Vmware)公司的一套开源的Java、JavaEE应用程序框架。该框架可帮助开发人员构建高质量的应用。 Spring Framework 存在注入漏洞,该漏洞源于通过日志注入绕过 Spring Framework 的访问限制,以更改数据。
CVE-2021-22096 MPS-2021-18890
2022-08-08 20:51
Apache Tomcat 信息泄露漏洞
信息暴露
Apache Tomcat是美国阿帕奇(Apache)基金会的一款轻量级Web应用服务器。 Apache Tomcat的漏洞版本中,使用 NTFS 文件系统从网络位置提供资源时,某些配置中容易受到 JSP 源代码泄露的影响,从而导致信息泄露
CVE-2021-24122 MPS-2021-1722
2022-08-08 20:51
Vmware Spring Framework存在未明漏洞
输入验证不恰当
Vmware Spring Framework是美国威睿(Vmware)公司的一套开源的Java、JavaEE应用程序框架。该框架可帮助开发人员构建高质量的应用。Vmware Spring Framework存在安全漏洞,攻击者可利用该漏洞通过日志注入绕过Spring框架的访问限制从而修改数据。
CVE-2021-22060 MPS-2021-18854
2022-08-08 20:51
Apache Log4j 安全漏洞
Apache Log4j是美国阿帕奇(Apache)基金会的一款基于Java的开源日志记录工具。当配置使用带有 JNDI LDAP数据源URI的JDBC Appender时,导致使用者容易受到远程代码执行 (RCE) 攻击,从而攻击者会控制目标 LDAP 服务器。
CVE-2021-44832 MPS-2021-38327
2022-08-08 20:51
Jakarta Expression Language 输入验证错误漏洞
表达式注入
Jakarta Expression Language是Jakarta项目的一种语言。提供了一种重要的机制,使表示层(网页)能够与应用程序逻辑(托管Bean)进行通信。 Jakarta Expression Language implementation 3.0.3版本及之前存在安全漏洞,该漏洞源于程序中的一个bug使无效的EL表达式能够被当作有效的表达式来计算。
CVE-2021-28170 MPS-2021-7671
2022-08-08 20:51
Apache Tomcat 环境问题漏洞
HTTP请求的解释不一致性(HTTP请求私运)
Apache Tomcat是美国阿帕奇(Apache)基金会的一款轻量级Web应用服务器。该程序实现了对Servlet和JavaServer Page(JSP)的支持。 Apache Tomcat存在环境问题漏洞,该漏洞源于Apache Tomcat 在某些情况下没有正确解析 HTTP 传输编码请求标头,导致在与反向代理一起使用时可能会请求走私。
CVE-2021-33037 MPS-2021-9711
2022-08-08 20:51
Apache Tomcat 信息泄露漏洞
信息暴露
Apache Tomcat是美国阿帕奇(Apache)基金会的一款轻量级Web应用服务器。 Apache Tomcat 存在信息泄露漏洞,该漏洞源于可以重用HTTP 2连接上接收到的前一个流的HTTP请求头值,用于与后续流相关联的请求。虽然这很可能会导致错误和HTTP 2连接的关闭,但信息可能会在请求之间泄漏。
CVE-2020-17527 MPS-2020-17486
2022-08-08 20:51
quarkus初始化不恰当漏洞
初始化不恰当
pgjdbc 是官方的 PostgreSQL JDBC 驱动程序。在进行安全研究时,在 postgresql 数据库的 jdbc 驱动程序中发现了一个安全漏洞。当攻击者控制 jdbc url 或属性时,使用 postgresql 库的系统将受到攻击。 pgjdbc 根据通过 `authenticationPluginClassName`、`sslhostnameverifier`、`socketFactory`、`sslfactory`、`sslpasswordcallback` 连接属性提供的类名实例化插件实例。但是,驱动程序在实例化类之前没有验证类是否实现了预期的接口。这可能导致通过任意类加载代码执行。建议使用插件的用户升级。此问题没有已知的解决方法。
CVE-2022-21724 MPS-2021-37082
2022-08-08 20:51
Spring Framework权限许可和访问控制问题漏洞
特权管理不恰当
在 Spring Framework 中,5.2.x 5.2.15 之前的版本和 5.3.7 之前的 5.3.7 版本中,WebFlux 应用程序容易受到权限提升的影响:通过(重新)创建临时存储目录,本地经过身份验证的恶意用户可以读取或修改已上传到 WebFlux 应用程序的文件,或用多部分请求数据覆盖任意文件。
CVE-2021-22118 MPS-2021-7485
2022-08-08 20:51
com.fasterxml.jackson.core:jackson-databind 存在拒绝服务漏洞
拒绝服务
com.fasterxml.jackson.core:jackson-databind 是一个库,其中包含Jackson Data Processor的通用数据绑定功能和树模型。当使用 JDK 序列化来序列化和反序列化 JsonNode 值时,此包的受影响版本容易受到拒绝服务 (DoS) 的攻击。
MPS-2022-12500
2022-08-08 20:51
org.webjars:swagger-ui 存在关键信息的UI错误表达漏洞
关键信息的UI错误表达
org.webjars:swagger-ui 是 Swagger UI npm 库的 WebJar。此软件包的受影响版本易受用户界面 (UI) 通过 ?url 参数错误表示关键信息的影响,该参数旨在允许显示远程 OpenAPI 定义。此功能可能会给托管自己的 SwaggerUI 实例的用户带来风险。特别是,包括远程 OpenAPI 定义会通过滥用自托管实例的可信名称/域来打开网络钓鱼攻击的载体。
MPS-2022-12573
2022-08-08 20:51
Red Hat Hibernate ORM SQL注入漏洞
SQL注入
在 5.4.23.Final 之前的版本(包括 5.4.23.Final)中,在 hibernate-core 中发现了一个缺陷。当查询的 SQL 注释中使用文字时,JPA Criteria API 实现中的 SQL 注入可能允许未经处理的文字。此漏洞可能允许攻击者访问未经授权的信息或可能进行进一步的攻击。此漏洞的最大威胁是数据机密性和完整性。
CVE-2020-25638 MPS-2020-16768
2022-08-08 20:51
Apache Tomcat 安全漏洞
Apache Tomcat是美国阿帕奇(Apache)基金会的一款轻量级Web应用服务器。该程序实现了对Servlet和JavaServer Page(JSP)的支持。 Apache Tomcat存在安全漏洞,漏洞版本中对于Tomcat实例仍然容易受到CVE-2020-9494的攻击。
CVE-2021-25329 MPS-2021-2466
2022-08-08 20:51
Vmware Spring Framework 安全特征问题漏洞
大小写敏感处理不恰当
Vmware Spring Framework是美国威睿(Vmware)公司的一套开源的Java、JavaEE应用程序框架。 Vmware Spring Framework的disallowedFields 模式区分大小写,这意味着除非字段同时列出字段的第一个字符小写,包括属性路径中所有嵌套字段的第一个字符的大写和小写,否则远程攻击者利用该漏洞可以绕过实施的安全限制。
CVE-2022-22968 MPS-2022-1098
2022-08-08 20:51
Apache Tomcat 安全漏洞
检查时间与使用时间(TOCTOU)的竞争条件
针对错误 CVE-2020-9484 的修复在 Apache Tomcat 10.1.0-M1 至 10.1.0-M8、10.0.0-M5 至 10.0.14、9.0.35 至 9.0 中引入了检查时间、使用时间漏洞。 56 和 8.5.55 到 8.5.73 允许本地攻击者以 Tomcat 进程正在使用的用户的权限执行操作。仅当 Tomcat 配置为使用 FileStore 持久化会话时,此问题才可利用。
CVE-2022-23181 MPS-2022-1351
2022-08-08 20:51
没有更多内容
加载失败,请刷新页面
点击加载更多
加载中
下一页
0 评论
0 收藏
分享
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部