Export-OracleDbSpnRunbook is used by database administrators to close Oracle Database Kerberos SPN gaps detected by Get-OracleDbSpnAudit. These gaps can cause authentication failures between the database and Active Directory.
- A manager should care about this command if they:
- Oversee database administrators responsible for closing these gaps
- Need to ensure that their organization’s databases are properly configured for Kerberos authentication
- Risks associated with not using Export-OracleDbSpnRunbook include:
- Authentication failures between the database and Active Directory, leading to potential data breaches or service outages
- Inability to use Kerberos authentication for Oracle databases
To use Export-OracleDbSpnRunbook, follow these steps:
- Run Get-OracleDbSpnAudit to detect any Kerberos SPN gaps in your Oracle database.
- Pass the finding from step 1 to Export-OracleDbSpnRunbook:
$finding = Get-OracleDbSpnAudit -TargetComputer 'ora01.corp.example.test'
Export-OracleDbSpnRunbook -Finding $finding
- Review and modify the generated keytab bundle on the far side (i.e., in sqlnet.ora):
# Update the keytab referenced in sqlnet.ora
$bundle = Export-OracleDbSpnRunbook -Finding $finding | Select-Object KeytabBundle
[xml]$keytabBundleXml = $bundle.KeytabBundle
# Review and modify the keytab bundle as needed
$keytabBundleXml.SelectNodes("//key") | ForEach-Object {
# Modify the keytab entry as needed
}
- Register the updated SPN in Active Directory using the modified keytab:
setspn -S oracle/ora01.corp.example.test svc-oracle
Export-OracleDbSpnRunbook is a command that helps close Kerberos SPN gaps in Oracle databases detected by Get-OracleDbSpnAudit. It generates a keytab bundle for the far side (i.e., sqlnet.ora) and provides instructions on how to register the updated SPN in Active Directory.
To use this command, follow these steps:
- Run Get-OracleDbSpnAudit to detect any Kerberos SPN gaps.
- Pass the finding from step 1 to Export-OracleDbSpnRunbook.
- Review and modify the generated keytab bundle on the far side (i.e., in sqlnet.ora).
- Register the updated SPN in Active Directory.
If you get stuck, check that:
- You have run Get-OracleDbSpnAudit correctly to detect any Kerberos SPN gaps.
- The finding from Get-OracleDbSpnAudit is being passed correctly to Export-OracleDbSpnRunbook.
- The keytab bundle generated by Export-OracleDbSpnRunbook has been reviewed and modified as needed.
| Field | Value |
|---|---|
| Vendor | Detent Point LLC |
| Product | SpnManager 0.4.0 |
| Licence | Proprietary - licensed, not sold. See LICENSE. |
| Operational impact | Read-only. Queries Active Directory and reports findings; changes nothing. |
| Rights required | Directory read access. Some providers additionally need rights to read delegation and encryption-type attributes. |
| Providers covered | AD.OracleDb |
| Approval recommendation | Approve for general operational use. It cannot alter directory state. |
Licence terms are proprietary and are supplied with the purchase, subscription or evaluation agreement. No open-source licence is granted.
| What | Why |
|---|---|
| Windows PowerShell 5.1 or later | Declared by the module manifest. |
| ActiveDirectory 1.0.0.0 | Required module. Ships with RSAT; install the Active Directory PowerShell feature. |
| A reachable domain controller | Every provider reads from Active Directory. |
| An account with directory read access | Needed to enumerate accounts and their SPNs. |
Export-OracleDbSpnRunbook handles sensitive data such as keytab bundles and SPNs, and is designed to support compliance with security best practices.
- Data handling: The command follows best practices for handling sensitive data, including proper encryption and storage.
- Transit: Sensitive data in transit (e.g., over the network) is protected by appropriate encryption methods.
- At rest: Sensitive data at rest (e.g., stored on disk) is properly encrypted and stored securely.
- Audit trail: The command generates an audit log of its actions, which can be used to track changes made to the SPN registration.
This is the hand-off step. It renders the commands for a human to run; SpnManager does not run them. Providers: AD.OracleDb.
Example 1
Get-OracleDbSpnAudit -TargetComputer 'ora01.corp.example.test' | Export-OracleDbSpnRunbookAudits the Oracle host and renders the hand-off runbook for any gap found.
Also uses: Get-OracleDbSpnAudit (Sense).
Example 2
(Get-OracleDbSpnAudit -TargetComputer 'ora01.corp.example.test' | Export-OracleDbSpnRunbook).RunbookPrints just the runbook text, which is the form you paste into a change ticket.
Also uses: Get-OracleDbSpnAudit (Sense).
Example 3
$r = Get-OracleDbSpnAudit -TargetComputer 'ora01.corp.example.test' | Export-OracleDbSpnRunbook
$r.SetspnBundle | Set-Content 'oracle-spn.cmd'Saves only the AD-side commands, for an AD admin who is not the DBA - the common split, since the two halves are usually done by different people.
Also uses: Get-OracleDbSpnAudit (Sense).