Modification de PKI : Installation de DogTag avec backend LDAP

Attention : vous n’êtes pas connecté(e). Votre adresse IP sera visible de tout le monde si vous faites des modifications. Si vous vous connectez ou créez un compte, vos modifications seront attribuées à votre propre nom d’utilisateur(rice) et vous aurez d’autres avantages.

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 :
{{DovConnect}}{{#description2:Documentation retraçant la réalisation d'une PKI s'appuyant sur DogTag avec backend LDAP en utilisant les composants PKI, OCSP, SCEP, KRA}}
{{#description2:Documentation retraçant la réalisation d'une PKI s'appuyant sur DogTag avec backend LDAP en utilisant les composants PKI, OCSP, SCEP, KRA}}
{{ArticleHead|Adadov}}
{{ArticleHead|Adadov}}


Ligne 17 : Ligne 17 :


=== Fichier de déploiement LDAP ===
=== Fichier de déploiement LDAP ===
Voici le fichier de configuration des instances utilisé pour le stockage de notre PKI:<br>
Voici le fichier de configuration des instances utilisé pour le stockage de notre PKI:
[[Installation d'un PKI DogTag avec backend LDAP/ldap.cfg | Fichier de déploiement du LDAP: ldap.cfg]]
{{Collapse top|Fichier de déploiement LDAP}}<syntaxhighlight lang="ini">


Ce fichier est fait pour être modifié via sed avant son utilisation.
;
; 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
 
# 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 218 : Ligne 357 :


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
#!/usr/bin/bash
DGHOST=pki.exemple.com
DGHOST=pki.exemple.com
INSTANCE=pki-tomcat
INSTANCE=pki-tomcat
Ligne 259 : Ligne 396 :


===Création d'un compte administrateur supplémentaire===
===Création d'un compte administrateur supplémentaire===
{{LxTerm|text=pk12util -i .dogtag/dg-pki/ca_admin_cert.p12 -d .dogtag/nssdb/
<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 408 :
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 396 : Ligne 535 :


=== Fichier de configuration du vhost SSL===
=== Fichier de configuration du vhost SSL===
{{Collapse top|Configuration de base du vhost SSL|expand=0}}
{{Collapse top|Configuration de base du vhost SSL}}
<syntaxhighlight lang="apacheconf">
<syntaxhighlight lang="apacheconf">
<VirtualHost *:443>
<VirtualHost *:443>
Ligne 803 : Ligne 942 :


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)}}{{DovConnect}}
{{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:Security]]
[[Catégorie:Security]]
[[Catégorie:Authentication]]
[[Catégorie:Authentication]]
Notez bien que toutes les contributions à Adadov.net wiki peuvent être modifiées, transformées ou supprimées par d’autres utilisateurs. Si vous ne désirez pas que vos écrits soient modifiés contre votre gré, merci de ne pas les soumettre ici.
Vous nous promettez aussi que vous avez écrit ceci vous-même ou que vous l’avez copié d’une source placée dans le domaine public ou d’une ressource libre similaire (voir AdadovNet:Copyrights pour plus de détails). N’utilisez aucun travail sous droits d’auteur sans autorisation expresse !
Annuler Aide pour la modification (s’ouvre dans une nouvelle fenêtre)

Catégorie cachée dont cette page fait partie :