Skip to content

CP V8.0 - Story #15211: Separate client certificates for UI components and server certificates for VitamUI components. - #3525

Open
GiooDev wants to merge 2 commits into
master_8.0.xfrom
cp80_story_15211
Open

GiooDev wants to merge 2 commits into
master_8.0.xfrom
cp80_story_15211

Conversation

@GiooDev

@GiooDev GiooDev commented Jan 29, 2026 •

Copy link
Copy Markdown
Contributor

Architecture générale

Voici l'architecture des communications entre les services.

graph TD

    %% Service Definitions
    RP[Reverse Proxy]

    subgraph SERVICES_UI[VitamUI-UI Services]
        direction TB
        UPO[ui-portal]
        UID[ui-identity]
        UIA[ui-identity-admin]
        UAS[ui-archive-search]
        URE[ui-referential]
        UCO[ui-collect]
        UPA[ui-pastis]
        UIN[ui-ingest]       
    end

    API_GW[api-gateway]
    CAS[cas-server]

    subgraph VITAM_UI_SERVICES[VitamUI Services]
        direction TB
        subgraph SERVICES_EXT[Services External]
            direction TB
            RE[referential-external]
            PE[pastis-external]
            IE[ingest-external]
            CE[collect-external]
            ASE[archive-search-external]
        end
        
        subgraph SERVICES_INT[Services Internal]
            direction TB
            RI[referential-internal]
            PI[pastis-internal]
            II[ingest-internal]
            CI[collect-internal]
            ASI[archive-search-internal]
        end
 
        IAM_EXT[iam-external]
        IAM_INT[iam-internal]
        SEC[security-internal]
    end

    %% Communications
    EXTERNAL -->|https| RP
    RP -->|http| SERVICES_UI
    RP -->|https| CAS
    SERVICES_UI -->|mTLS| API_GW
    API_GW -->|https + x-ssl-cert| SERVICES_EXT
    SERVICES_EXT -->|https| SERVICES_INT
    SERVICES_EXT -->|https| SEC
    SERVICES_EXT -->|https| IAM_INT
    SERVICES_INT -->|https| IAM_INT
    
    CAS -->|mTLS| IAM_EXT
    IAM_EXT -->|https| SEC
    IAM_EXT -->|https| IAM_INT
    IAM_INT -->|https| SEC
    IAM_INT -->|https| CAS
Loading

Organisation des certificats

Gestion des certificats Clients

Les composants ui-* ainsi que cas-server ont besoin de certificats clients pour effectuer les appels sur les APIs de VitamUI.

Veuillez vous référer aux paramètres de l'extension_client dans le fichier pki/config/crt-config.

Voici l'arborescence attendue:

environments/certs/client-external/
├── ca
│   ├── ca-intermediate.crt
│   └── ca-root.crt
└── clients
    ├── cas-server
    │   ├── cas-server.crt
    │   ├── cas-server.key
    │   └── cas-server.pem
    ├── ui-archive-search
    │   ├── ui-archive-search.crt
    │   ├── ui-archive-search.key
    │   └── ui-archive-search.pem
    ├── ui-collect
    │   ├── ui-collect.crt
    │   ├── ui-collect.key
    │   └── ui-collect.pem
    ├── ui-design-system
    │   ├── ui-design-system.crt
    │   ├── ui-design-system.key
    │   └── ui-design-system.pem
    ├── ui-identity
    │   ├── ui-identity.crt
    │   ├── ui-identity.key
    │   └── ui-identity.pem
    ├── ui-identity-admin
    │   ├── ui-identity-admin.crt
    │   ├── ui-identity-admin.key
    │   └── ui-identity-admin.pem
    ├── ui-ingest
    │   ├── ui-ingest.crt
    │   ├── ui-ingest.key
    │   └── ui-ingest.pem
    ├── ui-pastis
    │   ├── ui-pastis.crt
    │   ├── ui-pastis.key
    │   └── ui-pastis.pem
    ├── ui-portal
    │   ├── ui-portal.crt
    │   ├── ui-portal.key
    │   └── ui-portal.pem
    └── ui-referential
        ├── ui-referential.crt
        ├── ui-referential.key
        └── ui-referential.pem

Note: Les .crt doivent être convertis au format .pem pour leur permettre d'être chargés dans la base security -> certificates.
Les .key des composants ui-* ne doivent pas avoir de passphrase. Actuellement il n'y a pas de possibilité de charger cette passphrase lors des appels effectués par nginx via proxy_ssl_certificate_key.

Gestion des certificats Serveurs

Chacun des composants applicatifs de VitamUI devra fournir des certificats à partir du moment où ils sont configurés en mode secure: true.

Veuillez vous référer aux paramètres de l'extension_server dans le fichier pki/config/crt-config.

