Open jake-scott opened 3 years ago
See #426 for suggestion on how to implement this.
Hi @jake-scott, just out of curiosity have you had any progress on this? I'm also trying to use a KEYRING cache these days and would like to stick to this library :)
I had to expose ParsePrincipal
and ParseCredential
to use Linux krb5 ccache in the kernel keyring (and https://github.com/jsipprell/keyctl/pull/5). So I wonder if the API you suggest would support this, @jake-scott.
c := new(credentials.CCache)
c.Version = 4
p := 0
var endian binary.ByteOrder
endian = binary.BigEndian
cache, err := LookupTGT()
if err != nil {
log.Fatalf("could find TGT in keyring cache: %v", err)
}
cred, err := credentials.ParseCredential(cache, &p, c, &endian)
if err != nil {
log.Fatalf("could not login client: %v", err)
}
c.Credentials = append(c.Credentials, cred)
Any update on this request?
Other libraries make use of credential cache types other then FILE: - for example KCM or KEYRING.
If there is appetite for inclusion, I would be happy to contribute support.