Class: Rex::Proto::Kerberos::Model::EncKdcResponse
- Defined in:
- lib/rex/proto/kerberos/model/enc_kdc_response.rb
Overview
Based on datatracker.ietf.org/doc/html/rfc6806.html#section-11
EncKDCRepPart ::= SEQUENCE {
key [0] EncryptionKey,
last-req [1] LastReq,
nonce [2] UInt32,
key-expiration [3] KerberosTime OPTIONAL,
flags [4] TicketFlags,
authtime [5] KerberosTime,
starttime [6] KerberosTime OPTIONAL,
endtime [7] KerberosTime,
renew-till [8] KerberosTime OPTIONAL,
srealm [9] Realm,
sname [10] PrincipalName,
caddr [11] HostAddresses OPTIONAL
encrypted-pa-data [12] SEQUENCE OF PA-DATA OPTIONAL
}
Constant Summary
Constants included from Rex::Proto::Kerberos::Model
AP_REP, AP_REQ, AS_REP, AS_REQ, AUTHENTICATOR, ENC_AP_REP_PART, ENC_KRB_CRED_PART, KRB_CRED, KRB_ERROR, TGS_REP, TGS_REQ, TICKET, VERSION
Instance Attribute Summary collapse
-
#auth_time ⇒ Time
The time of initial authentication for the named principal.
-
#caddr ⇒ Rex::Proto::Kerberos::Model::HostAddress
These are the addresses from which the ticket can be used.
-
#end_time ⇒ Time
not be honored (its expiration time).
-
#flags ⇒ Rex::Proto::Kerberos::Model::KdcOptionFlags
requested when the ticket was issued.
-
#key ⇒ Rex::Proto::Kerberos::Model::EncryptionKey
The session key.
-
#key_expiration ⇒ Time
KDC and specifies the time that the client’s secret key is due to expire.
-
#last_req ⇒ Array<Rex::Proto::Kerberos::Model::LastRequest>
of the last request by a principal.
-
#nonce ⇒ Integer
Random number.
-
#pa_data ⇒ Array<Rex::Proto::Kerberos::Model::PreAuthDataEntry>?
An array of PreAuthDataEntry.
-
#renew_till ⇒ Time
RENEWABLE flag set in the flags field.
-
#sname ⇒ Rex::Proto::Kerberos::Model::PrincipalName
The name part of the server’s identity.
-
#srealm ⇒ String
The realm part of the server’s principal identifier.
-
#start_time ⇒ Time
Specifies the time after which the ticket is valid.
Instance Method Summary collapse
-
#decode(input) ⇒ self
Decodes the Rex::Proto::Kerberos::Model::EncKdcResponse from an input.
-
#encode ⇒ Object
Rex::Proto::Kerberos::Model::EncKdcResponse encoding isn’t supported.
Methods inherited from Element
attr_accessor, attributes, #attributes, decode, #initialize
Constructor Details
This class inherits a constructor from Rex::Proto::Kerberos::Model::Element
Instance Attribute Details
#auth_time ⇒ Time
Returns the time of initial authentication for the named principal.
44 45 46 |
# File 'lib/rex/proto/kerberos/model/enc_kdc_response.rb', line 44 def auth_time @auth_time end |
#caddr ⇒ Rex::Proto::Kerberos::Model::HostAddress
Returns These are the addresses from which the ticket can be used.
65 66 67 |
# File 'lib/rex/proto/kerberos/model/enc_kdc_response.rb', line 65 def caddr @caddr end |
#end_time ⇒ Time
not be honored (its expiration time)
51 52 53 |
# File 'lib/rex/proto/kerberos/model/enc_kdc_response.rb', line 51 def end_time @end_time end |
#flags ⇒ Rex::Proto::Kerberos::Model::KdcOptionFlags
requested when the ticket was issued
41 42 43 |
# File 'lib/rex/proto/kerberos/model/enc_kdc_response.rb', line 41 def flags @flags end |
#key ⇒ Rex::Proto::Kerberos::Model::EncryptionKey
Returns The session key.
26 27 28 |
# File 'lib/rex/proto/kerberos/model/enc_kdc_response.rb', line 26 def key @key end |
#key_expiration ⇒ Time
KDC and specifies the time that the client’s secret key is due to expire
37 38 39 |
# File 'lib/rex/proto/kerberos/model/enc_kdc_response.rb', line 37 def key_expiration @key_expiration end |
#last_req ⇒ Array<Rex::Proto::Kerberos::Model::LastRequest>
of the last request by a principal
30 31 32 |
# File 'lib/rex/proto/kerberos/model/enc_kdc_response.rb', line 30 def last_req @last_req end |
#nonce ⇒ Integer
Returns random number.
33 34 35 |
# File 'lib/rex/proto/kerberos/model/enc_kdc_response.rb', line 33 def nonce @nonce end |
#pa_data ⇒ Array<Rex::Proto::Kerberos::Model::PreAuthDataEntry>?
Returns An array of PreAuthDataEntry. nil if not present.
68 69 70 |
# File 'lib/rex/proto/kerberos/model/enc_kdc_response.rb', line 68 def pa_data @pa_data end |
#renew_till ⇒ Time
RENEWABLE flag set in the flags field. It indicates the maximum endtime that may be included in a renewal
56 57 58 |
# File 'lib/rex/proto/kerberos/model/enc_kdc_response.rb', line 56 def renew_till @renew_till end |
#sname ⇒ Rex::Proto::Kerberos::Model::PrincipalName
Returns The name part of the server’s identity.
62 63 64 |
# File 'lib/rex/proto/kerberos/model/enc_kdc_response.rb', line 62 def sname @sname end |
#srealm ⇒ String
Returns The realm part of the server’s principal identifier.
59 60 61 |
# File 'lib/rex/proto/kerberos/model/enc_kdc_response.rb', line 59 def srealm @srealm end |
#start_time ⇒ Time
Returns Specifies the time after which the ticket is valid.
47 48 49 |
# File 'lib/rex/proto/kerberos/model/enc_kdc_response.rb', line 47 def start_time @start_time end |
Instance Method Details
#decode(input) ⇒ self
Decodes the Rex::Proto::Kerberos::Model::EncKdcResponse from an input
75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/rex/proto/kerberos/model/enc_kdc_response.rb', line 75 def decode(input) case input when String decode_string(input) when OpenSSL::ASN1::ASN1Data decode_asn1(input) else raise ::Rex::Proto::Kerberos::Model::Error::KerberosDecodingError, 'Failed to decode EncKdcResponse, invalid input' end self end |
#encode ⇒ Object
Rex::Proto::Kerberos::Model::EncKdcResponse encoding isn’t supported
91 92 93 |
# File 'lib/rex/proto/kerberos/model/enc_kdc_response.rb', line 91 def encode raise ::NotImplementedError, 'EncKdcResponse encoding not supported' end |