Skip to content

Commit

Permalink
Merge pull request #1799 from nordic-institute/XRDDEV-2468
Browse files Browse the repository at this point in the history
XRDDEV-2468 Akka migration to gRPC
  • Loading branch information
ricardas-buc authored Oct 20, 2023
2 parents 58c9f50 + 32aa8ff commit ceaf390
Show file tree
Hide file tree
Showing 503 changed files with 10,002 additions and 11,404 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ legacy/lib/
.settings
*.rpm
.vagrant/
gradle-cache
**/.DS_Store
6 changes: 6 additions & 0 deletions Docker/centralserver/files/cs-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,10 @@ log "Making sure that token pin policy is enforced by default"
if ! crudini --get /etc/xroad/conf.d/local.ini signer enforce-token-pin-policy &>/dev/null; then
crudini --set /etc/xroad/conf.d/local.ini signer enforce-token-pin-policy "true"
fi

#initialize transport keys
mkdir -p -m0750 /var/run/xroad
chown xroad:xroad /var/run/xroad
su - xroad -c sh -c /usr/share/xroad/scripts/xroad-base.sh

exec /usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf
5 changes: 5 additions & 0 deletions Docker/securityserver/files/ss-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,9 @@ then
unset XROAD_TOKEN_PIN
fi

#initialize transport keys
mkdir -p -m0750 /var/run/xroad
chown xroad:xroad /var/run/xroad
su - xroad -c sh -c /usr/share/xroad/scripts/xroad-base.sh

exec /usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**Technical Specification** <!-- omit in toc -->

Version: 1.15
Version: 1.16
01.06.2023
<!-- 15 pages -->
Doc. ID: ARC-SS
Expand Down Expand Up @@ -35,6 +35,7 @@ Doc. ID: ARC-SS
| 03.05.2022 | 1.13 | Update `xroad-addon-messagelog` process section | Petteri Kivimäki |
| 01.06.2023 | 1.14 | Update references | Petteri Kivimäki |
| 20.06.2023 | 1.15 | Fixed Security Server Admin API OpenAPI specification link | Madis Loitmaa |
| 03.10.2023 | 1.16 | Remove Akka references | Ričardas Bučiūnas |

## Table of Contents <!-- omit in toc -->

Expand Down Expand Up @@ -332,13 +333,13 @@ The SSCD needs to be a PKCS \#11 (see \[[PKCS11](#Ref_PKCS11)\]) compliant hardw

### 2.13 Environmental Monitoring Service

Provides methods that can be used by X-Road participants to get environmental data of the security server. It requests the data from the local monitoring service via Akka interface and translates it to a SOAP XML response.
Provides methods that can be used by X-Road participants to get environmental data of the security server. It requests the data from the local monitoring service via gRPC interface and translates it to a SOAP XML response.

The component is a proxy addon.

### 2.14 Monitor

Monitor component collects environmental monitoring information such as running processes, available disk space, installed packages etc. The monitoring data is published via Akka and (optional) JMX interfaces.
Monitor component collects environmental monitoring information such as running processes, available disk space, installed packages etc. The monitoring data is published via gRPC and (optional) JMX interfaces.

The component is a separate daemon process.

Expand Down
13 changes: 7 additions & 6 deletions doc/Architecture/arc-tec_x-road_technologies.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**Technical Specification**

Version: 1.10<br/>
Version: 1.11<br/>
05.10.2023
<!-- 3 pages -->
Doc. ID: ARC-TEC
Expand All @@ -24,6 +24,7 @@ Doc. ID: ARC-TEC
| 26.09.2022 | 1.8 | Remove Ubuntu 18.04 support | Andres Rosenthal |
| 08.06.2023 | 1.9 | Central Server technologies update | Justas Samuolis |
| 05.10.2023 | 1.10 | Update to Java 17 | Justas Samuolis |
| 04.10.2023 | 1.11 | Remove Akka references | Ričardas Bučiūnas |

