LDAP: Difference between revisions

From NURDspace
 
(122 intermediate revisions by 6 users not shown)
Line 1: Line 1:
For use with [[SpaceNet]] we've installed OpenLDAP on [[nurdserver]]. On the new [[NURDserver_v2|Nurdserver v2]] we're going serious with LDAP.
{{Project
|Name=LDAP
|Skills=Linux, FreeIPA
|Status=Implemented
|Niche=Software
|Purpose=Infrastructure
|Tool=Yes
}}
= Status =
 
We are currently running on [[Network/Roadmap/LDAPAuthentication|FreeIPA]].
 
= Connected machines and services =


= Working implementations on Nurdserver v1 (nurdserver) =
== Virtual Machines ==
* [[Spacenet]]
* Samba on [[NURDServer]]
* vsFTPd on [[NURDServer]]


= Working implementations on Nurdserver v2 (nurdservices) =
You can use the following systems by logging into them using your LDAP account. These systems are only available when you are connected to the space network, or you have a working VPN tunnel to the space. Note that you need to be part of the BOFH group to gain root access. If you need root, ask someone from the BOFH team to see whats possible.
* NFS export for homedirs
* [[Spacenet]]


= To do=
* services-1.lan.nurd.space
* FTPd
* services-2.lan.nurd.space
* Samba?
* gitlab.vm.nurd.space
* Get a certificate, allow access only over TLS
* minio.vm.nurd.space
* Create homedir on NFS-export when adding a user to LDAP (maybe [http://documentation.fusiondirectory.org/en/documentation_faq/command_after like this]?)
* navi.vm.nurd.space
* Setting "change password on first login" in FusionDirectory doesn't get enforced through PAM
* gh-runner-almalinux.vm.nurd.space
* Migrate all local users on [[Infra]] machines to LDAP
* gh-runner-debian.vm.nurd.space
* Migrate all homedirs to [[NURDserver_v2|Nurdservices]]
* Migrate [[wiki]] users and merge them with other users
* Use LDAP as userdb back-end for [[wiki]]
* Add all relevant fields of Wiki users to LDAP profiles
* Maintain [http://nurdspace.nl/Category:Members Members] page from LDAP
* Maintain sudo'ers through the LDAP and disable local root accounts [http://www.sudo.ws/sudoers.ldap.man.html like so] (backdoor in case of emergency?)
* Disable all relevant services on Nurdserver v1


= Status =
All machines are deployed using a combination of OpenTOFU, cloud-init and Ansible via an CI/CD pipeline running on Gitlab. Configuration is done via GIT. If you need a machine for any purpose, ask the BOFH team.
I've installed [http://fusiondirectory.org FusionDirectory] on a new VM called nurdservices on the proxmox system of [[NURDserver_v2|Nurdserver v2]]. I've also added a couple of users to it.


It can be accessed on http://nurdservices/fusiondirectory from within the network.
TODO: Make this available for members without BOFH being involved.


On [[Hp_dc5800_sinterklaas|Sinterklaas]], [[Dell_Optiplex_GX270|Vjdeb]] and the [[PrinterPC]] I've got it to work as I think it should be for the local users that existed:
== Wiki ==
* Homedirs moved to nfs mount from [[NURDserver_v2|Nurdservices]]
Authentication on this wiki is done via SAML using a combination of SimpleSAML and Keycloak. Keycloak uses LDAP as an identity source.
* Local homedirs and users deleted (except user 'printer' on [[PrinterPC]])
* /home/ is mounted over nfs on boot
* LDAP users can log in and see their homedirs as if nothing has changed


= Setting up other workstations in this way =
== Gitlab ==
To get this to work you need to:
See [[Network/Roadmap/MigrateToGitlab|our Gitlab instance]]
* create all local users in LDAP (if they don't exist already)
* move homedirs to nurdservices (fix ownership if needed)
* delete local users (optional)
* delete local homedirs
* install [http://wiki.debian.org/LDAP/NSS#NSS_Setup_with_libnss-ldapd libnss-ldapd]
* config the binddn (read-user) in pam_ldap.conf and nslcd.conf (this is needed to look up the cn based on the UID the user inputs)
* mount /home from nurdservices over nfs
* configure the ldap in nss and pam (no ssl, so ldap://nurdservices/)
* and add a line to /etc/pam.d/common-account:


<code>
== Wifi (Spacenet) ==
session    required  pam_mkhomedir.so skel=/etc/skel/ umask=0022
TODO: Is broken as of now
</code>


This step will no longer be needed once homedirs are created when you add a user to the LDAP.
== DHCP ==
See the [[Network|network page]].


Also useful: http://www.debian-administration.org/article/OpenLDAP_installation_on_Debian#NSS_configuration
== (Un)locking the front door ==
See the [[Network/Services/DoorLock|Door lock page]].

Latest revision as of 21:48, 6 September 2024

LDAP
NoPicture.png
Participants Fwd
Skills Linux, FreeIPA
Status Implemented
Niche Software
Purpose Infrastructure
Tool Yes
Location
Cost
Tool category

LDAP Property "Tool Image" (as page type) with input value "File:{{{Picture}}}" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process. {{{Picture}}} {{#if:Yes | [[Tool Owner::{{{ProjectParticipants}}} | }} {{#if:Yes | [[Tool Cost::{{{Cost}}} | }}

Status

We are currently running on FreeIPA.

Connected machines and services

Virtual Machines

You can use the following systems by logging into them using your LDAP account. These systems are only available when you are connected to the space network, or you have a working VPN tunnel to the space. Note that you need to be part of the BOFH group to gain root access. If you need root, ask someone from the BOFH team to see whats possible.

  • services-1.lan.nurd.space
  • services-2.lan.nurd.space
  • gitlab.vm.nurd.space
  • minio.vm.nurd.space
  • navi.vm.nurd.space
  • gh-runner-almalinux.vm.nurd.space
  • gh-runner-debian.vm.nurd.space

All machines are deployed using a combination of OpenTOFU, cloud-init and Ansible via an CI/CD pipeline running on Gitlab. Configuration is done via GIT. If you need a machine for any purpose, ask the BOFH team.

TODO: Make this available for members without BOFH being involved.

Wiki

Authentication on this wiki is done via SAML using a combination of SimpleSAML and Keycloak. Keycloak uses LDAP as an identity source.

Gitlab

See our Gitlab instance

Wifi (Spacenet)

TODO: Is broken as of now

DHCP

See the network page.

(Un)locking the front door

See the Door lock page.