package messages
Import Path
github.com/jcmturner/gokrb5/v8/messages (on go.dev )
Dependency Relation
imports 24 packages , and imported by 4 packages
Package-Level Type Names (total 23)
/* sort by: alphabet | popularity */
type APReq (struct)
APReq implements RFC 4120 KRB_AP_REQ: https://tools.ietf.org/html/rfc4120#section-5.5.1.
Fields (total 6 )
APOptions asn1 .BitString
Authenticator types .Authenticator
EncryptedAuthenticator types .EncryptedData
MsgType int
PVNO int
Ticket Ticket
Methods (total 4 )
(*APReq) DecryptAuthenticator (sessionKey types .EncryptionKey ) error
DecryptAuthenticator decrypts the Authenticator within the AP_REQ.
sessionKey may simply be the key within the decrypted EncPart of the ticket within the AP_REQ.
(*APReq) Marshal () ([]byte , error )
Marshal APReq struct.
(*APReq) Unmarshal (b []byte ) error
Unmarshal bytes b into the APReq struct.
(*APReq) Verify (kt *keytab .Keytab , d time .Duration , cAddr types .HostAddress , snameOverride *types .PrincipalName ) (bool , error )
Verify an AP_REQ using service's keytab, spn and max acceptable clock skew duration.
The service ticket encrypted part and authenticator will be decrypted as part of this operation.
As Outputs Of (at least one exported )
func NewAPReq (tkt Ticket , sessionKey types .EncryptionKey , auth types .Authenticator ) (APReq , error )
As Inputs Of (at least one exported )
func github.com/jcmturner/gokrb5/v8/service.VerifyAPREQ (APReq *APReq , s *service .Settings ) (bool , *credentials .Credentials , error )
type ASReq (struct)
ASReq implements RFC 4120 KRB_AS_REQ: https://tools.ietf.org/html/rfc4120#section-5.4.1.
Fields (total 6 )
KDCReqFields KDCReqFields
KDCReqFields .MsgType int
KDCReqFields .PAData types .PADataSequence
KDCReqFields .PVNO int
KDCReqFields .Renewal bool
KDCReqFields .ReqBody KDCReqBody
Methods (total 2 )
(*ASReq) Marshal () ([]byte , error )
Marshal ASReq struct.
(*ASReq) Unmarshal (b []byte ) error
Unmarshal bytes b into the ASReq struct.
As Outputs Of (at least 3 )
func NewASReq (realm string , c *config .Config , cname, sname types .PrincipalName ) (ASReq , error )
func NewASReqForChgPasswd (realm string , c *config .Config , cname types .PrincipalName ) (ASReq , error )
func NewASReqForTGT (realm string , c *config .Config , cname types .PrincipalName ) (ASReq , error )
As Inputs Of (at least 2 )
func (*ASRep ).Verify (cfg *config .Config , creds *credentials .Credentials , asReq ASReq ) (bool , error )
func github.com/jcmturner/gokrb5/v8/client.(*Client ).ASExchange (realm string , ASReq ASReq , referral int ) (ASRep , error )
type TGSRep (struct)
TGSRep implements RFC 4120 KRB_TGS_REP: https://tools.ietf.org/html/rfc4120#section-5.4.2.
Fields (total 9 )
KDCRepFields KDCRepFields
KDCRepFields .CName types .PrincipalName
KDCRepFields .CRealm string
KDCRepFields .DecryptedEncPart EncKDCRepPart
KDCRepFields .EncPart types .EncryptedData
KDCRepFields .MsgType int
KDCRepFields .PAData []types .PAData
KDCRepFields .PVNO int
KDCRepFields .Ticket Ticket
Methods (total 4 )
(*TGSRep) DecryptEncPart (key types .EncryptionKey ) error
DecryptEncPart decrypts the encrypted part of an TGS_REP.
(*TGSRep) Marshal () ([]byte , error )
Marshal TGSRep struct.
(*TGSRep) Unmarshal (b []byte ) error
Unmarshal bytes b into the TGSRep struct.
(*TGSRep) Verify (cfg *config .Config , tgsReq TGSReq ) (bool , error )
Verify checks the validity of the TGS_REP message.
As Outputs Of (at least 2 )
func github.com/jcmturner/gokrb5/v8/client.(*Client ).TGSExchange (tgsReq TGSReq , kdcRealm string , tgt Ticket , sessionKey types .EncryptionKey , referral int ) (TGSReq , TGSRep , error )
func github.com/jcmturner/gokrb5/v8/client.(*Client ).TGSREQGenerateAndExchange (spn types .PrincipalName , kdcRealm string , tgt Ticket , sessionKey types .EncryptionKey , renewal bool ) (tgsReq TGSReq , tgsRep TGSRep , err error )
type TGSReq (struct)
TGSReq implements RFC 4120 KRB_TGS_REQ: https://tools.ietf.org/html/rfc4120#section-5.4.1.
Fields (total 6 )
KDCReqFields KDCReqFields
KDCReqFields .MsgType int
KDCReqFields .PAData types .PADataSequence
KDCReqFields .PVNO int
KDCReqFields .Renewal bool
KDCReqFields .ReqBody KDCReqBody
Methods (total 2 )
(*TGSReq) Marshal () ([]byte , error )
Marshal TGSReq struct.
(*TGSReq) Unmarshal (b []byte ) error
Unmarshal bytes b into the TGSReq struct.
As Outputs Of (at least 4 )
func NewTGSReq (cname types .PrincipalName , kdcRealm string , c *config .Config , tgt Ticket , sessionKey types .EncryptionKey , sname types .PrincipalName , renewal bool ) (TGSReq , error )
func NewUser2UserTGSReq (cname types .PrincipalName , kdcRealm string , c *config .Config , clientTGT Ticket , sessionKey types .EncryptionKey , sname types .PrincipalName , renewal bool , verifyingTGT Ticket ) (TGSReq , error )
func github.com/jcmturner/gokrb5/v8/client.(*Client ).TGSExchange (tgsReq TGSReq , kdcRealm string , tgt Ticket , sessionKey types .EncryptionKey , referral int ) (TGSReq , TGSRep , error )
func github.com/jcmturner/gokrb5/v8/client.(*Client ).TGSREQGenerateAndExchange (spn types .PrincipalName , kdcRealm string , tgt Ticket , sessionKey types .EncryptionKey , renewal bool ) (tgsReq TGSReq , tgsRep TGSRep , err error )
As Inputs Of (at least 2 )
func (*TGSRep ).Verify (cfg *config .Config , tgsReq TGSReq ) (bool , error )
func github.com/jcmturner/gokrb5/v8/client.(*Client ).TGSExchange (tgsReq TGSReq , kdcRealm string , tgt Ticket , sessionKey types .EncryptionKey , referral int ) (TGSReq , TGSRep , error )
type Ticket (struct)
Ticket implements the Kerberos ticket.
Fields (total 5 )
DecryptedEncPart EncTicketPart
// Not part of ASN1 bytes so marked as optional so unmarshalling works
EncPart types .EncryptedData
Realm string
SName types .PrincipalName
TktVNO int
Methods (total 6 )
(*Ticket) Decrypt (key types .EncryptionKey ) error
Decrypt decrypts the encrypted part of the ticket using the key provided.
(*Ticket) DecryptEncPart (keytab *keytab .Keytab , sname *types .PrincipalName ) error
DecryptEncPart decrypts the encrypted part of the ticket.
The sname argument can be used to specify which service principal's key should be used to decrypt the ticket.
If nil is passed as the sname then the service principal specified within the ticket it used.
(*Ticket) GetPACType (keytab *keytab .Keytab , sname *types .PrincipalName , l *log .Logger ) (bool , pac .PACType , error )
GetPACType returns a Microsoft PAC that has been extracted from the ticket and processed.
(*Ticket) Marshal () ([]byte , error )
Marshal the Ticket.
(*Ticket) Unmarshal (b []byte ) error
Unmarshal bytes b into a Ticket struct.
(*Ticket) Valid (d time .Duration ) (bool , error )
Valid checks it the ticket is currently valid. Max duration passed endtime passed in as argument.
As Outputs Of (at least 3 )
func NewTicket (cname types .PrincipalName , crealm string , sname types .PrincipalName , srealm string , flags asn1 .BitString , sktab *keytab .Keytab , eTypeID int32 , kvno int , authTime, startTime, endTime, renewTill time .Time ) (Ticket , types .EncryptionKey , error )
func github.com/jcmturner/gokrb5/v8/client.(*Client ).GetCachedTicket (spn string ) (Ticket , types .EncryptionKey , bool )
func github.com/jcmturner/gokrb5/v8/client.(*Client ).GetServiceTicket (spn string ) (Ticket , types .EncryptionKey , error )
As Inputs Of (at least 10 )
func MarshalTicketSequence (tkts []Ticket ) (asn1 .RawValue , error )
func NewAPReq (tkt Ticket , sessionKey types .EncryptionKey , auth types .Authenticator ) (APReq , error )
func NewTGSReq (cname types .PrincipalName , kdcRealm string , c *config .Config , tgt Ticket , sessionKey types .EncryptionKey , sname types .PrincipalName , renewal bool ) (TGSReq , error )
func NewUser2UserTGSReq (cname types .PrincipalName , kdcRealm string , c *config .Config , clientTGT Ticket , sessionKey types .EncryptionKey , sname types .PrincipalName , renewal bool , verifyingTGT Ticket ) (TGSReq , error )
func NewUser2UserTGSReq (cname types .PrincipalName , kdcRealm string , c *config .Config , clientTGT Ticket , sessionKey types .EncryptionKey , sname types .PrincipalName , renewal bool , verifyingTGT Ticket ) (TGSReq , error )
func github.com/jcmturner/gokrb5/v8/client.(*Client ).TGSExchange (tgsReq TGSReq , kdcRealm string , tgt Ticket , sessionKey types .EncryptionKey , referral int ) (TGSReq , TGSRep , error )
func github.com/jcmturner/gokrb5/v8/client.(*Client ).TGSREQGenerateAndExchange (spn types .PrincipalName , kdcRealm string , tgt Ticket , sessionKey types .EncryptionKey , renewal bool ) (tgsReq TGSReq , tgsRep TGSRep , err error )
func github.com/jcmturner/gokrb5/v8/kadmin.ChangePasswdMsg (cname types .PrincipalName , realm, password string , tkt Ticket , sessionKey types .EncryptionKey ) (r kadmin .Request , k types .EncryptionKey , err error )
func github.com/jcmturner/gokrb5/v8/spnego.NewKRB5TokenAPREQ (cl *client .Client , tkt Ticket , sessionKey types .EncryptionKey , GSSAPIFlags []int , APOptions []int ) (spnego .KRB5Token , error )
func github.com/jcmturner/gokrb5/v8/spnego.NewNegTokenInitKRB5 (cl *client .Client , tkt Ticket , sessionKey types .EncryptionKey ) (spnego .NegTokenInit , error )
Package-Level Functions (total 10)
func NewTicket (cname types .PrincipalName , crealm string , sname types .PrincipalName , srealm string , flags asn1 .BitString , sktab *keytab .Keytab , eTypeID int32 , kvno int , authTime, startTime, endTime, renewTill time .Time ) (Ticket , types .EncryptionKey , error )
NewTicket creates a new Ticket instance.
The pages are generated with Golds v0.6.7 . (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu .
PR and bug reports are welcome and can be submitted to the issue list .
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds .