LDAP Configuration Example in Exadata Compute Nodes and Storage Servers Using SSSD Doc ID 3020122.1
LDAP Configuration Example in Exadata Compute Nodes and Storage Servers Using SSSD Doc ID 3020122.1
LDAP configuration example in Exadata compute nodes and storage servers using SSSD (Doc ID
3020122.1)
In this Document
Purpose
Scope
Details
Document notation
Hostnames
Environment connection scenario
LDAP – NFS example data
Configuring system services
Customizing SSSD
Customizing NSCD
Verifying LDAP user accounts
Customizing Autofs
Using LDAP user account
SSSD software updates in Exadata
Debugging and troubleshooting documentation
References
APPLIES TO:
PURPOSE
Beginning with Oracle Exadata Storage Server Software version 23.1.2.0.0, full support is introduced for System Security
Services Daemon (SSSD) – Lightweight Directory Access Protocol (LDAP) configuration and usage across all server
environments (storage servers, database bare metal, Dom0/DomU, KVM Host/Guest). Exadata database nodes and storage
servers can use SSSD to access authentication providers (i.e. external LDAP server) so remote data can be cached in local
storage. These features are supported at the operating system level.
The purpose of this note is to exemplify an environment in which these technologies function together with a common
objective. In this case, the protocols / services are configured to enable a single-sign on (SSO) strategy for operating system
user accounts in Exadata systems.
NOTE: It is strongly recommended to test any configuration before applying it in a production environment.
SCOPE
NOTE: It is strongly recommended to read "How to configure Kerberos and SSSD-KCM in Exadata compute nodes and
cells (Doc ID 2948255.1)" before implementing any concept explained in this document.
Kerberos best practices and configurations are not covered in this document, but are needed if an Exadata server provides
a Kerberos-aware service..
All the content in this note is intended for system administrators, who are allowed to modify configuration files, customize
system units (i.e. services and sockets), and manage operating system user accounts.
For the configurations covered in this document to function properly, the following technical requirements must be met:
An external LDAP server must have been configured to store user data (identities) in a logical and organized manner, so
it can be automatically retrieved by remote clients using SSSD.
An external NFS server must have been configured to share the home directories of the users (managed by the external
LDAP server) to the remote clients.
In this scenario, the LDAP and NFS services are running in their standard network port.
NOTE: For simplification purposes, in this case, the LDAP and NFS services are provided by the same sever.
DETAILS
Document notation
Hostnames
external-ldap-server (LDAP and NFS server)
exadb01 (Exadata database node). This Exadata node uses SSSD to communicate and access the external LDAP
server. Additionally, the node provides SSH as a Kerberos-aware service (configured to accept Kerberos tickets as
authentication mechanism for user account access).
PC-01: Corporate PC, configured as Kerberos client.
Top class
dn: dc=example-ldap-domain,dc=com
dc: example-ldap-domain
objectClass: top
objectClass: domain
structuralObjectClass: domain
creatorsName: cn=Manager,dc= example-ldap-domain,dc=com
dn: ou=User,dc=example-ldap-domain,dc=com
ou: User
objectClass: top
objectClass: organizationalUnit
structuralObjectClass: organizationalUnit
creatorsName: cn=Manager,dc=example-ldap-domain,dc=com
dn: ou=Group,dc=example-ldap-domain,dc=com
ou: Group
objectClass: top
objectClass: organizationalUnit
structuralObjectClass: organizationalUnit
creatorsName: cn=Manager,dc=example-ldap-domain,dc=com
User account entry
dn: uid=ldapuser1,ou=User,dc=example-ldap-domain,dc=com
objectClass: inetOrgPerson
objectClass: posixAccount
cn: ldapuser1
sn: user1
uid: ldapuser1
uidNumber: 24872
gidNumber: 24872
homeDirectory: /scratch/ldapuser1
loginShell: /bin/bash
structuralObjectClass: inetOrgPerson
creatorsName: cn=Manager,dc=example-ldap-domain,dc=com
userPassword:: wergwgknwergnwe23lkbkljljhblblkj5l34lkjnnlQThHVm4=
Let us consider the following NFS share. In this configuration scenario, the home directory of ldapuser1 is created under
/scratch, which is shared by the NFS server.
NOTE: If the home directory of the LDAP-managed user is not shared via NFS, applications will fail to mount the home
directory and clients will not be able to use the user’s files.
In this case, the SSSD configuration file (/etc/sssd/sssd.conf) will stipulate the following:
NOTE: For the SSSD service to properly start, the /etc/sssd/sssd.conf configuration file must be owned by root and
must have restricted access permissions (recommended is 600).
[nss]
filter_groups = root
filter_users = root
[domain/example-sssd-domain.com]
id_provider = ldap
ldap_uri = ldap://external-ldap-server.com
cache_credentials = True
ldap_search_base = dc=example-ldap-domain,dc=com
ldap_default_bind_dn = cn=Manager,example-ldap-domain,dc=com
ldap_default_authtok_type = obfuscated_password
ldap_default_authtok = <LDAP manager authentication token>
ldap_access_filter = (objectClass=posixAccount)
ldap_user_search_base = ou=User,dc=example-ldap-domain,dc=com
ldap_user_object_class = posixAccount
ldap_user_name = uid
ldap_group_search_base = ou=Group,dc=example-ldap-domain,dc=com
ldap_group_object_class = posixGroup
ldap_group_name = cn
ldap_id_use_start_tls = True
ldap_tls_reqcert = allow
ldap_tls_cacert = /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
ldap_access_filter = (objectClass=posixAccount)
ldap_user_uuid = entryUUID
ldap_user_shell = loginShell
ldap_user_home_directory = homeDirectory
ldap_user_uid_number = uidNumber
ldap_user_gid_number = gidNumber
ldap_group_gid_number = gidNumber
ldap_group_uuid = entryUUID
ldap_group_member = memberUid
use_fully_qualified_names = False
enumerate=True
debug_level=6
NOTE: If a firewall (i.e. iptables or nftables) is configured in the Exadata database node or storage server, proper access
rules may be needed to allow incoming traffic from the external LDAP server.
[root@exadb01 ~]# iptables -I INPUT -i eth0 -p tcp -s <LDAP server IP address>/32 -j ACCEPT
[root@exadb01 ~]# iptables -I INPUT -p tcp -m tcp -s <LDAP server IP address>/32 -j ACCEPT
In this case, two new "ACCEPT" rules are inserted in the iptables configuration.
The first rule allows incoming traffic from the external LDAP server via eth0 network interface.
The second rule is generic. It allows incoming traffic from the external LDAP server on any network interface.
NOTE: Configuring TLS certificate trust and validation between the external LDAP server and the Exadata nodes increases
the communication security. It is recommended to validate any TLS configuration in a non-production environment.
Once the configuration is complete, the SSSD service must be enabled and started. The service will request the LDAP users'
data and the local cache will be populated with the retrieved data.
NOTE: If the LDAP server is not running properly, SSSD will fail to collect the data. SSSD functionality and performance
can be debugged using the log files present in /var/log/sssd.
Customizing NSCD
NSCD (Name Service Cache Daemon) is a service shipped in the Exadata image, which provides caching operations for the
most common name service requests. The NSCD configuration, present in Exadata, is likely to conflict with SSSD caching.
For both services to run without interference, the NSCD configuration must be modified.
Edit the NSCD configuration file (/etc/nscd.conf) and set the “enable-cache” directives to the following values.
enable-cache passwd no
enable-cache group no
enable-cache hosts yes
enable-cache services no
enable-cache netgroup no
Once the custom configuration is applied, the NSCD system service must be restarted.
...
(2024-01-23 5:12:58): [be[example-sssd-domain.com]] [sysdb_store_user] (0x0400): User
"[email protected]" has been stored
(2024-01-23 5:12:58): [be[example-sssd-domain.com]] [sdap_save_group] (0x0400): Processing group
[email protected]
(2024-01-23 5:12:58): [be[example-sssd-domain.com]] [sdap_save_group] (0x0400): Storing info for
group [email protected]
(2024-01-23 5:12:58): [be[example-sssd-domain.com]] [sysdb_set_entry_attr] (0x0200): Entry
[name=ldapuser1@example-ldap-domain,cn=groups,cn=example-ldap-domain,cn=sysdb] has set [cache,
ts_cache] attrs.
(2024-01-23 5:12:58): [be[example-sssd-domain.com]] [sysdb_store_group] (0x0400): Group
"[email protected]" has been stored
(2024-01-23 5:25:49): [be[example-sssd-domain.com]] [sdap_get_generic_ext_step] (0x0400): [RID#54]
calling ldap_search_ext with [(&(memberUid=ldapuser1)(objectClass=posixGroup)(cn=*)(&(gidNumber=*)(!
(gidNumber=0))))][ou=Group,dc=example-ldap-domain,dc=com].
It can be noticed how ldapuser1 is recognized as a valid user, even though it was not locally created in exadb01 and its
identity data is not present in the user identity local files.
Customizing Autofs
Autofs is a system daemon that manages mount points as needed by system applications. At a high level, this service
automatically mounts a file-system when an internal application or user request it. Additionally, once the mount point managed
by the service becomes inactive or unused, it is automatically dismounted.
In this case Autofs can be configured to, after successful client authentication, mount home directories (belonging to the
LDAP-managed user accounts) upon session requests from the SSH server.
In the Autofs main mapping file (/etc/auto.master) add the following line.
The previous line defines that any configuration related to the directory shared by the NFS server is managed in a separate file
(/etc/auto.home).
Once the custom configuration is applied, the Autofs system service must be enabled and started.
NOTE: If a firewall (i.e. iptables or nftables) is configured in the Exadata database node or storage server, proper access
rules may be needed to allow incoming traffic from the NFS server.
[root@exadb01 ~]# iptables -I INPUT -i eth0 -p tcp -s <NFS server IP address>/32 -j ACCEPT
[root@exadb01 ~]# iptables -I INPUT -p tcp -m tcp -s <NFSserver IP address>/32 -j ACCEPT
In this case, two new "ACCEPT" rules are inserted in the iptables configuration.
The first rule allows incoming traffic from the NFS server via eth0 network interface.
The second rule is generic. It allows incoming traffic from the NFS server on any network interface.
First, request the Kerberos ticket of the LDAP user from the external KDC.
Verify the Kerberos ticket was granted and successfully cached in the system.
Use the Kerberos ticket of the LDAP user to access exadb01 via SSH.
Verify the SSH session was successfully stablished in exadb01. Retrieve the current session server's data.
Verify the home directory of the LDAP user was successfully mounted.
Oracle Linux 8 - Setting Up System Users and Authentication - Section 3 "Using the System Security Services Daemon"
LDAP and NFS functionality and support may vary between different service providers.
REFERENCES
NOTE:2948255.1 - How to configure Kerberos and SSSD-KCM in Exadata compute nodes and cells
Didn't find what you are looking for?