Skip to content

Add LDAPS/SSL support to TNS tools with trustall option for OUD #138

@oehrlis

Description

@oehrlis

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

  1. Add new -s command-line option to enable LDAPS
  2. Add TVDLDAP_LDAPS environment variable for configuration file support
  3. Implement ldaps_options() function in tns_functions.sh to return OUD-specific SSL parameters
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions