Skip to content

Commit b3384d9

Browse files
author
Dennis Labordus
authored
Merge pull request #68 from com-pas/develop
New release
2 parents efe2583 + 8b1200b commit b3384d9

File tree

7 files changed

+43
-19
lines changed

7 files changed

+43
-19
lines changed

.github/workflows/build-project.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
steps:
2323
- name: Checkout
24-
uses: actions/checkout@v2
24+
uses: actions/checkout@v3
2525
- name: Set up Docker Buildx
2626
id: buildx
2727
uses: docker/setup-buildx-action@v1
@@ -38,7 +38,7 @@ jobs:
3838
restore-keys: ${{ runner.os }}-m2
3939

4040
- name: Set up JDK 1.11
41-
uses: actions/setup-java@v2.5.0
41+
uses: actions/setup-java@v3.0.0
4242
with:
4343
distribution: 'zulu'
4444
java-version: '11'

.github/workflows/release-project.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v2
18+
uses: actions/checkout@v3
1919
- name: Set up Docker Buildx
2020
id: buildx
2121
uses: docker/setup-buildx-action@v1
@@ -42,7 +42,7 @@ jobs:
4242
# Extra the tagname form the git reference, value of GITHUB_REF will be something like refs/tags/<tag_name>.
4343
run: echo "##[set-output name=tagname;]$(echo ${GITHUB_REF##*/})"
4444
- name: Set up JDK 1.11
45-
uses: actions/setup-java@v2.5.0
45+
uses: actions/setup-java@v3.0.0
4646
with:
4747
distribution: 'zulu'
4848
java-version: '11'

.github/workflows/reuse.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v2
14+
uses: actions/checkout@v3
1515
- name: REUSE Compliance Check
1616
uses: fsfe/reuse-action@v1

