chore: Merge tag '4.23.0' into develop

feat: add KMS UI
This commit is contained in:
Manuthor 2025-04-11 14:58:18 +02:00
commit 72f2bc5480
22 changed files with 685 additions and 46 deletions

1
.gitignore vendored
View file

@ -20,4 +20,3 @@ node_modules/
**/cosmian-kms/sqlite-data* **/cosmian-kms/sqlite-data*
run.sh run.sh
.aider/ .aider/
ui/

View file

@ -7,7 +7,7 @@
# See https://pre-commit.com for more information # See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks # See https://pre-commit.com/hooks.html for more hooks
exclude: documentation/pandoc|documentation/overrides|crate/server/src/tests/test_utils.rs|.pre-commit-config.yaml|crate/server/src/routes/google_cse/jwt.rs|crate/server/src/routes/google_cse/python/openssl|documentation/docs/google_cse|crate/pkcs11/sys|documentation/docs/drawings|test_data|documentation/docs/benchmarks.md|crate/hsm/proteccio/driver exclude: documentation/pandoc|documentation/overrides|crate/server/src/tests/test_utils.rs|.pre-commit-config.yaml|crate/server/src/routes/google_cse/jwt.rs|crate/server/src/routes/google_cse/python/openssl|documentation/docs/google_cse|crate/pkcs11/sys|documentation/docs/drawings|test_data|documentation/docs/benchmarks.md|crate/hsm/proteccio/driver|crate/server/ui
repos: repos:
- repo: https://github.com/compilerla/conventional-pre-commit - repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.0.0 rev: v4.0.0

View file

