Oracle Kerberos Authentication — Part 2: RAC Integration
Introduction
In Part 1, we covered the fundamentals of Kerberos authentication with a single Oracle instance. But in real-world enterprise deployments, most mission-critical databases run on Oracle RAC (Real Application Clusters). RAC introduces complexity: multiple nodes, shared services, SCAN listeners, and failover scenarios. Kerberos must be configured consistently across all nodes to ensure seamless authentication.
This guide walks through the step-by-step RAC integration process, enriched with lessons learned from production environments.
Step 1: Synchronize Kerberos Configuration Across Nodes
Every RAC node must have identical Kerberos configuration files.
Distribute krb5.conf
scp /etc/krb5.conf racnode2:/etc/krb5.conf scp /etc/krb5.conf racnode3:/etc/krb5.confDistribute Keytab
scp /etc/krb5.keytab racnode2:/etc/krb5.keytab scp /etc/krb5.keytab racnode3:/etc/krb5.keytab chmod 600 /etc/krb5.keytabVerify Consistency
md5sum /etc/krb5.conf /etc/krb5.keytab
Step 2: Configure sqlnet.ora on Each Node
Each RAC node’s $ORACLE_HOME/network/admin/sqlnet.ora must include Kerberos settings:
SQLNET.KERBEROS5_KEYTAB = /etc/krb5.keytab
Step 3: SCAN Listener Integration
RAC environments use SCAN listeners for client connections. These must be Kerberos-aware.
Create Service Principal for SCAN On AD/KDC:
ktpass -princ oracle/rac-scan.example.com@EXAMPLE.COM -mapuser oracleuser \ -pass <StrongPassword> \ -ptype KRB5_NT_PRINCIPAL \ -out racscan.keytabDeploy Keytab to All Nodes
scp racscan.keytab racnode1:/etc/krb5.keytab scp racscan.keytab racnode2:/etc/krb5.keytab scp racscan.keytab racnode3:/etc/krb5.keytab
Step 4: srvctl Configuration
Update RAC services to use Kerberos authentication.
Register Service
srvctl add service -d ORCL -s HR_SERVICE -r racnode1,racnode2Enable Kerberos Modify listener.ora to reference Kerberos keytab. Example:
ENCRYPTION_SERVICES = (KERBEROS5)
Step 5: Testing RAC Kerberos Authentication
Obtain Ticket
kinit hr@EXAMPLE.COM klistConnect via SCAN
sqlplus /@HR_SERVICEFailover Test Shut down one node:
srvctl stop instance -d ORCL -i racnode1 Reconnect — Kerberos authentication should succeed via another node.
Step 6: Common Pitfalls in RAC + Kerberos
Keytab Drift: If one node has an outdated keytab, authentication fails.
SCAN Principal Misconfiguration: Ensure SCAN FQDN matches Kerberos principal.
Ticket Expiration During Failover: Automate ticket renewal for long-running sessions.
Firewall Rules: All nodes must reach KDC on port 88.
Step 7: Best Practices
Automate Distribution: Use Ansible or Puppet to push Kerberos configs to all nodes.
Centralize Documentation: Maintain a single source of truth for principals and keytabs.
Monitor Tickets: Implement scripts to check ticket validity across nodes.
Audit Regularly: Ensure compliance with enterprise security policies.
Real-World DBA Insights
In one deployment, failover consistently failed because the SCAN principal was registered with a short hostname instead of FQDN. Always use fully qualified domain names.
Another case involved mismatched keytabs across nodes after a patch cycle. Automating distribution solved this permanently.
RAC environments amplify Kerberos issues — what works on one node must work identically everywhere.
Conclusion
Kerberos authentication in RAC environments requires discipline and consistency. By synchronizing configs, properly registering SCAN principals, and automating distribution, you can achieve seamless passwordless authentication across clustered databases.
This not only strengthens security but also ensures high availability without compromising compliance.
Comments
Post a Comment
Please do not enter any spam link in comment Section suggestions are Always Appreciated. Thanks.. !