## Table of Contents

Expand Down Expand Up @@ -81,7 +82,7 @@ Table 1. Technology matrix of the X-Road
| Java 17 | X | X | X | X |
| C | X | X | | |
| Logback | X | X | X | X |
| Akka 2 | X | X | X | X |
| gRPC | X | X | X | X |
| Jetty 9 | X\[[3](#Ref_3)\] | X\[[4](#Ref_4)\] | | |
| Ubuntu 20.04 | X | X | X | X |
| Ubuntu 22.04 | X | X | X | X |
Expand Down Expand Up @@ -129,7 +130,7 @@ Table 2. Technology matrix of the Central Server
| Java 17 | X | | X | | | X | | X |
| C | | X | | | | | | |
| Logback | X | | X | | | X | | X |
| Akka 2 | X | | | | | X | | |
| gRPC | X | | | | | X | | |
| Embedded Jetty 9 | | | X | | | | | |
| Embedded Tomcat 9 | | | | | | X | | |
| Spring Boot 2 | | | X | | | X | | |
Expand Down Expand Up @@ -165,7 +166,7 @@ Table 3. Technology matrix of the configuration proxy
|--------------------------|:--------------:|:---------------------------:|:----------:|:------------------------:|
| Java 17 | | X | X | X |
| Logback | | X | X | X |
| Akka 2 | | X | X | |
| gRPC | | X | X | |
| nginx | X | | | |
| systemd | X | X | X | X |
| PKCS \#11\[[2](#Ref_2)\] | | | X | |
Expand All @@ -187,7 +188,7 @@ Table 4. Technology matrix of the Security Server
| Java 17 | X | X | | X | X | | X | | X | X | X | X | X |
| C | | | X | | | | | | | | | | |
| Logback | X | X | | X | X | | X | | X | | X | X | X |
| Akka 2 | X | X | | X | | | | | X | X | X | X | |
| gRPC | X | X | | X | | | | | X | X | X | X | |
| Embedded Jetty 9 | | X | | | | | | | | | | | |
| Javascript | | | | | | | | X | | | | | |
| PostgreSQL 9+\[[3](#Ref_3)\] | | | | | | X | | | X | | | | |
Expand Down Expand Up @@ -225,7 +226,7 @@ Table 5. Technology matrix of the operational monitoring daemon
|:-----------------------------|:------------------------:|:---------------------:|:--------------------:|:------------------------:|
| Java 17 | X | X | X | X |
| Logback | X | X | X | X |
| Akka 2 | X | X | | |
| gRPC | X | X | | |
| PostgreSQL 9+\[[1](#Ref_1)\] | X | X | | |
| Liquibase 3 | X | X | | |
| Dropwizard Metrics 4 | X | X | | |
Expand Down
31 changes: 16 additions & 15 deletions doc/EnvironmentalMonitoring/Monitoring-architecture.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
# X-Road: Environmental Monitoring Architecture

Version: 1.9
Version: 1.10
Doc. ID: ARC-ENVMON

| Date | Version | Description | Author |
|------------|---------|-----------------------------------------------------------------------------------------------------------------|--------------------|
| 15.12.2015 | 1.0 | Initial version | Ilkka Seppälä |
| 04.01.2017 | 1.1 | Fix documentation links | Ilkka Seppälä |
| 20.01.2017 | 1.2 | Added license text, table of contents and version history | Sami Kallio |
| 23.2.2017 | 1.3 | Added reference to the Security Server targeting extension and moved the modified X-Road protocol details there | Olli Lindgren |
| 18.8.2017 | 1.4 | Added details about the security server certificates monitoring data | Olli Lindgren |
| 18.10.2017 | 1.5 | | Joni Laurila |
| 02.03.2018 | 1.6 | Added numbering, terms document references, removed unnecessary anchors | Tatu Repo
| 20.01.2020 | 1.7 | Update XroadProcessLister description | Jarkko Hyöty
| 25.06.2020 | 1.8 | Add chapter [2.2.1 JMX interface](#221-jmx-interface) | Petteri Kivimäki
| 01.06.2023 | 1.9 | Update references | Petteri Kivimäki |
| Date | Version | Description | Author |
|------------|---------|-----------------------------------------------------------------------------------------------------------------|-------------------|
| 15.12.2015 | 1.0 | Initial version | Ilkka Seppälä |
| 04.01.2017 | 1.1 | Fix documentation links | Ilkka Seppälä |
| 20.01.2017 | 1.2 | Added license text, table of contents and version history | Sami Kallio |
| 23.2.2017 | 1.3 | Added reference to the Security Server targeting extension and moved the modified X-Road protocol details there | Olli Lindgren |
| 18.8.2017 | 1.4 | Added details about the security server certificates monitoring data | Olli Lindgren |
| 18.10.2017 | 1.5 | | Joni Laurila |
| 02.03.2018 | 1.6 | Added numbering, terms document references, removed unnecessary anchors | Tatu Repo |
| 20.01.2020 | 1.7 | Update XroadProcessLister description | Jarkko Hyöty |
| 25.06.2020 | 1.8 | Add chapter [2.2.1 JMX interface](#221-jmx-interface) | Petteri Kivimäki |
| 01.06.2023 | 1.9 | Update references | Petteri Kivimäki |
| 04.10.2023 | 1.10 | Remove Akka references | Ričardas Bučiūnas |


# Table of Contents
Expand Down Expand Up @@ -73,15 +74,15 @@ See X-Road terms and abbreviations documentation \[[TA-TERMS](#Ref_TERMS)\].

### 2.1 Monitoring metaservice (proxymonitor add-on)

Monitoring metaservice responds to queries for monitoring data from security server's serverproxy interface. This metaservice requests the current monitoring data from local monitoring service, using [Akka](http://akka.io/). Monitoring metaservice translates the monitoring data to a SOAP XML response.
Monitoring metaservice responds to queries for monitoring data from security server's serverproxy interface. This metaservice requests the current monitoring data from local monitoring service, using [gRPC](https://grpc.io/). Monitoring metaservice translates the monitoring data to a SOAP XML response.

Monitoring service handles authorization of the requests, see [Access control](#33-access-control). It reads monitoring configuration from distributed global monitoring configuration (see [UC-GCONF, PR-GCONF](#12-references)).

Monitoring metaservice is installed as a proxy add-on, with name `xroad-addon-proxymonitor`.

### 2.2 Monitoring service (xroad-monitor)

Monitoring service is responsible for collecting the monitoring data from one security server instance. It distributes the collected data to monitoring clients (normally the local monitoring metaservice) when requested through an Akka interface.
Monitoring service is responsible for collecting the monitoring data from one security server instance. It distributes the collected data to monitoring clients (normally the local monitoring metaservice) when requested through an gRPC interface.

Monitoring service uses several _sensors_ to collect the data. Sensors and related functionalities are build on top of [Dropwizard Metrics](https://github.com/dropwizard/metrics).

Expand Down
2 changes: 1 addition & 1 deletion doc/EnvironmentalMonitoring/img/monitoring.graphml
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@
<y:Path sx="-0.0" sy="0.0" tx="-0.0" ty="0.0"/>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="none"/>
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Liberation Sans" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="17.40625" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="57.37890625" x="-28.818661141199357" y="24.404894688015986">&lt;&lt;akka&gt;&gt;<y:LabelModel>
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Liberation Sans" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="17.40625" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="57.37890625" x="-28.818661141199357" y="24.404894688015986">&lt;&lt;gRPC&gt;&gt;<y:LabelModel>
<y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
</y:LabelModel>
<y:ModelParameter>
Expand Down
Binary file modified doc/EnvironmentalMonitoring/img/monitoring.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit ceaf390

Please sign in to comment.