Skip to content

Commit

Permalink
Merge branch '3.8.0.release'
Browse files Browse the repository at this point in the history
  • Loading branch information
vlo-rte committed Jun 20, 2022
2 parents 323f522 + 01bd5bc commit eca3388
Show file tree
Hide file tree
Showing 510 changed files with 20,848 additions and 16,482 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,14 @@ jobs:
if: ${{ github.event.inputs.cypress == 'true' || github.event_name == 'schedule' || github.event_name == 'pull_request' || github.event_name == 'push' }}
run: ./CICD/github/launch_cypress_tests.sh ${{ github.event.inputs.cypressTestFiles }}

- name: Upload cypress screenshots
- name: Upload cypress screenshots and logs
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: src/test/cypress/cypress/screenshots

path: |
src/test/cypress/cypress/screenshots
opfab.log
publish:
runs-on: ubuntu-latest
environment: publishVersion
Expand Down
8 changes: 8 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"singleQuote": true,
"bracketSpacing": false,
"trailingComma": "none",
"tabWidth": 4,
"printWidth": 120,
"bracketSameLine": true
}
1 change: 1 addition & 0 deletions CICD/github/launch_cypress_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export NVM_DIR="$HOME/.nvm"
source ./bin/load_environment_light.sh;
cd config/docker
./docker-compose-cypress.sh
docker-compose logs --follow > ../../opfab.log &
cd ../../bin
./waitForOpfabToStart.sh
cd ../
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.7.0.RELEASE
3.8.0.RELEASE
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
plugins {
id "com.github.node-gradle.node" version "3.2.1"
id "com.github.node-gradle.node" version "3.3.0"
id "org.asciidoctor.jvm.convert" version "3.3.2"
id "maven-publish"
id "signing"
id "org.springframework.boot" version "$springBoot" apply false
id "io.spring.dependency-management" version "1.0.11.RELEASE" apply false
id 'org.sonarqube' version '3.3'
id 'org.sonarqube' version '3.4.0.2513'
id "com.github.davidmc24.gradle.plugin.avro" version "1.3.0" apply false
id "com.palantir.docker" version "0.33.0" apply false
id "org.hidetake.swagger.generator" version "2.19.2" apply false
Expand Down
2 changes: 2 additions & 0 deletions client/cards/src/main/avro/card.avdl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ protocol CardProtocol {
union {null, array<string>} entitiesRequiredToRespond = null;
union {null, array<string>} entityRecipients = null;
union {null, array<string>} entitiesAllowedToEdit = null;
union {null, string} wktGeometry = null;
union {null, string} wktProjection = null;
union {null, string} data = null;
union {null, boolean} hasBeenAcknowledged = null;
union {null, boolean} hasBeenRead = null;
Expand Down
2 changes: 2 additions & 0 deletions client/cards/src/main/avro/responseCard.avdl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ protocol ResponseCardProtocol {
union {null, array<string>} entitiesRequiredToRespond = null;
union {null, array<string>} entityRecipients = null;
union {null, array<string>} entitiesAllowedToEdit = null;
union {null, string} wktGeometry = null;
union {null, string} wktProjection = null;
union {null, string} data = null;
union {null, boolean} hasBeenAcknowledged = null;
union {null, boolean} hasBeenRead = null;
Expand Down
4 changes: 2 additions & 2 deletions config/dev/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ services:
- "90:9990"
web-ui:
container_name: web-ui
image: "lfeoperatorfabric/of-web-ui:3.7.0.RELEASE"
image: "lfeoperatorfabric/of-web-ui:3.8.0.RELEASE"
ports:
- "2002:80"
volumes:
Expand All @@ -38,7 +38,7 @@ services:
- "./loggingResults:/etc/nginx/html/logging"
ext-app:
container_name: external-app
image: "lfeoperatorfabric/of-external-app:3.7.0.RELEASE"
image: "lfeoperatorfabric/of-external-app:3.8.0.RELEASE"
ports:
- "8090:8090"
environment:
Expand Down
4 changes: 4 additions & 0 deletions config/dev/external-devices-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ operatorfabric:
host: localhost
port: 4030
signalMappingId: broken_CDS_mapping
- id: CDS_3
host: localhost
port: 4030
signalMappingId: default_CDS_mapping
signalMappings:
- id: default_CDS_mapping
supportedSignals:
Expand Down
18 changes: 9 additions & 9 deletions config/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ services:
# - "90:9990"
users:
container_name: users
image: "lfeoperatorfabric/of-users-service:3.7.0.RELEASE"
image: "lfeoperatorfabric/of-users-service:3.8.0.RELEASE"
depends_on:
- mongodb
- rabbitmq
Expand All @@ -59,7 +59,7 @@ services:
- ${CONFIG_PATH}:/external-config
businessconfig:
container_name: businessconfig
image: "lfeoperatorfabric/of-businessconfig-service:3.7.0.RELEASE"
image: "lfeoperatorfabric/of-businessconfig-service:3.8.0.RELEASE"
depends_on:
- mongodb
user: ${USER_ID}:${USER_GID}
Expand All @@ -77,7 +77,7 @@ services:
- ${CONFIG_PATH}:/external-config
cards-publication:
container_name: cards-publication
image: "lfeoperatorfabric/of-cards-publication-service:3.7.0.RELEASE"
image: "lfeoperatorfabric/of-cards-publication-service:3.8.0.RELEASE"
depends_on:
- mongodb
- rabbitmq
Expand All @@ -95,7 +95,7 @@ services:
- ${CONFIG_PATH}:/external-config
cards-consultation:
container_name: cards-consultation
image: "lfeoperatorfabric/of-cards-consultation-service:3.7.0.RELEASE"
image: "lfeoperatorfabric/of-cards-consultation-service:3.8.0.RELEASE"
depends_on:
- mongodb
- rabbitmq
Expand All @@ -113,7 +113,7 @@ services:
- ${CONFIG_PATH}:/external-config
web-ui:
container_name: web-ui
image: "lfeoperatorfabric/of-web-ui:3.7.0.RELEASE"
image: "lfeoperatorfabric/of-web-ui:3.8.0.RELEASE"
ports:
- "2002:80"
depends_on:
Expand All @@ -127,7 +127,7 @@ services:
# - "./custom-sounds:/usr/share/nginx/html/assets/sounds"
external-devices:
container_name: external-devices
image: "lfeoperatorfabric/of-external-devices-service:3.7.0.RELEASE"
image: "lfeoperatorfabric/of-external-devices-service:3.8.0.RELEASE"
depends_on:
- mongodb
- users
Expand All @@ -148,7 +148,7 @@ services:
# External application example
ext-app:
container_name: external-app
image: "lfeoperatorfabric/of-external-app:3.7.0.RELEASE"
image: "lfeoperatorfabric/of-external-app:3.8.0.RELEASE"
ports:
- "8090:8090"
environment:
Expand All @@ -161,7 +161,7 @@ services:
# Dummy external devices using Modbus Protocol
dummy-modbus-device_1:
container_name: dummy-modbus-device_1
image: "lfeoperatorfabric/of-dummy-modbus-device:3.7.0.RELEASE"
image: "lfeoperatorfabric/of-dummy-modbus-device:3.8.0.RELEASE"
user: ${USER_ID}:${USER_GID}
ports:
- "4031:4030"
Expand All @@ -174,7 +174,7 @@ services:
- ${CONFIG_PATH}:/external-config
dummy-modbus-device_2:
container_name: dummy-modbus-device_2
image: "lfeoperatorfabric/of-dummy-modbus-device:3.7.0.RELEASE"
image: "lfeoperatorfabric/of-dummy-modbus-device:3.8.0.RELEASE"
user: ${USER_ID}:${USER_GID}
ports:
- "4032:4030"
Expand Down
10 changes: 10 additions & 0 deletions config/docker/ui-config/web-ui.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"environmentColor": "blue",
"showUserEntitiesOnTopRightOfTheScreen": true,
"externalDevicesEnabled": true,
"selectActivityAreaOnLogin": false,
"settings.replayInterval": 10,
"settings.replayEnabled": true,
"archive": {
Expand Down Expand Up @@ -62,6 +63,15 @@
"Y"
]
},
"geomap": {
"enableMap": false,
"defaultDataProjection": "EPSG:4326",
"initialLongitude": 5.3255,
"initialLatitude": 52.1845,
"initialZoom": 6,
"maxZoom": 11,
"zoomDuration": 500
},
"enableGroupedCards": false
},
"i18n": {
Expand Down
24 changes: 12 additions & 12 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# spring libs
springBoot=2.6.7
springCloud=2021.0.2
springWebflux=5.3.19
springSecurity=5.6.3
springBoot=2.7.0
springCloud=2021.0.3
springWebflux=5.3.20
springSecurity=5.7.1
springRetry=1.3.3
springOpenFeign=3.1.2
springOpenFeign=3.1.3

# logging libs
slf4j=1.7.36
Expand All @@ -15,24 +15,24 @@ apacheCommonsCollections4=4.4
commonsIO=2.11.0
lombok=1.18.24
feign=11.8
jacksonAnnotations=2.13.2
jacksonDatabind=2.13.2.2
jacksonAnnotations=2.13.3
jacksonDatabind=2.13.3
kavroSchemaRegistryClient=7.1.1
kavroAvroSerializer=7.1.1
springKafka=2.8.5
micrometer=1.8.5
springKafka=2.8.6
micrometer=1.9.0
avro=1.11.0
apacheCommonsText=1.9

# testing libs
assertj=3.22.0
assertj=3.23.1
junit5=5.8.2
awaitility=4.2.0
karate=1.2.0
reactor=3.4.18
reactor=3.4.19

# code generators
swagger=2.4.27
swaggerUI=4.10.3
swaggerUI=4.11.1


Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2021, RTE (http://www.rte-france.com)
/* Copyright (c) 2018-2022, RTE (http://www.rte-france.com)
* See AUTHORS.txt
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -16,13 +16,14 @@
import org.opfab.springtools.configuration.oauth.WebSecurityChecks;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.convert.converter.Converter;
import org.springframework.http.HttpMethod;
import org.springframework.security.authentication.AbstractAuthenticationToken;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.oauth2.jwt.Jwt;
import org.springframework.security.web.SecurityFilterChain;

/**
* OAuth 2 http authentication configuration and access rules
Expand All @@ -31,7 +32,7 @@
*/
@Configuration
@Slf4j
public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {
public class WebSecurityConfiguration {

public static final String PROMETHEUS_PATH ="/actuator/prometheus**";
public static final String LOGGERS_PATH ="/actuator/loggers/**";
Expand All @@ -45,32 +46,31 @@ public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {

@Autowired
WebSecurityChecks webSecurityChecks;

@Autowired
private Converter<Jwt, AbstractAuthenticationToken> opfabJwtConverter;


@Override
public void configure(final HttpSecurity http) throws Exception {
@Bean
public SecurityFilterChain filterChain(HttpSecurity http,
Converter<Jwt, AbstractAuthenticationToken> opfabJwtConverter) throws Exception {
configureCommon(http);

http
.oauth2ResourceServer()
.jwt().jwtAuthenticationConverter(opfabJwtConverter);


return http.build();
}

public static void configureCommon(final HttpSecurity http) throws Exception {
http
.authorizeRequests()
.antMatchers(HttpMethod.GET,PROMETHEUS_PATH).permitAll()
.antMatchers(STYLE_URL_PATTERN).permitAll() // Style is called via <style> , so no token is provided (Static ressource)
.antMatchers(I18N_URL_PATTERN).permitAll() // To let it be called by CardPubblication when checkAuthenticationForCardSending if set to false
.antMatchers(HttpMethod.GET,PROMETHEUS_PATH).permitAll()
.antMatchers(STYLE_URL_PATTERN).permitAll() // Style is called via <style>, so no token is provided (Static resource)
.antMatchers(I18N_URL_PATTERN).permitAll() // To let it be called by CardPublication when checkAuthenticationForCardSending is set to false
.antMatchers(HttpMethod.POST, THIRDS_PATH).access(ADMIN_AND_IP_ALLOWED)
.antMatchers(HttpMethod.PUT, THIRDS_PATH).access(ADMIN_AND_IP_ALLOWED)
.antMatchers(HttpMethod.DELETE, THIRDS_PATH).access(ADMIN_AND_IP_ALLOWED)
.antMatchers(LOGGERS_PATH).hasRole(ADMIN_ROLE)
.anyRequest().access(AUTH_AND_IP_ALLOWED)
;

.anyRequest().access(AUTH_AND_IP_ALLOWED);
}

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2021, RTE (http://www.rte-france.com)
/* Copyright (c) 2018-2022, RTE (http://www.rte-france.com)
* See AUTHORS.txt
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -10,6 +10,7 @@

package org.opfab.businessconfig.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.*;
import lombok.extern.slf4j.Slf4j;

Expand All @@ -27,6 +28,7 @@
@AllArgsConstructor
@Builder
@Slf4j
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class ProcessData implements Process {

private String id;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2021, RTE (http://www.rte-france.com)
/* Copyright (c) 2018-2022, RTE (http://www.rte-france.com)
* See AUTHORS.txt
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -10,6 +10,7 @@

package org.opfab.businessconfig.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
Expand All @@ -29,6 +30,7 @@
@AllArgsConstructor
@Builder
@Slf4j
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class ProcessGroupData implements ProcessGroup {

private String id;
Expand Down
Loading

0 comments on commit eca3388

Please sign in to comment.