Class SMBSessionBuilder
java.lang.Object
com.hierynomus.smbj.connection.SMBSessionBuilder
[MS-SMB2] 3.2.5.3.1 Handling a New Authentication
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interface -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final Stringprivate final SmbConfigprivate final Connectionprivate final ConnectionContext(package private) static final String(package private) static final byte[](package private) static final byte[](package private) static final byte[](package private) static final byte[](package private) static final byte[](package private) static final byte[](package private) static final byte[](package private) static final byte[](package private) static final byte[](package private) static final byte[](package private) static final byte[]private static final org.slf4j.Loggerprivate final SessionTableprivate final SMBSessionBuilder.SessionFactoryprivate final SessionTable -
Constructor Summary
ConstructorsConstructorDescriptionSMBSessionBuilder(Connection connection, SmbConfig config, SMBSessionBuilder.SessionFactory sessionFactory) -
Method Summary
Modifier and TypeMethodDescriptionprivate SecretKeyprivate voidderiveKeys(SMB2SessionSetup response, SMB2Dialect dialect, SessionContext context) establish(AuthenticationContext authContext) Establish a new session on the connection using the passed credentials.private AuthenticatorgetAuthenticator(AuthenticationContext context) private SMBSessionBuilder.BuilderContextinitiateSessionSetup(SMBSessionBuilder.BuilderContext ctx, byte[] securityContext) private SMBSessionBuilder.BuilderContextnewContext(AuthenticationContext authContext, Authenticator authenticator) private Sessionprivate voidprocessAuthenticationToken(SMBSessionBuilder.BuilderContext ctx, byte[] inputToken) private Sessionprivate voidupdatePreauthIntegrityValue(SMBSessionBuilder.BuilderContext ctx, SessionContext sessionContext, SMB2Packet packet) private void
-
Field Details
-
KDF_ENC_LABEL_SMB311
static final byte[] KDF_ENC_LABEL_SMB311 -
KDF_DEC_LABEL_SMB311
static final byte[] KDF_DEC_LABEL_SMB311 -
KDF_ENCDEC_LABEL
static final byte[] KDF_ENCDEC_LABEL -
KDF_ENC_CONTEXT
static final byte[] KDF_ENC_CONTEXT -
KDF_DEC_CONTEXT
static final byte[] KDF_DEC_CONTEXT -
KDF_SIGN_CONTEXT
static final byte[] KDF_SIGN_CONTEXT -
KDF_SIGN_LABEL
static final byte[] KDF_SIGN_LABEL -
KDF_SIGN_LABEL_SMB311
static final byte[] KDF_SIGN_LABEL_SMB311 -
KDF_APP_CONTEXT
static final byte[] KDF_APP_CONTEXT -
KDF_APP_LABEL
static final byte[] KDF_APP_LABEL -
KDF_APP_LABEL_SMB311
static final byte[] KDF_APP_LABEL_SMB311 -
HMAC_SHA256_ALGORITHM
- See Also:
-
AES_128_CMAC_ALGORITHM
- See Also:
-
logger
private static final org.slf4j.Logger logger -
config
-
connectionContext
-
sessionFactory
-
sessionTable
-
preauthSessionTable
-
connection
-
-
Constructor Details
-
SMBSessionBuilder
public SMBSessionBuilder(Connection connection, SmbConfig config, SMBSessionBuilder.SessionFactory sessionFactory)
-
-
Method Details
-
establish
Establish a new session on the connection using the passed credentials.- Returns:
- a (new) Session that is authenticated for the user.
-
newContext
private SMBSessionBuilder.BuilderContext newContext(AuthenticationContext authContext, Authenticator authenticator) -
setupSession
- Throws:
IOException
-
newSession
-
processAuthenticationToken
private void processAuthenticationToken(SMBSessionBuilder.BuilderContext ctx, byte[] inputToken) throws IOException - Throws:
IOException
-
initiateSessionSetup
private SMBSessionBuilder.BuilderContext initiateSessionSetup(SMBSessionBuilder.BuilderContext ctx, byte[] securityContext) throws TransportException - Throws:
TransportException
-
getAuthenticator
- Throws:
SpnegoException
-
validateAndSetSigning
-
updatePreauthIntegrityValue
private void updatePreauthIntegrityValue(SMBSessionBuilder.BuilderContext ctx, SessionContext sessionContext, SMB2Packet packet) -
deriveKeys
-
deriveKey
-