.github/workflows/sonarcloud-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ jobs:
2626
if: ${{ (github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]') || (github.actor == 'dependabot[bot]' && github.event_name == 'pull_request_target') }}
2727
steps:
2828
- name: Checkout
29-
uses: actions/checkout@v2
29+
uses: actions/checkout@v3
3030
with:
3131
fetch-depth: 0
3232

3333
- name: Set up JDK 1.11
34-
uses: actions/setup-java@v2.5.0
34+
uses: actions/setup-java@v3.0.0
3535
with:
3636
distribution: 'zulu'
3737
java-version: '11'

README.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ SPDX-License-Identifier: Apache-2.0
1616
You can run your application in dev mode that enables live coding using:
1717

1818
```shell script
19-
./mvnw package io.quarkus:quarkus-maven-plugin:2.4.1.Final:dev
19+
./mvnw package io.quarkus:quarkus-maven-plugin::dev
2020
```
2121

2222
> **_NOTE:_** Quarkus now ships with a Dev UI, which is available in dev mode only at http://localhost:8080/q/dev/.
@@ -29,8 +29,8 @@ The application can be packaged using:
2929
./mvnw package
3030
```
3131

32-
It produces the `quarkus-run.jar` file in the `app/target/quarkus-app/` directory. Be aware that it’s not an _über-jar_ as
33-
the dependencies are copied into the `app/target/quarkus-app/lib/` directory.
32+
It produces the `quarkus-run.jar` file in the `app/target/quarkus-app/` directory. Be aware that it’s not an _über-jar_
33+
as the dependencies are copied into the `app/target/quarkus-app/lib/` directory.
3434

3535
If you want to build an _über-jar_, execute the following command:
3636

@@ -56,5 +56,28 @@ Or, if you don't have GraalVM installed, you can run the native executable build
5656

5757
You can then execute your native executable with: `./app/target/code-with-quarkus-local-SNAPSHOT-runner`
5858

59-
If you want to learn more about building native executables, please consult https://quarkus.io/guides/maven-tooling.html.
59+
If you want to learn more about building native executables, please consult https://quarkus.io/guides/maven-tooling.html
60+
.
6061

62+
## Environment variables
63+
64+
Below environment variable(s) can be used to configure which claims are used to fill user information, for instance Who
65+
in History Record.
66+
67+
| Environment variable | Java Property | Description | Example |
68+
|------------------------|-------------------------------|-----------------------------------------------|---------|
69+
| USERINFO_WHO_CLAIMNAME | compas.userinfo.who.claimname | The Name of the user used in the Who History. | name |
70+
71+
## Security
72+
73+
To use most of the endpoints the users needs to be authenticated using JWT in the authorization header. There are 4
74+
environment variables that can be set in the container to configure the validation/processing of the JWT.
75+
76+
| Environment variable | Java Property | Description | Example |
77+
|----------------------|----------------------------------|----------------------------------------------------|------------------------------------------------------------------------|
78+
| JWT_VERIFY_KEY | smallrye.jwt.verify.key.location | Location of certificates to verify the JWT. | http://localhost:8089/auth/realms/compas/protocol/openid-connect/certs |
79+
| JWT_VERIFY_ISSUER | mp.jwt.verify.issuer | The issuer of the JWT. | http://localhost:8089/auth/realms/compas |
80+
| JWT_VERIFY_CLIENT_ID | mp.jwt.verify.audiences | The Client ID that should be in the "aud" claim. | scl-auto-alignment |
81+
| JWT_GROUPS_PATH | smallrye.jwt.path.groups | The JSON Path where to find the roles of the user. | resource_access/scl-auto-alignment/roles |
82+
83+
There are no roles defined in this service, only need to be authenticated.

pom.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ SPDX-License-Identifier: Apache-2.0
2020
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2121
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
2222

23-
<compiler-plugin.version>3.9.0</compiler-plugin.version>
23+
<compiler-plugin.version>3.10.1</compiler-plugin.version>
2424
<surefire-plugin.version>3.0.0-M5</surefire-plugin.version>
2525
<sonarqube-plugin.version>3.2.0</sonarqube-plugin.version>
2626

27-
<compas.core.version>0.7.0</compas.core.version>
27+
<compas.core.version>0.8.0</compas.core.version>
2828

29-
<quarkus.platform.version>2.7.0.Final</quarkus.platform.version>
30-
<slf4j.version>1.7.35</slf4j.version>
31-
<powsybl.sld.version>2.7.0</powsybl.sld.version>
32-
<gson.version>2.8.9</gson.version>
29+
<quarkus.platform.version>2.7.5.Final</quarkus.platform.version>
30+
<slf4j.version>1.7.36</slf4j.version>
31+
<powsybl.sld.version>2.9.0</powsybl.sld.version>
32+
<gson.version>2.9.0</gson.version>
3333
<openpojo.version>0.9.1</openpojo.version>
3434
</properties>
3535

@@ -230,7 +230,7 @@ SPDX-License-Identifier: Apache-2.0
230230
<plugin>
231231
<groupId>org.apache.maven.plugins</groupId>
232232
<artifactId>maven-javadoc-plugin</artifactId>
233-
<version>3.3.1</version>
233+
<version>3.3.2</version>
234234
<executions>
235235
<execution>
236236
<id>attach-javadocs</id>

service/src/main/java/org/lfenergy/compas/scl/auto/alignment/builder/SubstationGraphBuilder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ private void createPowerTransformer(GenericPowerTransformer powerTransformer) {
8282
getFeeder3WTLegNode(tws.get(2)),
8383
getVoltageLevelBuilder(tws.get(0)).getGraph().getVoltageLevelInfos(),
8484
getVoltageLevelBuilder(tws.get(1)).getGraph().getVoltageLevelInfos(),
85-
getVoltageLevelBuilder(tws.get(2)).getGraph().getVoltageLevelInfos()));
85+
getVoltageLevelBuilder(tws.get(2)).getGraph().getVoltageLevelInfos(),
86+
false));
8687
}
8788
}
8889

0 commit comments

Comments
 (0)