Skip to content

Latest commit

 

History

History
106 lines (94 loc) · 2.79 KB

krbclient.md

File metadata and controls

106 lines (94 loc) · 2.79 KB

kerb-client

1. KrbClient

Initiate a KrbClient

  • Initiate a KrbClient with prepared KrbConfig.
KrbClient krbClient = new KrbClient(krbConfig);
  • Initiate a KrbClient with conf dir.
KrbClient krbClient = new KrbClient(confDir);

Request a TGT

  • Request a TGT with using well prepared requestOptions.
requestTgt(requestOptions);
  • Request a TGT with user plain password credential
requestTgt(principal, password);
  • Request a TGT with user plain keytab credential
requestTgt(principal, keytabFile);

Request a service ticket

  • Request a service ticket with a TGT targeting for a server
requestSgt(tgt, serverPrincipal);
  • Request a service ticket provided request options
requestSgt(requestOptions);

2. KrbTokenClient

Initiate a KrbTokenClient

  • Initiate a KrbTokenClient with prepared KrbConfig.
KrbTokenClient krbTokenClient = new KrbTokenClient(krbConfig);
  • Initiate a KrbTokenClient with conf dir.
KrbTokenClient krbTokenClient = new KrbTokenClient(confDir);
  • Initiate a KrbTokenClient with prepared KrbClient.
KrbTokenClient krbTokenClient = new KrbTokenClient(krbClient);

Request a TGT

  • Request a TGT with user token credential
requestTgtWithToken(token, armorCache);

Request a service ticket

* Request a service ticket with user AccessToken credential for a server
requestSgt(accessToken, serverPrincipal, armorCache);

3. KrbPkinitClient

Initiate a KrbPkinitClient

  • Initiate a KrbPkinitClient with prepared KrbConfig.
KrbPkinitClient krbPkinitClient = new KrbPkinitClient(krbConfig);
  • Initiate a KrbPkinitClient with conf dir.
KrbPkinitClient krbPkinitClient = new KrbPkinitClient(confDir);
  • Initiate a KrbPkinitClient with prepared KrbClient.
KrbPkinitClient krbPkinitClient = new KrbPkinitClient(krbClient);

Request a TGT

  • Request a TGT with using Anonymous PKINIT
requestTgt();