Modification de PKI : Installation de DogTag avec backend LDAP
La modification peut être annulée. Veuillez vérifier les différences ci-dessous pour voir si c’est bien ce que vous voulez faire, puis publier ces changements pour finaliser l’annulation de cette modification.
Version actuelle | Votre texte | ||
Ligne 1 : | Ligne 1 : | ||
{{ | {{TOCRightF}} | ||
{{ | {{ArticleHead|Adadov|encours=1}} | ||
{{Warning|text=La PKI est en cours de réalisation, je place donc pour le moment ici que les infos importantes la documentation viendra à la fin}}Une bonne PKI n'est pas forcément utile pour tout le monde, la plupart du temps une installation avec les paramètres par défaut suffira. Vous trouverez pleins de documentations sur le net pour ces cas. | |||
Mais dans certains cas, il faut aller plus loin ... Que ce soit par challenge personnel ou besoin précis, les choses se corsent vite ... Documentations manquantes, petites erreurs et autres dysfonctionnement. | Mais dans certains cas, il faut aller plus loin ... Que ce soit par challenge personnel ou besoin précis, les choses se corsent vite ... Documentations manquantes, petites erreurs et autres dysfonctionnement. | ||
Ligne 17 : | Ligne 18 : | ||
=== Fichier de déploiement LDAP === | === Fichier de déploiement LDAP === | ||
Voici le fichier de configuration des instances utilisé pour le stockage de notre PKI:< | Voici le fichier de configuration des instances utilisé pour le stockage de notre PKI: | ||
[[ | {{Collapse top|Fichier de déploiement LDAP}}<syntaxhighlight lang="ini"> | ||
; | |||
; This is a version 2 ds setup inf file. | |||
; It is used by the python versions of setup-ds-* | |||
; Most options map 1 to 1 to the original .inf file. | |||
; However, there are some differences that I envision | |||
; For example, note the split backend section. | |||
; You should be able to create, one, many or no backends in an install | |||
; | |||
; The special value {instance_name} is substituted at installation time. | |||
; | |||
; By default, all configuration parameters in this file are commented out. | |||
; To use an INF file with dscreate, you must at least set the parameters | |||
; flagged with [REQUIRED]. | |||
[general] | |||
# defaults (str) | |||
# Description: Directory Server enables administrators to use the default values for cn=config entries from a specific version. If you set this parameter to "999999999", which is the default, the instance always uses the default values of the latest version. For example, to configure that the instance uses default values from version 1.3.5, set this parameter to "001003005". The format of this value is XXXYYYZZZ, where X is the major version, Y the minor version, and Z the patch level. Note that each part of the value uses 3 digits and must be filled with leading zeros if necessary. | |||
# Default value: 999999999 | |||
;defaults = 999999999 | |||
# full_machine_name (str) | |||
# Description: Sets the fully qualified hostname (FQDN) of this system. When installing this instance with GSSAPI authentication behind a load balancer, set this parameter to the FQDN of the load balancer and, additionally, set "strict_host_checking" to "false". | |||
# Default value: ldap##NUM##.exemple.com | |||
full_machine_name = ldap##NUM##.exemple.com | |||
# start (bool) | |||
# Description: Starts the instance after the install completes. If false, the instance is created but not started. | |||
# Default value: True | |||
;start = True | |||
# selinux (bool) | |||
# Description: Enables SELinux detection and integration during the installation of this instance. If set to "True", dscreate auto-detects whether SELinux is enabled. Set this parameter only to "False" in a development environment. | |||
# Default value: True | |||
selinux = False | |||
# strict_host_checking (bool) | |||
# Description: Sets whether the server verifies the forward and reverse record set in the "full_machine_name" parameter. When installing this instance with GSSAPI authentication behind a load balancer, set this parameter to "false". Container installs imply "false". | |||
# Default value: False | |||
strict_host_checking = False | |||
[slapd] | |||
# instance_name (str) | |||
# Description: Sets the name of the instance. You can refer to this value in other parameters of this INF file using the "{instance_name}" variable. Note that this name cannot be changed after the installation! | |||
# Default value: localhost | |||
instance_name = dogtag | |||
# ldapi (str) | |||
# Description: Sets the location of socket interface of the Directory Server. | |||
# Default value: /run/slapd-{instance_name}.socket | |||
;ldapi = /run/slapd-{instance_name}.socket | |||
# port (int) | |||
# Description: Sets the TCP port the instance uses for LDAP connections. | |||
# Default value: 389 | |||
port = 389 | |||
# root_password (str) | |||
# Description: Sets the password of the "cn=Directory Manager" account ("root_dn" parameter).You can either set this parameter to a plain text password dscreate hashes during the installation or to a "{algorithm}hash" string generated by the pwdhash utility. The password must be at least 8 characters long. Note that setting a plain text password can be a security risk if unprivileged users can read this INF file! | |||
# Default value: Directory_Manager_Password | |||
root_dn = cn=directoryman | |||
root_password = | |||
# secure_port (int) | |||
# Description: Sets the TCP port the instance uses for TLS-secured LDAP connections (LDAPS). | |||
# Default value: 636 | |||
secure_port = 636 | |||
# self_sign_cert (bool) | |||
# Description: Sets whether the setup creates a self-signed certificate and enables TLS encryption during the installation. The certificate is not suitable for production, but it enables administrators to use TLS right after the installation. You can replace the self-signed certificate with a certificate issued by a Certificate Authority. If set to False, you can enable TLS later by importing a CA/Certificate and enabling 'dsconf <instance_name> config replace nsslapd-security=on' | |||
# Default value: True | |||
self_sign_cert = False | |||
# self_sign_cert_valid_months (int) | |||
# Description: Set the number of months the issued self-signed certificate will be valid. | |||
# Default value: 24 | |||
;self_sign_cert_valid_months = 24 | |||
[backend-userroot] | |||
# changelog_max_age (str) | |||
# Description: How long an entry should remain in the replication changelog. The default is 7 days, or '7d'. (requires that replication is enabled). | |||
# Default value: 7d | |||
;changelog_max_age = 7d | |||
Ce fichier est fait pour être modifié via sed avant son utilisation. | # changelog_max_entries (str) | ||
# Description: The maximum number of entries to keep in the replication changelog. The default is '-1', which means unlimited. (requires that replication is enabled). | |||
# Default value: -1 | |||
;changelog_max_entries = -1 | |||
# create_suffix_entry (bool) | |||
# Description: Set this parameter to "True" to create a generic root node entry for the suffix in the database. | |||
# Default value: False | |||
create_suffix_entry = True | |||
# enable_replication (bool) | |||
# Description: Enable replication for this backend. By default it will setup the backend as a supplier, with replica ID 1, and "cn=replication manager,cn=config" as the replication binddn. | |||
# Default value: False | |||
enable_replication = True | |||
# replica_binddn (str) | |||
# Description: Set the replication manager DN | |||
# Default value: cn=replication manager,cn=config | |||
replica_binddn = cn=replicationmgr,cn=config | |||
# replica_bindgroup (str) | |||
# Description: Set the replication bind group DN | |||
# Default value: | |||
;replica_bindgroup = | |||
# replica_bindpw (str) | |||
# Description: Sets the password of the Replication Manager account ("replica_binddn" parameter).Note that setting a plain text password can be a security risk if unprivileged users can read this INF file! | |||
# Default value: | |||
replica_bindpw = | |||
# replica_id (str) | |||
# Description: Set the unique replication identifier for this replica's database (suppliers only) | |||
# Default value: 1 | |||
replica_id = ##NUM## | |||
# replica_role (str) | |||
# Description: Set the replication role. Choose either 'supplier', 'hub', or 'consumer' | |||
# Default value: supplier | |||
replica_role = supplier | |||
# require_index (bool) | |||
# Description: Set this parameter to "True" to refuse unindexed searches in this database. | |||
# Default value: False | |||
;require_index = False | |||
# sample_entries (str) | |||
# Description: Set this parameter to 'yes' to add latest version of sample entries to this database. Or, use '001003006' to use the 1.3.6 version sample entries. Use this option, for example, to create a database for testing purposes. | |||
# Default value: no | |||
;sample_entries = no | |||
# suffix (str) | |||
# Description: Sets the root suffix stored in this database. If you do not uncomment and set the suffix attribute the install process will NOT create the backend/suffix. You can also create multiple backends/suffixes by duplicating this section. | |||
# Default value: | |||
suffix = dc=pki,dc=exemple,dc=com | |||
</syntaxhighlight> | |||
{{Collapse bottom}}Ce fichier est fait pour être modifié via sed avant son utilisation. | |||
On trouve 4 balises à remplacer dans ce fichier: | On trouve 4 balises à remplacer dans ce fichier: | ||
Ligne 126 : | Ligne 266 : | ||
pki_ds_secure_connection = False | pki_ds_secure_connection = False | ||
pki_ds_base_dn = dc=ca,%(basedn)s | pki_ds_base_dn = dc=ca,%(basedn)s | ||
pki_ds_bind_dn = cn= | pki_ds_bind_dn = cn=dirman | ||
pki_ds_database = userroot | pki_ds_database = userroot | ||
pki_ds_create_new_db = False | pki_ds_create_new_db = False | ||
Ligne 217 : | Ligne 357 : | ||
Il nécessite d'avoir un fichier {{Path|~/.pwd/directorymanager}} contenant le mot de passe du directory manager. | Il nécessite d'avoir un fichier {{Path|~/.pwd/directorymanager}} contenant le mot de passe du directory manager. | ||
===== Script de déploiement ===== | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
DGHOST=pki.exemple.com | DGHOST=pki.exemple.com | ||
INSTANCE=pki-tomcat | INSTANCE=pki-tomcat | ||
Ligne 229 : | Ligne 368 : | ||
ssh root@${DGHOST} pki-server acme-create -i ${INSTANCE} | ssh root@${DGHOST} pki-server acme-create -i ${INSTANCE} | ||
scp *.conf root@${DGHOST}:/etc/pki/${INSTANCE}/acme/ | scp *.conf root@${DGHOST}:/etc/pki/${INSTANCE}/acme/ | ||
cat << | cat <<EOF | ssh root@${DGHOST} 'bash' | ||
[copier le contenu de tmp.sh ici ] | |||
EOF | |||
</syntaxhighlight> | |||
{{Collapse top|Script tmp.sh}} | |||
<syntaxhighlight lang="bash"> | |||
cat /etc/pki/${INSTANCE}/acme/database/ds/schema.ldif {{!}} ldapadd -H ldap://${LDAPHOST}:${LDAPPORT} -D cn=directorymanager -y ~/.pwd/directorymanager -c -x | cat /etc/pki/${INSTANCE}/acme/database/ds/schema.ldif {{!}} ldapadd -H ldap://${LDAPHOST}:${LDAPPORT} -D cn=directorymanager -y ~/.pwd/directorymanager -c -x | ||
cat /etc/pki/${INSTANCE}/acme/database/ds/create.ldif {{!}} sed -e "s/dc=example,dc=com/${BASEDN}/" \ | cat /etc/pki/${INSTANCE}/acme/database/ds/create.ldif {{!}} sed -e "s/dc=example,dc=com/${BASEDN}/" \ | ||
Ligne 248 : | Ligne 393 : | ||
-e "s/{rootSuffix}/dc=${suffix},dc=pki,${BASEDN}/" {{!}}ldapadd -H ldap://${LDAPHOST}:${LDAPPORT} -D cn=directorymanager -y ~/.pwd/directorymanager -c -x | -e "s/{rootSuffix}/dc=${suffix},dc=pki,${BASEDN}/" {{!}}ldapadd -H ldap://${LDAPHOST}:${LDAPPORT} -D cn=directorymanager -y ~/.pwd/directorymanager -c -x | ||
pki-server acme-deploy -i ${INSTANCE} | pki-server acme-deploy -i ${INSTANCE} | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{Collapse bottom}} | |||
===Fichier de déploiement de la PKI=== | ===Fichier de déploiement de la PKI=== | ||
J'ai pris le parti d'un fichier unique car j'ai écris un script de déploiement automatique pour m'éviter l'internement à force de réinstallation, mais vous pouvez tout aussi bien le séparer. | J'ai pris le parti d'un fichier unique car j'ai écris un script de déploiement automatique pour m'éviter l'internement à force de réinstallation, mais vous pouvez tout aussi bien le séparer. | ||
{{Collapse top|Fichier de déploiement - ca.cfg}} | |||
<syntaxhighlight lang="ini"> | |||
[DEFAULT] | |||
pki_hostname = pki.exemple.com | |||
pki_https_port = 8443 | |||
pki_http_port = 8080 | |||
pki_security_domain_name = %(secdomain_name)s | |||
pki_security_domain_user = caadmin | |||
pki_instance_name = pki-tomcat | |||
conf_company_name = EXEMPLE | |||
pki_ds_password = | |||
pki_admin_password = | |||
pki_security_domain_password = | |||
pki_client_database_password = | |||
pki_client_pkcs12_password = | |||
pki_token_password = | |||
pki_pkcs12_password = | |||
ldap_host = ldap.exemple.com | |||
ldap_port = 389 | |||
secdomain_name = secdomain | |||
secdomain_user = secdomadmin | |||
basedn = dc=pki,dc=exemple.com | |||
pki_dns_domainname = exemple.com | |||
[CA] | |||
pki_existing = True | |||
pki_import_system_certs = True | |||
pki_import_admin_cert = False | |||
pki_admin_uid = caadmin | |||
pki_admin_name = %(pki_admin_uid)s | |||
pki_admin_email = %(pki_admin_name)s@%(pki_dns_domainname)s | |||
pki_admin_nickname = caadmin | |||
pki_admin_subject_dn = cn = PKI Admin, o = %(pki_security_domain_name)s | |||
pki_security_domain_name = %(secdomain_name)s | |||
pki_security_domain_user = %(secdomain_user)s | |||
pki_ds_hostname = %(ldap_host)s | |||
pki_ds_ldap_port = %(ldap_port)s | |||
pki_ds_secure_connection = False | |||
pki_ds_base_dn = dc=ca,%(basedn)s | |||
pki_ds_bind_dn = cn = dirman | |||
pki_ds_database = userroot | |||
pki_share_db = True | |||
pki_share_dbuser_dn = uid=pkidbuser,ou=people, dc=ca, %(basedn)s | |||
pki_ds_create_new_db = False | |||
pki_ds_remove_data = True | |||
pki_random_serial_numbers_enable = True | |||
pki_pkcs12_path = /root/pki-ecc.p12 | |||
#================================================ | |||
pki_ca_signing_nickname = pki_root_ca | |||
pki_ca_signing_key_size = nistp384 | |||
pki_ca_signing_key_type = ecc | |||
pki_ca_signing_key_algorithm = SHA384withEC | |||
pki_ca_signing_signing_algorithm = SHA384withEC | |||
pki_sslserver_nickname = pki_ssl_server | |||
pki_sslserver_key_size = nistp256 | |||
pki_sslserver_key_type = ecc | |||
pki_sslserver_key_algorithm = SHA256withEC | |||
pki_sslserver_signing_algorithm = SHA256withEC | |||
pki_subsystem_nickname = pki_subsystem | |||
pki_subsystem_key_size = nistp256 | |||
pki_subsystem_key_type = ecc | |||
pki_subsystem_key_algorithm = SHA256withEC | |||
pki_subsystem_signing_algorithm = SHA256withEC | |||
#================================================ | |||
pki_audit_signing_nickname = pki_ca_audit_sign | |||
pki_audit_signing_key_size = nistp521 | |||
pki_audit_signing_key_type = ecc | |||
pki_audit_signing_key_algorithm = SHA512withEC | |||
pki_audit_signing_signing_algorithm = SHA512withEC | |||
pki_ocsp_signing_nickname = pki_ca_ocsp_sign | |||
pki_ocsp_signing_key_size = nistp521 | |||
pki_ocsp_signing_key_type = ecc | |||
pki_ocsp_signing_key_algorithm = SHA512withEC | |||
pki_ocsp_signing_signing_algorithm = SHA512withEC | |||
[OCSP] | |||
pki_import_system_certs = True | |||
pki_import_admin_cert = True | |||
pki_ds_hostname = %(ldap_host)s | |||
pki_ds_ldap_port = %(ldap_port)s | |||
pki_ds_secure_connection = False | |||
pki_ds_base_dn = dc=ocsp,%(basedn)s | |||
pki_ds_bind_dn = cn = dirman | |||
pki_ds_database = userroot | |||
pki_ds_create_new_db = False | |||
pki_ds_remove_data = True | |||
pki_share_db = True | |||
pki_share_dbuser_dn = uid=pkidbuser,ou=people, dc=ca, %(basedn)s | |||
pki_admin_uid = ocspadmin | |||
pki_admin_name = %(pki_admin_uid)s | |||
pki_admin_email = %(pki_admin_name)s@%(pki_dns_domainname)s | |||
pki_admin_nickname = ocspadmin | |||
pki_security_domain_name = %(domain_name)s | |||
pki_security_domain_user = %(secdomain_user)s | |||
#================================================ | |||
pki_ca_signing_nickname = pki_root_ca | |||
pki_ca_signing_key_size = nistp384 | |||
pki_ca_signing_key_type = ecc | |||
pki_ca_signing_key_algorithm = SHA384withEC | |||
pki_ca_signing_signing_algorithm = SHA384withEC | |||
pki_sslserver_nickname = pki_ssl_server | |||
pki_sslserver_key_size = nistp256 | |||
pki_sslserver_key_type = ecc | |||
pki_sslserver_key_algorithm = SHA256withEC | |||
pki_sslserver_signing_algorithm = SHA256withEC | |||
pki_subsystem_nickname = pki_subsystem | |||
pki_subsystem_key_size = nistp256 | |||
pki_subsystem_key_type = ecc | |||
pki_subsystem_key_algorithm = SHA256withEC | |||
pki_subsystem_signing_algorithm = SHA256withEC | |||
#================================================ | |||
pki_audit_signing_nickname = pki_ocsp_audit_sign | |||
pki_audit_signing_key_size = nistp521 | |||
pki_audit_signing_key_type = ecc | |||
pki_audit_signing_key_algorithm = SHA512withEC | |||
pki_audit_signing_signing_algorithm = SHA512withEC | |||
pki_ocsp_signing_nickname = pki_ocsp_sign | |||
pki_ocsp_signing_key_size = nistp521 | |||
pki_ocsp_signing_key_type = ecc | |||
pki_ocsp_signing_key_algorithm = SHA512withEC | |||
pki_ocsp_signing_signing_algorithm = SHA512withEC | |||
[KRA] | |||
pki_import_system_certs = True | |||
pki_import_admin_cert = True | |||
pki_admin_uid = kraadmin | |||
pki_admin_name = %(pki_admin_uid)s | |||
pki_admin_email = %(pki_admin_name)s@%(pki_dns_domainname)s | |||
pki_admin_nickname = kraadmin | |||
pki_ds_hostname = %(ldap_host)s | |||
pki_ds_ldap_port = %(ldap_port)s | |||
pki_ds_secure_connection = False | |||
pki_ds_bind_dn = cn = dirman | |||
pki_ds_base_dn = dc=kra,%(basedn)s | |||
pki_ds_database = userroot | |||
pki_ds_create_new_db = False | |||
pki_ds_remove_data = True | |||
pki_share_db = True | |||
pki_share_dbuser_dn = uid=pkidbuser,ou=people, dc=ca, %(basedn)s | |||
pki_security_domain_name = %(domain_name)s | |||
pki_security_domain_user = %(secdomain_user)s | |||
#================================================ | |||
pki_ca_signing_nickname = pki_root_ca | |||
pki_ca_signing_key_size = nistp521 | |||
pki_ca_signing_key_type = ecc | |||
pki_ca_signing_key_algorithm = SHA512withEC | |||
pki_ca_signing_signing_algorithm = SHA512withEC | |||
pki_sslserver_nickname = pki_ssl_server | |||
pki_sslserver_key_size = nistp521 | |||
pki_sslserver_key_type = ecc | |||
pki_sslserver_key_algorithm = SHA256withEC | |||
pki_sslserver_signing_algorithm = SHA256withEC | |||
pki_subsystem_nickname = pki_subsystem | |||
pki_subsystem_key_size = nistp521 | |||
pki_subsystem_key_type = ecc | |||
pki_subsystem_key_algorithm = SHA256withEC | |||
pki_subsystem_signing_algorithm = SHA256withEC | |||
#================================================ | |||
pki_storage_nickname = pki_kra_storage | |||
pki_storage_key_size = 2048 | |||
pki_storage_key_type = rsa | |||
pki_storage_key_algorithm = SHA512withRSA | |||
pki_storage_signing_algorithm = SHA512withRSA | |||
pki_transport_nickname = pki_kra_transport | |||
pki_transport_key_size = 2048 | |||
pki_transport_key_type = rsa | |||
pki_transport_key_algorithm = SHA512withRSA | |||
pki_transport_signing_algorithm = SHA512withRSA | |||
#================================================ | |||
pki_audit_signing_nickname = pki_kra_audit_sign | |||
pki_audit_signing_key_size = nistp521 | |||
pki_audit_signing_key_type = ecc | |||
pki_audit_signing_key_algorithm = SHA512withEC | |||
pki_audit_signing_signing_algorithm = SHA512withEC | |||
pki_ocsp_signing_nickname = pki_kra_ocsp_sign | |||
pki_ocsp_signing_key_size = nistp521 | |||
pki_ocsp_signing_key_type = ecc | |||
pki_ocsp_signing_key_algorithm = SHA512withEC | |||
pki_ocsp_signing_signing_algorithm = SHA512withEC | |||
</syntaxhighlight> | |||
{{Collapse bottom}} | |||
==Configuration de la CA== | ==Configuration de la CA== | ||
===Création d'un compte administrateur supplémentaire=== | ===Création d'un compte administrateur supplémentaire=== | ||
<syntaxhighlight lang="bash"> | |||
pk12util -i .dogtag/dg-pki/ca_admin_cert.p12 -d .dogtag/nssdb/ | |||
alias pki='\pki -n caadmin' | alias pki='\pki -n caadmin' | ||
pki ca user add admin2 --fullName "Second Admin" | pki ca user add admin2 --fullName "Second Admin" | ||
Ligne 270 : | Ligne 648 : | ||
pki ca group member add "Certificate Manager Agents" admin2 | pki ca group member add "Certificate Manager Agents" admin2 | ||
pki ocsp group member add "Online Certificate Status Manager Agents" admin2 | pki ocsp group member add "Online Certificate Status Manager Agents" admin2 | ||
pki kra group member add "Data Recovery Manager Agents" admin2 | pki kra group member add "Data Recovery Manager Agents" admin2 | ||
</syntaxhighlight> | |||
===Ajout de profils supplémentaires=== | ===Ajout de profils supplémentaires=== | ||
Ligne 277 : | Ligne 656 : | ||
*D'abord importer le fichier, le placer dans {{Path|/etc/pki/pki-dogtag/ca/profiles/ca/}} | *D'abord importer le fichier, le placer dans {{Path|/etc/pki/pki-dogtag/ca/profiles/ca/}} | ||
* Déclarer le profil dans le fichier CS.cfg en ajoutant les lignes suivantes: | * Déclarer le profil dans le fichier CS.cfg en ajoutant les lignes suivantes: | ||
profile.[profilename].class_id=caEnrollImpl | profile.[profilename].class_id=caEnrollImpl | ||
profile.[profilename].config=/var/lib/pki/dogtag-pki/ca/profiles/ca/[profilename].cfg | profile.[profilename].config=/var/lib/pki/dogtag-pki/ca/profiles/ca/[profilename].cfg | ||
*Ajouter dans la liste située dans CS.cfg ce nouveau profil (la place dans la liste fait la place sur l'interface web | *Ajouter dans la liste située dans CS.cfg ce nouveau profil (la place dans la liste fait la place sur l'interface web) | ||
profile.list=[profilename],[... | profile.list=[profilename],[...] | ||
===Publication des certificats dans LDAP=== | ===Publication des certificats dans LDAP=== | ||
Voici les entrées modifiées dans {{Path|/etc/pki/pki-dogtag/ca/CS.cfg}} pour activer la publication des certificats dans le LDAP. | Voici les entrées modifiées dans {{Path|/etc/pki/pki-dogtag/ca/CS.cfg}} pour activer la publication des certificats dans le LDAP. | ||
Publication de la CRL au démarrage: | Publication de la CRL au démarrage: | ||
ca.crl.MasterCRL.publishOnStart=true | ca.crl.MasterCRL.publishOnStart=true | ||
Cette option est obligatoire pour que la règle LdapCrlRule fonctionne: | |||
ca.publish.createOwnDNEntry=true | ca.publish.createOwnDNEntry=true | ||
Pour activer les règles il faut passer à true les variables de configurations suivantes: | |||
ca.publish.rule.instance.LdapCaCertRule.enable=true | ca.publish.rule.instance.LdapCaCertRule.enable=true | ||
ca.publish.rule.instance.LdapCrlRule.enable=true | ca.publish.rule.instance.LdapCrlRule.enable=true | ||
ca.publish.rule.instance.LdapUserCertRule.enable=true | ca.publish.rule.instance.LdapUserCertRule.enable=true | ||
ca.publish.rule.instance.LdapXCertRule.enable=true | ca.publish.rule.instance.LdapXCertRule.enable=true | ||
ca.publish.rule.instance.ocsprule-[...]-8443.enable=true | ca.publish.rule.instance.ocsprule-[...]-8443.enable=true | ||
Pour activer toutes les règles un petit coup de sed suffit | |||
{{LxTerm|text=sed -i -r 's/(ca\.publish\.rule\.instance\.[^.]*\.enable=)false/\1true/' /etc/pki/pki-dogtag/ca/CS.cfg}} | {{LxTerm|text=sed -i -r 's/(ca\.publish\.rule\.instance\.[^.]*\.enable=)false/\1true/' /etc/pki/pki-dogtag/ca/CS.cfg}} | ||
Ligne 305 : | Ligne 683 : | ||
Pour SCEP j'ai cherché pendant un bon moment pour le faire fonctionner (et je cherche encore a comprendre pourquoi il bug avec iLO ...) | Pour SCEP j'ai cherché pendant un bon moment pour le faire fonctionner (et je cherche encore a comprendre pourquoi il bug avec iLO ...) | ||
Mais pour l'activer il suffit de modifier les options suivantes: | Mais pour l'activer il suffit de modifier les options suivantes: | ||
ca.scep.enable=true | ca.scep.enable=true | ||
Vous pouvez modifier les algorithms avec les options suivantes: | |||
ca.scep.allowedEncryptionAlgorithms=DES3 | ca.scep.allowedEncryptionAlgorithms=DES3 | ||
ca.scep.allowedHashAlgorithms=SHA256,SHA512 | ca.scep.allowedHashAlgorithms=SHA256,SHA512 | ||
ca.scep.encryptionAlgorithm=DES3 | ca.scep.encryptionAlgorithm=DES3 | ||
ca.scep.hashAlgorithm=SHA256 | ca.scep.hashAlgorithm=SHA256 | ||
ca.scep.nonceSizeLimit=16 | ca.scep.nonceSizeLimit=16 | ||
Puis il faut '''surtout''' corriger le bug voir [[Installation de PKI DogTag-LDAP avec CA, KRA et OCSP#SCEP: le listener qui ne fonctionne pas ...|SCEP: le listener qui ne fonctionne pas]] | |||
===Notifications par email=== | ===Notifications par email=== | ||
Ligne 391 : | Ligne 769 : | ||
Donc pour répondre au mieux à tout ça: | Donc pour répondre au mieux à tout ça: | ||
*Pour la communication entre le proxy et la PKI on utiilisera AJP avec un shared secret. | |||
*On forcera la navigation HTTPS | |||
*On mettra en place l'identification par certificats directement sur le proxy qui transmettra à la PKI | *On mettra en place l'identification par certificats directement sur le proxy qui transmettra à la PKI | ||
=== Fichier de configuration du vhost SSL=== | === Fichier de configuration du vhost SSL=== | ||
<syntaxhighlight lang="apacheconf"> | <syntaxhighlight lang="apacheconf"> | ||
<VirtualHost *:443> | <VirtualHost *:443> | ||
Ligne 419 : | Ligne 796 : | ||
CustomLog logs/pki.log combined | CustomLog logs/pki.log combined | ||
ErrorLog logs/pki_error.log | ErrorLog logs/pki_error.log | ||
</syntaxhighlight> | </syntaxhighlight>On va ajouter une exception pour permettre le fonctionnement de certbot:<syntaxhighlight lang="apacheconf"> | ||
On va ajouter une exception pour permettre le fonctionnement de certbot:<syntaxhighlight lang="apacheconf"> | |||
Alias /.well-known/acme-challenge /var/www/acme/ | Alias /.well-known/acme-challenge /var/www/acme/ | ||
ProxyPass /.well-known/acme-challenge/ ! | ProxyPass /.well-known/acme-challenge/ ! | ||
Ligne 792 : | Ligne 1 167 : | ||
Lors de l'installation de KRA, j'ai pu constater que le générateur server side ne fonctionnait pas ... En effet il nous dit que son certificat doit être importé dans la NSS DB de la CA .... Et pourtant, il y est ... | Lors de l'installation de KRA, j'ai pu constater que le générateur server side ne fonctionnait pas ... En effet il nous dit que son certificat doit être importé dans la NSS DB de la CA .... Et pourtant, il y est ... | ||
Après avoir cherché | Après avoir cherché prêt de 2 jours et tout retourné, j'ai fini par trouver ... | ||
Le nickname n'est pas mis dans la configuration de la CA ... | Le nickname n'est pas mis dans la configuration de la CA ... | ||
Ligne 803 : | Ligne 1 178 : | ||
Il faut donc tout simplement modifier le fichier CS.cfg ... Enfin j'ai modifié tous les fichiers du serveurs afin de m'assurer qu'aucun ne garde l'ancienne info non fonctionnelle ... | Il faut donc tout simplement modifier le fichier CS.cfg ... Enfin j'ai modifié tous les fichiers du serveurs afin de m'assurer qu'aucun ne garde l'ancienne info non fonctionnelle ... | ||
{{LxTerm|text=sed -i .fixScep 's/com.netscape.cms.servlet.cert.scep.ChallengePassword/org.mozilla.jss.netscape.security.x509.ChallengePassword/' $(find / -name CS.cfg) | {{LxTerm|text=sed -i .fixScep 's/com.netscape.cms.servlet.cert.scep.ChallengePassword/org.mozilla.jss.netscape.security.x509.ChallengePassword/' $(find / -name CS.cfg)}} | ||
[[Catégorie: | [[Catégorie:Sécurité]] | ||
[[Catégorie: | [[Catégorie:Authentification]] |