Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
content:serverbasics:docker-freeipa [2024/09/08 10:42] – [Caddyfile] Daniel | content:serverbasics:docker-freeipa [2025/02/19 10:46] (aktuell) – Daniel | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | ====== FreeIPA ====== | + | ====== |
- | FreeIPA is a collection of Tools and a Web- GUI for managing an AD (Active Directory). As docker Image, it delivers LDAP for central storing of Users, Hosts and Keys. The bind- DNS will serve Hostnames to IP- Adresses and the Kerberos will deliver SSO attached | + | FreeIPA is a collection of Tools for managing an AD (Active Directory) and a nice Web- GUI to mange those. |
- | This chapter will describe, how to install FreeIPA in a rootless Docker- Environement, | + | As docker Image, it delivers LDAP for central storing of Users/ |
+ | |||
+ | This chapter will describe, how to install FreeIPA in a rootless Docker- Environement, | ||
===== Prerequiusite ===== | ===== Prerequiusite ===== | ||
- | You will need a Docker- Host, that is rechable from the Internet | + | You will need a Docker- Host, that is rechable from the Internet |
===== Docker composer ===== | ===== Docker composer ===== | ||
- | FreeIPA will not use a Database - all needed informations are stored into the Docker Data- Volume. | + | FreeIPA will not use a Database - all needed informations are stored into the Docker Data- Volume. Some Services - like LDAP will setup their own DB in that Directory. |
- | Frst, create a Directory in your Docker-Compose directry that you chose before in [[http:// | + | First, create a Directory in your Docker-Compose directry that you chose before in [[http:// |
- | Then, create your '' | + | Then, create your '' |
< | < | ||
Zeile 41: | Zeile 43: | ||
- / | - / | ||
- / | - / | ||
+ | - caddy_data:/ | ||
tmpfs: | tmpfs: | ||
- /run | - /run | ||
Zeile 51: | Zeile 54: | ||
command: | command: | ||
- -U | - -U | ||
- | - --domain=clients.[FQDN_HOSTNAME] | + | - --domain=clients.[DOMAINPART_OF_HOSTNAME] |
# Must match the last part of the Domain-Name and must be upper case and routed to the domain | # Must match the last part of the Domain-Name and must be upper case and routed to the domain | ||
- | - --realm=[DOMAINPART_OF_HOSTNAME] | + | - --realm=[DOMAINPART_OF_HOSTNAME_UPPERCASE] |
- --http-pin=[NEWHTTPDPIN] | - --http-pin=[NEWHTTPDPIN] | ||
- --dirsrv-pin=[NEWDIRSRVPIN] | - --dirsrv-pin=[NEWDIRSRVPIN] | ||
+ | #Bind/DNS Setup - use own Server Open Port 53 for this | ||
- --setup-dns | - --setup-dns | ||
# - --no-host-dns | # - --no-host-dns | ||
+ | - --setup-dns | ||
+ | # Save choice: | ||
+ | - --no-forwarders | ||
+ | # Will Forward unknow DNS- Queries to something else. May be a security- breach | ||
+ | # - --auto-forwarders | ||
+ | # - --forwarder=192.168.178.1 | ||
#NTP - not needed, this is the server which time is taken from / | #NTP - not needed, this is the server which time is taken from / | ||
#This server has also a chrony-daemon running here to sync time | #This server has also a chrony-daemon running here to sync time | ||
- --no-ntp | - --no-ntp | ||
# - --ntp-server=172.0.0.11 | # - --ntp-server=172.0.0.11 | ||
- | - --auto-forwarders | ||
- | # - --forwarder=192.168.178.1 | ||
#Error: Unable to determine the amount of available RAM | #Error: Unable to determine the amount of available RAM | ||
- --skip-mem-check | - --skip-mem-check | ||
Zeile 90: | Zeile 98: | ||
# - " | # - " | ||
volumes: | volumes: | ||
- | ipa_data: | + | ipa_data: |
- | ipa_journal: | + | |
+ | | ||
</ | </ | ||
- | ===== Caddyfile ===== | ||
- | Caddy wil be used for Proxy, so in your Caddyfile (see https:// | + | The caddy_data Volume contains the Certifictes for encryption from Caddy as described |
+ | ===== Caddyfile ===== | ||
+ | |||
+ | Caddy wil be used for Proxy, so in your Caddyfile (see [[https:// | ||
< | < | ||
+ | |||
# FreeIPA | # FreeIPA | ||
http:// | http:// | ||
Zeile 115: | Zeile 127: | ||
</ | </ | ||
+ | As the internal Certificate of FreeIPA will be self-signed, | ||
+ | |||
+ | ===== Encryption ===== | ||
+ | |||
+ | First thing you should do, is to secure the (LDAP)- ports with the certificate from letsenrcypt that Caddy uses. Without those matching certificates in place, Kerberos later won't accept the self signed- certificates that FreeIPA will create during install. | ||
+ | |||
+ | Your Caddyfile should have mounted the Certificates from Caddy to / | ||
+ | |||
+ | The Parts will be: 1. Certificate for your FQDN 2. Certificate of the Issuer | ||
+ | |||
+ | For setting up the Truststore, we will nee the Certificate of the Issuer in one file and than import it to the keystore of freeipa webserver and ldap-server. | ||
+ | |||
+ | To do this, root-bash into your Container of running FreeIPA and do the following: | ||
+ | |||
+ | < | ||
+ | [root@ipa test]# DOMAIN=" | ||
+ | [root@ipa test]# cd / | ||
+ | [root@ipa test]# csplit -f cert ${DOMAIN}.crt '/ | ||
+ | [root@ipa test]# ipa-cacert-manage -p ' | ||
+ | [root@ipa test]# ipa-certupdate | ||
+ | [root@ipa test]# ipa-server-certinstall -d -w / | ||
+ | [root@ipa test]# ipactl restart | ||
+ | |||
+ | </ | ||
+ | |||
+ | The first ipa-cacert-manage will install the intermediate- certificate of letsencrypt. | ||
+ | |||
+ | You can check ift its the right one, by using '' | ||
+ | |||
+ | '' | ||
+ | |||
+ | If the Subject contains you FQDN , its the wrong certificate. | ||
+ | |||
+ | When ipa-server-certinstall has been sucessfully run, your server should use those Certificates for Kerberos, LDAP and your Webservice. | ||
+ | |||
+ | Test if your Certificates for LDAP and Web do match: | ||
+ | |||
+ | openssl s_client -connect [FQDN_HOSTNAME]: | ||
+ | |||
+ | should be the same as: | ||
+ | |||
+ | openssl s_client -connect [FQDN_HOSTNAME]: | ||
+ | |||
+ | If not, check the above Certificates and loctaions to be from letsencrpt wih openssl. Mind that " | ||
+ | '' | ||
===== LDAP - Zentrales AD ===== | ===== LDAP - Zentrales AD ===== | ||
- | Coming soon... | + | Coming soon… |