Error asking TGT to freeipa
When requests a TGT following the next example the freeipa server returns an error for the AS-REQ request, 60 err-generic.
fn main() {
use ascii::AsciiString;
use kerbeiros::*;
use std::net::*;
// Prepare the arguments
let realm = AsciiString::from_ascii("demo1.freeipa.org").unwrap();
let kdc_address = IpAddr::V4(Ipv4Addr::new(52, 57, 162, 88));
let username = AsciiString::from_ascii("admin").unwrap();
let user_key = Key::Password("Secret123".to_string());
// Request the TGT
let tgt_requester = TgtRequester::new(realm, kdc_address);
let credential = tgt_requester.request(&username, Some(&user_key)).unwrap();
// Save the ticket into a Windows format file
credential.save_into_krb_cred_file("bob_tgt.krb").unwrap();
// Save the ticket into a Linux format file
credential.save_into_ccache_file("bob_tgt.ccache").unwrap();
}
Here is the trace of the response in Wireshark: