Description
The TNS tools (tns_add.sh, tns_delete.sh, tns_dump.sh, tns_load.sh, tns_modify.sh, tns_search.sh, tns_test.sh) currently only support regular LDAP connections. This enhancement adds LDAPS (LDAP over SSL/TLS) support with trustall option for Oracle Unified Directory (OUD) tools.
Motivation
Enable secure LDAP connections when managing TNS entries in LDAP directories, particularly for production environments where encrypted connections are required.
Proposed Changes
- Add new
-s command-line option to enable LDAPS
- Add
TVDLDAP_LDAPS environment variable for configuration file support
- Implement
ldaps_options() function in tns_functions.sh to return OUD-specific SSL parameters
- Update all LDAP command invocations to include SSL options when enabled
Implementation Details
- For OUD tools: Use
-Z -X flags (SSL with trustall)
- For OpenLDAP/Oracle DB tools: Reserved for future implementation
- Default port for LDAPS: 636 (defined but not auto-switched)
- Backward compatible: Default behavior remains unchanged (LDAPS disabled)
Usage Examples
# Command line
tns_add.sh -s -S myservice -N "(DESCRIPTION=...)"
# Environment variable
export TVDLDAP_LDAPS=TRUE
tns_add.sh -S myservice -N "(DESCRIPTION=...)"
# Configuration file
echo "TVDLDAP_LDAPS=TRUE" >> $TVDLDAP_ETC_DIR/tvdldap_custom.conf
Description
The TNS tools (tns_add.sh, tns_delete.sh, tns_dump.sh, tns_load.sh, tns_modify.sh, tns_search.sh, tns_test.sh) currently only support regular LDAP connections. This enhancement adds LDAPS (LDAP over SSL/TLS) support with trustall option for Oracle Unified Directory (OUD) tools.
Motivation
Enable secure LDAP connections when managing TNS entries in LDAP directories, particularly for production environments where encrypted connections are required.
Proposed Changes
-scommand-line option to enable LDAPSTVDLDAP_LDAPSenvironment variable for configuration file supportldaps_options()function in tns_functions.sh to return OUD-specific SSL parametersImplementation Details
-Z -Xflags (SSL with trustall)Usage Examples