Voici l'arborescence attendue à ajuster en fonction de la répartition des services entre les machines (Se référer à la répartition dans l'inventaire. Pour l'exemple suivant, nous allons utiliser <inventory_hostname>):

environments/certs/server/
├── ca
│   ├── ca-intermediate.crt
│   └── ca-root.crt
└── hosts
    └── <inventory_hostname>
        ├── api-gateway.crt
        ├── api-gateway.key
        ├── archive-search-external.crt
        ├── archive-search-external.key
        ├── archive-search-internal.crt
        ├── archive-search-internal.key
        ├── cas-server.crt
        ├── cas-server.key
        ├── collect-external.crt
        ├── collect-external.key
        ├── collect-internal.crt
        ├── collect-internal.key
        ├── iam-external.crt
        ├── iam-external.key
        ├── iam-internal.crt
        ├── iam-internal.key
        ├── iam-internal.pem
        ├── ingest-external.crt
        ├── ingest-external.key
        ├── ingest-internal.crt
        ├── ingest-internal.key
        ├── pastis-external.crt
        ├── pastis-external.key
        ├── referential-external.crt
        ├── referential-external.key
        ├── referential-internal.crt
        ├── referential-internal.key
        ├── reverse.crt
        ├── reverse.key
        ├── security-internal.crt
        └── security-internal.key

Note: Il sera nécessaire de préciser les Subject Alternative Name (SAN) selon la convention suivante: OPENSSL_SAN="DNS:vitamui-${COMPONENT}.service.${CONSUL_DOMAIN},DNS:vitamui-${COMPONENT}.service.${DC_NAME}.${CONSUL_DOMAIN}"
Si vous souhaitez multi-instancier certains services, vous pouvez dupliquer les mêmes certificats dans chacun des répertoires de <inventory_hostname> puisque le hostname-verification s'effectuera sur leur SAN.

Gestion des keystores

Chacun des composants applicatifs de VitamUI devra fournir un keystore afin de permettre le chargement des certificats associés.

Voici l'arborescence attendue:

environments/keystores/
├── client-external
│   ├── keystore_cas-server.p12
│   └── truststore_external.jks
├── client-vitam
│   ├── keystore_vitamui.p12
│   └── truststore_vitam.jks
└── server
    ├── truststore_server.jks
    └── <inventory_hostname>
        ├── keystore_api-gateway.jks
        ├── keystore_archive-search-external.jks
        ├── keystore_archive-search-internal.jks
        ├── keystore_cas-server.jks
        ├── keystore_collect-external.jks
        ├── keystore_collect-internal.jks
        ├── keystore_iam-external.jks
        ├── keystore_iam-internal.jks
        ├── keystore_ingest-external.jks
        ├── keystore_ingest-internal.jks
        ├── keystore_pastis-external.jks
        ├── keystore_referential-external.jks
        ├── keystore_referential-internal.jks
        ├── keystore_reverse.jks
        └── keystore_security-internal.jks

Note: Le composant cas-server possède 2 keystores distincts. Le premier sous client-external pour ses appels en tant qu'application cliente. Le second sous server pour l'exposition de son service en https aux autres applications (mode secure: true).
Le truststore_external doit contenir les CA publiques de client-external et server.
Le truststore_server ne contient que les CA publiques de server.

Déploiement

Suite à l'application de ce patch de configuration:

Lors d'un déploiement initial, les certificats seront bien pris en compte à tous les niveaux (système et base de données). Vous n'avez rien de particulier à faire que de suivre la procédure de déploiement classique.

Cependant, en cas de mise à jour d'une infrastructure existante, il faudra procéder à la mise à jour des certificats dans la base de données mongo-vitam: security.certificates en jouant le playbook: ansible-vitamui-exploitation/reinit_security_certificates.yml.

Type de changement

  • PKI
  • Ansiblerie
  • Refactorisation de code

Contributeur

  • Programme Vitam

@GiooDev GiooDev added this to the IT 165 milestone Jan 29, 2026
@GiooDev GiooDev self-assigned this Jan 29, 2026
@GiooDev GiooDev added OPS REVIEW Mandatory if deployment/ directory is modified. Support VitamUI Support labels Jan 29, 2026
@GiooDev
GiooDev force-pushed the cp80_story_15211 branch 5 times, most recently from e139206 to d395a47 Compare January 30, 2026 17:34
@GiooDev
GiooDev requested a review from lotfivitam January 30, 2026 17:40
…er certificates for VitamUI components.

UI components are considered as client-external, but they can't be configured as 'server' (https) anymore.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DO_NOT_MERGE OPS REVIEW Mandatory if deployment/ directory is modified. Support VitamUI Support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant