Documentation ¶
Overview ¶
Package keytab implements Kerberos keytabs: https://web.mit.edu/kerberos/krb5-devel/doc/formats/keytab_file_format.html.
Index ¶
- type Keytab
- func (kt *Keytab) AddEntry(principalName, realm, password string, ts time.Time, KVNO uint8, encType int32) error
- func (kt *Keytab) AddEntryWithHash(principalName, realm, hash string, ts time.Time, KVNO uint8, encType int32) error
- func (kt *Keytab) GetEncryptionKey(princName types.PrincipalName, realm string, kvno int, etype int32) (types.EncryptionKey, int, error)
- func (kt *Keytab) JSON() (string, error)
- func (kt *Keytab) Marshal() ([]byte, error)
- func (kt Keytab) String() string
- func (kt *Keytab) Unmarshal(b []byte) error
- func (kt *Keytab) Write(w io.Writer) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keytab ¶
type Keytab struct { Entries []entry IngnoreKVNO bool // contains filtered or unexported fields }
Keytab struct.
func (*Keytab) AddEntry ¶
func (kt *Keytab) AddEntry(principalName, realm, password string, ts time.Time, KVNO uint8, encType int32) error
AddEntry adds an entry to the keytab. The password should be provided in plain text and it will be converted using the defined enctype to be stored.
func (*Keytab) AddEntryWithHash ¶
func (kt *Keytab) AddEntryWithHash(principalName, realm, hash string, ts time.Time, KVNO uint8, encType int32) error
AddEntry adds an entry to the keytab with a precomputed hash. The hash should be provided in hex format.
func (*Keytab) GetEncryptionKey ¶
func (kt *Keytab) GetEncryptionKey(princName types.PrincipalName, realm string, kvno int, etype int32) (types.EncryptionKey, int, error)
GetEncryptionKey returns the EncryptionKey from the Keytab for the newest entry with the required kvno, etype and matching principal. If the kvno is zero then the latest kvno will be returned. The kvno is also returned for
Click to show internal directories.
Click to hide internal directories.