-
Notifications
You must be signed in to change notification settings - Fork 6
Story #15211: Cleaning PKI. #3509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
|
New Issues (27)Checkmarx found the following issues in this Pull Request
Fixed Issues (1)Great job! The following issues were fixed in this Pull Request
Use @Checkmarx to interact with Checkmarx PR Assistant. |
22068ef to
a3f51e0
Compare
7f8bd7c to
3d6d83e
Compare
* Removing useless timestamping elements.
…am to resolv on Consul's DNS name instead of IP. The new generated certificates doesn't contains the IP anymore.
…guration for webapp.
Currently, it's stored under vault-certs.yml and we don't have access to it during deployment.
With disabled secure for ui components.
Disable ssl for ui-design-system.
Remove unsupported parameters for this nginx version (revolver) - upstream config.
e85d30a to
250c029
Compare
| {{ process('{{ pki_dir }}/vitamui-services/clients/ui-ingest/ui-ingest.pem', 'ui_ingest_context') }} | ||
| {{ process('{{ pki_dir }}/vitamui-services/clients/ui-pastis/ui-pastis.pem', 'ui_pastis_context') }} | ||
| {{ process('{{ pki_dir }}/vitamui-services/clients/ui-collect/ui-collect.pem', 'ui_collect_context') }} | ||
| {{ insertCertificate(pki_dir + '/vitamui-services/clients/ui-portal/ui-portal.pem', 'ui_portal_context') }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
À voir si on charge tous les certificats même si dans certains cas (rare) on a décidé de ne pas déployer certains composants applicatifs ?
| name: nginx | ||
| state: started | ||
|
|
||
| #### Consul configuration #### |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
En as-t-on besoin ici ? Ou à déplacer dans le block secure ci-dessus ?
Car sans https, on pourrait conserver la configuration upstream avec la liste des ips et ainsi éviter la résolution dns consul pas simple à implémenter avec consul.
| # proxy_set_header Host $api_gateway_dns; | ||
| # proxy_pass {{ 'https' if vitamui.api_gateway.secure | default(secure) | bool else 'http' }}://$api_gateway_dns:{{ vitamui.api_gateway.port_service }}; | ||
|
|
||
| proxy_pass {{ 'https' if vitamui.api_gateway.secure | default(secure) | bool else 'http' }}://API-GATEWAY; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment ça fonctionne encore ici en https alors que le nom DNS de API-GATEWAY n'est pas correct ?
| ui_identity: | ||
| vitamui_component: ui-identity | ||
| port_service: 8002 | ||
| secure: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Si on laisse toutes les UI en secure: false (config par défaut, voir non configurable), on pourrait même se passer de leur générer un certificat server.
En effet, elles n'auraient plus besoin que d'un certificat client.
deployment/pki/scripts/lib/ca.sh
Outdated
| -out ${REPERTOIRE_CA}/${REPERTOIRE_SORTIE}/ca-root.crt \ | ||
| -batch | ||
|
|
||
| pki_logger "Convert CA root certificate to PEM format..." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On convertit en pem pour création du bundle pour nginx.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ne sera pas nécessaire si on a pas besoin des services UI en https.
deployment/pki/scripts/lib/stores.sh
Outdated
| ${JKS_PASSWORD} \ | ||
| ${TMP_P12_PASSWORD} | ||
| # Generate the server keystores for vitamui-services except ui- components | ||
| for COMPONENT in $( ls ${REPERTOIRE_CERTIFICAT}/vitamui-services/server/ | grep -v -e "README" -e "^ui-" ); do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On ne génère pas les keystores pour les composants UI, c'est inutile.
Les keystores sont nécessaires uniquement pour les composants spring (java).
| # # client-${CLIENT_TYPE} keystores generation | ||
| for COMPONENT in $( ls ${CERT_SRC_DIR} 2>/dev/null | grep -vF -e "README" -e "external" ); do | ||
| # Do not generate keystores for ui- components, we don't need them | ||
| for COMPONENT in $( ls ${CERT_SRC_DIR} 2>/dev/null | grep -v -e "README" -e "external" -e "^ui-" ); do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On ne génère pas les keystores pour les composants UI, c'est inutile.
Les keystores sont nécessaires uniquement pour les composants spring (java).
| generateServerAndClientCertAndStorePassphrase ui-archive-search vitamui-services | ||
| generateServerAndClientCertAndStorePassphrase ui-collect vitamui-services | ||
| generateServerAndClientCertAndStorePassphrase ui-pastis vitamui-services | ||
| generateServerCertAndStorePassphrase ui-design-system vitamui-services |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pas besoin de certificat pour ui-design-system, c'est juste une page de demo des composants UI. On le laisse en http sans possibilité de le passer en https.
| copy: | ||
| src: "{{ item }}" | ||
| dest: "{{ nginx_ssl_dir }}" | ||
| src: "{{ inventory_dir }}/certs/vitamui-services/clients/{{ vitamui_struct.vitamui_component }}/{{ vitamui_struct.vitamui_component }}.{{ item }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il faut copier le certificat client des UI pour utiliser lors de l'appel suivant.
Configuration proxy_ssl_certificate au niveau de nginx.
| mode: "{{ vitamui_defaults.folder.conf_permission }}" | ||
| - block: | ||
|
|
||
| - name: "Add server certificates for {{ vitamui_struct.vitamui_component }} when secure is enabled" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On ne copie la partie ssl que si le secure: true est activé. Autrement ces informations ne sont pas utiles.
À voir si on conserve cette possibilité pour les UI ?
Sinon, mettre à jour la PKI pour ne faire qu'un generateClientCertAndStorePassphrase pour les UI.
…breaking current install.
6b9d919 to
a57e703
Compare
Refactor and translate into english.
…(Java KeyStore) format to industry-standard PKCS12 format. This eliminates the keytool warning and aligns with modern Java best practices.
cd7af33 to
1dcff27
Compare
4423187 to
cc8cc65
Compare
| trust-store-password: {{ password_truststore }} | ||
| trust-store: {{ vitamui_folder_conf }}/truststore_vitamui.p12 | ||
| trust-store-password: {{ truststore_vitamui }} | ||
| client-auth: want |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourquoi pas need ? Tous les composants appelant iam semblent le faire en mTLS.
|
Switched to #3535 |





Description
Updating PKI
ca-bundle.security/certificates(cas-server & ui-*).Ansible
proxy_ssl_certificate).ssl_certificate). This currently does not work due to issues with DNS resolution and upstream configuration in nginx.secure: false). The server certificates are now generated with Subject Alternative Names (SAN) including the DNS name.security/certificatesdatabase.ssl_hostname_verification(default:true) for each component.Schema communication:
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 VUI_SERVICES[ ] direction TB R[referential] P[pastis] I[ingest] C[collect] AS[archive_search] end IAM[iam] SEC[security] end %% Communications EXTERNAL -->|https| RP RP -->|http| SERVICES_UI RP -->|https| CAS SERVICES_UI -->|mTLS| API_GW API_GW -->|https + x-ssl-cert| VITAM_UI_SERVICES VUI_SERVICES -->|mTLS| IAM VUI_SERVICES -->|https| SEC IAM <-->|mTLS| CAS IAM -->|https| SECType de changement
Contributeur