Skip to content

Commit 11846ba

Browse files
committed
chapter 17 in progress
1 parent df5e281 commit 11846ba

File tree

1 file changed

+60
-1
lines changed

1 file changed

+60
-1
lines changed

single-sign-on/readme.md

+60-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The basic assumptions are as follows:
3232
- Data are read often but written infrequently.
3333
- Searching is a common operation.
3434

35-
Ironically, LDAP is anything but lightweight. It was originally a gateway protocol that allowed TCP/IP clients to talk to an older directory service called X.500 (obsolete now).
35+
Ironically, LDAP is anything but lightweight. It was originally a gateway protocol that allowed TCP/IP clients to talk to an older directory service called X.500 (obsolete now).
3636

3737
Microsoft’s Active Directory is the most common instantiation of LDAP, and many sites use it for both Windows and Unix systems. For environments that are Unix-only, OpenLDAP is a popular choice.
3838

@@ -74,3 +74,62 @@ LDAP entries are typically schematized through the use of an objectClass attribu
7474

7575
![common-attrs](./data/common-attrs.png)
7676

77+
### OpenLDAP
78+
79+
In the OpenLDAP distribution, slapd is the standard LDAP server daemon. In an environment with multiple servers, `slurpd` runs on the master server and replicates changes to the slave servers.
80+
81+
The setup is straightforward:
82+
83+
Create an `/etc/openldap/slapd.conf` file that contains the server’s configuration.
84+
85+
```bash
86+
database bdb
87+
suffix "dc=abacus,dc=net"
88+
rootdn "cn=admin,dc=abacus,dc=net"
89+
rootpw {crypt}xjsifuFDGRs
90+
directory /var/lib/ldap
91+
```
92+
93+
The database format defaults to Berkeley DB. The suffix is the top of the LDAP hierarchy similar to DNS root domain. The rootdn is the distinguished name of the root user. The rootpw is the root user’s password. The directory is where the database files are stored.
94+
95+
## Using directory services for login
96+
97+
Once you have a directory service set up, complete the following configuration chores so your system can enter SSO paradise:
98+
99+
- If you are planning to use AD with Kerberos, configure Kerberos and join the system to the AD domain.
100+
- Configure sssd to communicate with the appropriate identity and authentication services(AD, LDAP, or Kerberos).
101+
- Configure the name service switch, `/etc/nsswitch.conf`, to use sssd for user and group information.
102+
- Configure PAM to use sssd for authentication.
103+
104+
SOme use the traditional `getpwent` family of library routines to look up user information, whereas others use the `nsswitch` mechanism to determine which library to use. The `nsswitch` mechanism is a simple configuration file, `/etc/nsswitch.conf`, that tells the system which library to use for each type of information.
105+
106+
### Kerberos
107+
108+
Kerberos is a ticket-based authentication system that uses symmetric key cryptography. The debut of `realmd` has made the task of joining a Linux system to an Active Directory domain much easier. `realmd` act as a configuration tool for sssd and Kerberos.
109+
110+
Before joining an AD domain, make sure the following are in place:
111+
112+
- `realmd` is installed on the Linux system.
113+
- `sssd` is installed.
114+
- `ntpd` is installed and running.
115+
- You know the correct name of the AD domain.
116+
- You have the credentials of a user who has permission to join the domain.
117+
118+
For example, to join the `abacus.net` domain, and the authorized user is `admin_user`, run the following command:
119+
120+
```bash
121+
sudo realm join abacus.net -U admin_user
122+
123+
# then verify with
124+
realm list
125+
```
126+
127+
### SSSD: System Security Services Daemon
128+
129+
The UNIX and Linux road to SSO nirvana has been a rough one. Years ago, it was common to set up independent authentification system for every service or app. This
130+
approach often resulted in a morass of separate configurations and undocumented dependencies that were impossible to manage over time. Users’ passwords would work with one application but not another, causing frustration for everyone.
131+
132+
Microsoft formerly published extensions (originally called “Services for UNIX,” then “Windows Security and Directory Services for UNIX,” and finally, “Identity Management for UNIX” in Windows Server 2012) that facilitated the housing of UNIX users and groups within Active Directory. Putting the authority for managing these attributes in a non-UNIX system was an unnatural fit, however. To the relief of many, Microsoft discontinued this feature as of Windows Server 2016.
133+
134+
These issues needed some kind of comprehensive solution, and that’s just what we got with `sssd`. sssd is a one-stop shop for user identity wrangling, authentication, and account mapping. It can also cache credentials off-line, which is useful for mobile devices. sssd supports authentication both through native LDAP and through Kerberos.
135+

0 commit comments

Comments
 (0)