@ -2,6 +2,38 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## [4.23.0] - 2025-04-10
### 🚀 Features
- Add digest and MAC KMIP operations ([#370](https://github.com/Cosmian/kms/pull/370))
- Upgrade Covercrypt to v15 ([#382](https://github.com/Cosmian/kms/pull/382))
- Add CBC encryption mode ([#395](https://github.com/Cosmian/kms/pull/395))
- Add UI ([#391](https://github.com/Cosmian/kms/pull/391))
### 🐛 Bug Fixes
- Shrink docker images size using slim-bullseye base image ([#377](https://github.com/Cosmian/kms/pull/377))
- Clean unneeded test files ([#392](https://github.com/Cosmian/kms/pull/392))
- RUSTSEC-2025-0009: `ring`: Some AES functions may panic when overflow checking is enabled.
- RUSTSEC-2025-0022: `openssl`: Use-After-Free in Md::fetch and Cipher::fetch
### 🚜 Refactor
- Move all CLI relative crates on <https://github.com/Cosmian/client> ([#383](https://github.com/Cosmian/kms/pull/383))
### 📚 Documentation
- Fix Google expected X509 extensions
### 🧪 Testing
- Add HSM tests using Utimaco simulator ([#380](https://github.com/Cosmian/kms/pull/380))
### ⚙️ Miscellaneous Tasks
- Reuse generic Github workflows ([#401](https://github.com/Cosmian/kms/pull/401))
## [4.22.1] - 2025-02-04 ## [4.22.1] - 2025-02-04
### 🧪 CI ### 🧪 CI

34
Cargo.lock generated
View file

@ -1152,7 +1152,7 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
[[package]] [[package]]
name = "cosmian_cli" name = "cosmian_cli"
version = "4.22.1" version = "4.23.0"
dependencies = [ dependencies = [
"actix-rt", "actix-rt",
"actix-server", "actix-server",
@ -1319,7 +1319,7 @@ dependencies = [
[[package]] [[package]]
name = "cosmian_findex_client" name = "cosmian_findex_client"
version = "4.22.1" version = "4.23.0"
dependencies = [ dependencies = [
"base64 0.22.1", "base64 0.22.1",
"cosmian_crypto_core 10.0.1", "cosmian_crypto_core 10.0.1",
@ -1407,7 +1407,7 @@ dependencies = [
[[package]] [[package]]
name = "cosmian_kmip" name = "cosmian_kmip"
version = "4.22.1" version = "4.23.0"
dependencies = [ dependencies = [
"bitflags 2.8.0", "bitflags 2.8.0",
"chrono", "chrono",
@ -1428,7 +1428,7 @@ dependencies = [
[[package]] [[package]]
name = "cosmian_kms_access" name = "cosmian_kms_access"
version = "4.22.1" version = "4.23.0"
dependencies = [ dependencies = [
"cosmian_kmip", "cosmian_kmip",
"serde", "serde",
@ -1436,7 +1436,7 @@ dependencies = [
[[package]] [[package]]
name = "cosmian_kms_base_hsm" name = "cosmian_kms_base_hsm"
version = "4.22.1" version = "4.23.0"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"cosmian_kms_interfaces", "cosmian_kms_interfaces",
@ -1452,7 +1452,7 @@ dependencies = [
[[package]] [[package]]
name = "cosmian_kms_client" name = "cosmian_kms_client"
version = "4.22.1" version = "4.23.0"
dependencies = [ dependencies = [
"cosmian_crypto_core 10.0.1", "cosmian_crypto_core 10.0.1",
"cosmian_http_client", "cosmian_http_client",
@ -1469,7 +1469,7 @@ dependencies = [
[[package]] [[package]]
name = "cosmian_kms_client_utils" name = "cosmian_kms_client_utils"
version = "4.22.1" version = "4.23.0"
dependencies = [ dependencies = [
"base64 0.22.1", "base64 0.22.1",
"clap", "clap",
@ -1487,7 +1487,7 @@ dependencies = [
[[package]] [[package]]
name = "cosmian_kms_crypto" name = "cosmian_kms_crypto"
version = "4.22.1" version = "4.23.0"
dependencies = [ dependencies = [
"aes-gcm-siv", "aes-gcm-siv",
"argon2", "argon2",
@ -1510,7 +1510,7 @@ dependencies = [
[[package]] [[package]]
name = "cosmian_kms_interfaces" name = "cosmian_kms_interfaces"
version = "4.22.1" version = "4.23.0"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"cosmian_kmip", "cosmian_kmip",
@ -1523,7 +1523,7 @@ dependencies = [
[[package]] [[package]]
name = "cosmian_kms_server" name = "cosmian_kms_server"
version = "4.22.1" version = "4.23.0"
dependencies = [ dependencies = [
"actix-cors", "actix-cors",
"actix-files", "actix-files",
@ -1585,7 +1585,7 @@ dependencies = [
[[package]] [[package]]
name = "cosmian_kms_server_database" name = "cosmian_kms_server_database"
version = "4.22.1" version = "4.23.0"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"clap", "clap",
@ -1626,7 +1626,7 @@ dependencies = [
[[package]] [[package]]
name = "cosmian_pkcs11" name = "cosmian_pkcs11"
version = "4.22.1" version = "4.23.0"
dependencies = [ dependencies = [
"cosmian_kms_client", "cosmian_kms_client",
"cosmian_logger", "cosmian_logger",
@ -1649,7 +1649,7 @@ dependencies = [
[[package]] [[package]]
name = "cosmian_pkcs11_module" name = "cosmian_pkcs11_module"
version = "4.22.1" version = "4.23.0"
dependencies = [ dependencies = [
"bincode", "bincode",
"const-oid", "const-oid",
@ -4023,7 +4023,7 @@ dependencies = [
[[package]] [[package]]
name = "proteccio_pkcs11_loader" name = "proteccio_pkcs11_loader"
version = "4.22.1" version = "4.23.0"
dependencies = [ dependencies = [
"cosmian_kms_base_hsm", "cosmian_kms_base_hsm",
"cosmian_kms_interfaces", "cosmian_kms_interfaces",
@ -5271,7 +5271,7 @@ checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683"
[[package]] [[package]]
name = "test_findex_server" name = "test_findex_server"
version = "4.22.1" version = "4.23.0"
dependencies = [ dependencies = [
"actix-server", "actix-server",
"cosmian_findex_client", "cosmian_findex_client",
@ -5285,7 +5285,7 @@ dependencies = [
[[package]] [[package]]
name = "test_kms_server" name = "test_kms_server"
version = "4.22.1" version = "4.23.0"
dependencies = [ dependencies = [
"actix-server", "actix-server",
"base64 0.22.1", "base64 0.22.1",
@ -5852,7 +5852,7 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
[[package]] [[package]]
name = "utimaco_pkcs11_loader" name = "utimaco_pkcs11_loader"
version = "4.22.1" version = "4.23.0"
dependencies = [ dependencies = [
"cosmian_kms_base_hsm", "cosmian_kms_base_hsm",
"cosmian_kms_interfaces", "cosmian_kms_interfaces",

View file

@ -22,7 +22,7 @@ members = [
resolver = "2" resolver = "2"
[workspace.package] [workspace.package]
version = "4.22.1" version = "4.23.0"
edition = "2021" edition = "2021"
rust-version = "1.71.0" rust-version = "1.71.0"
authors = [ authors = [

View file

@ -1,9 +1,9 @@
# #
# KMS server # KMS server
# #
FROM rust:1.85.0-bullseye AS builder FROM rust:1.85.0-bookworm AS builder
LABEL version="4.22.1" LABEL version="4.23.0"
LABEL name="Cosmian KMS docker container" LABEL name="Cosmian KMS docker container"
ENV OPENSSL_DIR=/usr/local/openssl ENV OPENSSL_DIR=/usr/local/openssl
@ -23,17 +23,15 @@ RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then export ARCHITECTURE=x86_64; e
# Conditional cargo build based on FIPS argument # Conditional cargo build based on FIPS argument
RUN if [ "$FIPS" = "true" ]; then \ RUN if [ "$FIPS" = "true" ]; then \
FEATURES="fips" bash .github/scripts/build_ui.sh; \
cargo build -p cosmian_cli -p cosmian_kms_server --release --no-default-features --features="fips"; \ cargo build -p cosmian_cli -p cosmian_kms_server --release --no-default-features --features="fips"; \
else \ else \
bash .github/scripts/build_ui.sh; \
cargo build -p cosmian_cli -p cosmian_kms_server --release --no-default-features; \ cargo build -p cosmian_cli -p cosmian_kms_server --release --no-default-features; \
fi fi
# #
# KMS server # KMS server
# #
FROM debian:bullseye-slim AS kms-server FROM debian:bookworm-slim AS kms-server
COPY --from=builder /root/kms/crate/server/ui /usr/local/cosmian/ui COPY --from=builder /root/kms/crate/server/ui /usr/local/cosmian/ui
COPY --from=builder /root/kms/target/release/cosmian_kms /usr/bin/cosmian_kms COPY --from=builder /root/kms/target/release/cosmian_kms /usr/bin/cosmian_kms

View file

@ -61,7 +61,7 @@ The KMS has extensive online [documentation](https://docs.cosmian.com/key_manage
## Quick start ## Quick start
Pre-built binaries [are available](https://package.cosmian.com/kms/4.22.1/) Pre-built binaries [are available](https://package.cosmian.com/kms/4.23.0/)
for Linux, MacOS, and Windows, as well as Docker images. To run the server binary, OpenSSL must be for Linux, MacOS, and Windows, as well as Docker images. To run the server binary, OpenSSL must be
available in your path (see "building the KMS" below for details); other binaries do not have this available in your path (see "building the KMS" below for details); other binaries do not have this
requirement. requirement.

2
cli

@ -1 +1 @@
Subproject commit 26bd496a894483760efc21f8bcb2393ad2d0208d Subproject commit 5836b7c260acc61242be66fc6cc8d13fc654882c

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 14 KiB

38
crate/server/ui/dist/Cosmian-Logo.svg vendored Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 845 B

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

14
crate/server/ui/dist/index.html vendored Normal file
View file

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/ui/assets/cropped-favicon-cosmian-32x32-BVkavOsn.png" sizes="32x32" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Cosmian KMS</title>
<script type="module" crossorigin src="/ui/assets/index-D0IgDctm.js"></script>
<link rel="stylesheet" crossorigin href="/ui/assets/index-BzFVru8x.css">
</head>
<body>
<div id="root" class="h-screen"></div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

View file

@ -16,7 +16,7 @@ The OpenSSL FIPS provider is certified under
when used on Red Hat Enterprise Linux 9 (RHEL 9) when used on Red Hat Enterprise Linux 9 (RHEL 9)
Cosmian Cosmian
produces [pre-built Ubuntu 22.04 FIPS mode binaries](https://package.cosmian.com/kms/4.22.1/ubuntu-22.04/) produces [pre-built Ubuntu 22.04 FIPS mode binaries](https://package.cosmian.com/kms/4.23.0/ubuntu-22.04/)
and docker containers of the KMS (on gcr.io). and docker containers of the KMS (on gcr.io).
Alternatively, you can build the FIPS mode version from source, using the `--features fips` flag: Alternatively, you can build the FIPS mode version from source, using the `--features fips` flag:

View file

@ -44,11 +44,11 @@ Please refer to the list of [supported algorithms](./algorithms.md).
The **Cosmian KMS** is packaged as: The **Cosmian KMS** is packaged as:
- [Debian](https://package.cosmian.com/kms/4.22.1/ubuntu-22.04/) or [RPM](https://package.cosmian.com/kms/4.22.1/rhel9/) - [Debian](https://package.cosmian.com/kms/4.23.0/ubuntu-22.04/) or [RPM](https://package.cosmian.com/kms/4.23.0/rhel9/)
package package
- Docker [image](https://github.com/Cosmian/kms/pkgs/container/kms) - Docker [image](https://github.com/Cosmian/kms/pkgs/container/kms)
and [FIPS image](https://github.com/Cosmian/kms/pkgs/container/kms) and [FIPS image](https://github.com/Cosmian/kms/pkgs/container/kms)
- Pre-built [binaries](https://package.cosmian.com/kms/4.22.1/) for multiple operating systems (Linux, Windows, MacOS) - Pre-built [binaries](https://package.cosmian.com/kms/4.23.0/) for multiple operating systems (Linux, Windows, MacOS)
## Client CLI ## Client CLI
@ -58,7 +58,7 @@ or decryption.
The **[Cosmian CLI](../cosmian_cli/index.md)** is packaged as: The **[Cosmian CLI](../cosmian_cli/index.md)** is packaged as:
- [Debian](https://package.cosmian.com/kms/4.22.1/ubuntu-22.04/) or [RPM](https://package.cosmian.com/kms/4.22.1/rhel9/) - [Debian](https://package.cosmian.com/kms/4.23.0/ubuntu-22.04/) or [RPM](https://package.cosmian.com/kms/4.23.0/rhel9/)
package package
- Pre-built [binaries](https://package.cosmian.com/cli/) for multiple operating systems (Linux, Windows, MacOS) - Pre-built [binaries](https://package.cosmian.com/cli/) for multiple operating systems (Linux, Windows, MacOS)

View file

@ -46,16 +46,16 @@ For high availability and scalability, please refer to the [high availability gu
```sh ```sh
sudo apt update && sudo apt install -y wget sudo apt update && sudo apt install -y wget
wget https://package.cosmian.com/kms/4.22.1/ubuntu-22.04/cosmian-kms-server_4.22.1-1_amd64.deb wget https://package.cosmian.com/kms/4.23.0/ubuntu-22.04/cosmian-kms-server_4.23.0-1_amd64.deb
sudo apt install ./cosmian-kms-server_4.22.1-1_amd64.deb sudo apt install ./cosmian-kms-server_4.23.0-1_amd64.deb
cosmian_kms --version cosmian_kms --version
``` ```
Or install the FIPS version: Or install the FIPS version:
```sh ```sh
wget https://package.cosmian.com/kms/4.22.1/ubuntu-22.04/cosmian-kms-server-fips_4.22.1-1_amd64.deb wget https://package.cosmian.com/kms/4.23.0/ubuntu-22.04/cosmian-kms-server-fips_4.23.0-1_amd64.deb
sudo apt install ./cosmian-kms-server-fips_4.22.1-1_amd64.deb sudo apt install ./cosmian-kms-server-fips_4.23.0-1_amd64.deb
cosmian_kms --version cosmian_kms --version
``` ```
@ -74,16 +74,16 @@ For high availability and scalability, please refer to the [high availability gu
```sh ```sh
sudo apt update && sudo apt install -y wget sudo apt update && sudo apt install -y wget
wget https://package.cosmian.com/kms/4.22.1/ubuntu-24.04/cosmian-kms-server_4.22.1-1_amd64.deb wget https://package.cosmian.com/kms/4.23.0/ubuntu-24.04/cosmian-kms-server_4.23.0-1_amd64.deb
sudo apt install ./cosmian-kms-server_4.22.1-1_amd64.deb sudo apt install ./cosmian-kms-server_4.23.0-1_amd64.deb
cosmian_kms --version cosmian_kms --version
``` ```
Or install the FIPS version: Or install the FIPS version:
```sh ```sh
wget https://package.cosmian.com/kms/4.22.1/ubuntu-24.04/cosmian-kms-server-fips_4.22.1-1_amd64.deb wget https://package.cosmian.com/kms/4.23.0/ubuntu-24.04/cosmian-kms-server-fips_4.23.0-1_amd64.deb
sudo apt install ./cosmian-kms-server-fips_4.22.1-1_amd64.deb sudo apt install ./cosmian-kms-server-fips_4.23.0-1_amd64.deb
cosmian_kms --version cosmian_kms --version
``` ```
@ -102,8 +102,8 @@ For high availability and scalability, please refer to the [high availability gu
```sh ```sh
sudo dnf update && dnf install -y wget sudo dnf update && dnf install -y wget
wget https://package.cosmian.com/kms/4.22.1/rhel9/cosmian_kms_server-4.22.1-1.x86_64.rpm wget https://package.cosmian.com/kms/4.23.0/rhel9/cosmian_kms_server-4.23.0-1.x86_64.rpm
sudo dnf install ./cosmian_kms_server-4.22.1-1.x86_64.rpm sudo dnf install ./cosmian_kms_server-4.23.0-1.x86_64.rpm
cosmian_kms --version cosmian_kms --version
``` ```
@ -112,7 +112,7 @@ For high availability and scalability, please refer to the [high availability gu
On ARM MacOS, download the build archive and extract it: On ARM MacOS, download the build archive and extract it:
```sh ```sh
wget https://package.cosmian.com/kms/4.22.1/macos_arm-release.zip wget https://package.cosmian.com/kms/4.23.0/macos_arm-release.zip
unzip macos_arm-release.zip unzip macos_arm-release.zip
cp ./macos_arm-release/Users/runner/work/kms/kms/target/aarch64-apple-darwin/release/cosmian_kms /usr/local/bin/ cp ./macos_arm-release/Users/runner/work/kms/kms/target/aarch64-apple-darwin/release/cosmian_kms /usr/local/bin/
chmod u+x /usr/local/bin/cosmian_kms chmod u+x /usr/local/bin/cosmian_kms
@ -122,7 +122,7 @@ For high availability and scalability, please refer to the [high availability gu
On Intel MacOS, download the build archive and extract it: On Intel MacOS, download the build archive and extract it:
```sh ```sh
wget https://package.cosmian.com/kms/4.22.1/macos_intel-release.zip wget https://package.cosmian.com/kms/4.23.0/macos_intel-release.zip
unzip macos_intel-release.zip unzip macos_intel-release.zip
cp ./macos_intel-release/Users/runner/work/kms/kms/target/x86_64-apple-darwin/release/cosmian_kms /usr/local/bin/ cp ./macos_intel-release/Users/runner/work/kms/kms/target/x86_64-apple-darwin/release/cosmian_kms /usr/local/bin/
chmod u+x /usr/local/bin/cosmian_kms chmod u+x /usr/local/bin/cosmian_kms
@ -134,7 +134,7 @@ For high availability and scalability, please refer to the [high availability gu
On Windows, download the build archive: On Windows, download the build archive:
```sh ```sh
https://package.cosmian.com/kms/4.22.1/windows-release.zip https://package.cosmian.com/kms/4.23.0/windows-release.zip
``` ```
Extract the cosmian_kms from: Extract the cosmian_kms from:

View file

@ -150,7 +150,7 @@ journalctl -u cosmian_vm_agent
```console ```console
$ curl --insecure https://${COSMIAN_VM_IP_ADDR}/version $ curl --insecure https://${COSMIAN_VM_IP_ADDR}/version
"4.22.1" "4.23.0"
``` ```
!!! info "Why `--allow-insecure-tls` and `--insecure` flags?" !!! info "Why `--allow-insecure-tls` and `--insecure` flags?"

View file

@ -1 +1 @@
"4.22.1" "4.23.0"