Guidelines for Updating Kerberos Passwords

The password of Kerberos principal should be periodically changed. To do this, you can either manually specify it by using kadmin.local or automatically randomize principal keys by using the config renew-keytab command of the securityconfig tool.

The syntax for this command is:

config renew-keytab -root <secroot> [-secdir <security dir>]
[-keysalt <enc:salt[,enc:salt,..]>]
[-kadmin-path <kadmin utility path>]
[-instance-name <database instance name>]
[-admin-principal <kerberos admin principal name>]
[-kadmin-keytab <keytab file> ]
[-kadmin-ccache <credential cache file>]

where:

To manually update the Kerberos principal password instead, you should follow these steps:

  1. Use kadmin.local utility to change the service principal password:

    kadmin.local: cpw nosql/myhost
    Enter password for principal nosql/myhost@EXAMPLE.COM
    Re-enter password for principal nosql/myhost@EXAMPLE.COM
  2. Regenerate the keytab file for Oracle NoSQL Database service principal.

    kadmin.local: ktadd -norandkey -k new.keytab
  3. Copy the new keytab file for Oracle NoSQL Database service principal to each Storage Node. For example:

    scp new.keytab kvuser@mystore:KVROOT/security/store.keytab
    ...
  4. Validate the keytab file by comparing the key version number (kvno):

    kadmin.local:getprinc nosql/myhost@EXAMPLE.COM
    Principal: nosql/myhost@EXAMPLE.COM
    Expiration date: [never]
    Last password change: Thu Jun 04 03:16:38 UTC 2015
    Password expiration date: [none]
    Maximum ticket life: 1 day 00:00:00
    Maximum renewable life: 0 days 00:00:00
    Last modified: Thu Jun 04 03:16:38 UTC 2015
    (root/admin@ORACLE.EXAMPLE.COM)
    Last successful authentication: [never]
    Last failed authentication: [never]
    Failed password attempts: 0
    Number of keys: 4
    Key: vno 12, aes256-cts-hmac-sha1-96
    Key: vno 12, aes128-cts-hmac-sha1-96
    Key: vno 12, des3-cbc-sha1
    Key: vno 12, arcfour-hmac
    MKey: vno 1
    Attributes:
    Policy: [none]
    Kadmin.local: quit
    # klist -k new.keytab
    KVNO Principal
    
    ---- ------------------------
    12 nosql/myhost@EXAMPLE.COM
    12 nosql/myhost@EXAMPLE.COM
    12 nosql/myhost@EXAMPLE.COM
    12 nosql/myhost@EXAMPLE.COM

Client side user principals require similar password rotation. Keytab or credential cache used to login to the database should be renewed. If kinit tool is used to create a credential cache, you should run kdestroy to clear cached tickets and re-run kinit to generate a new credential cache.

For example:

# kdestroy -c /tmp/krb5ccache
# kinit -c /tmp/krb5ccache