mongo鉴权链路分析
2025-07-23 14:59:49 0 举报
AI智能生成
mongo鉴权链路分析
作者其他创作
大纲/内容
MongoClient 初始化
List<ServerAddress>
MongoCredential
MongoClientOptions
MultiServerCluster
ClusterId
ClusterType
ClusterSettings
DefaultClusterableServerFactory
addressToServerTupleMap(ServerAddress -> DefaultServer)
ServerId
DefaultConnectionPool
ConnectionPoolSettings
ConcurrentPool
maxSize
UsageTrackingInternalConnectionItemFactory
InternalStreamConnectionFactory
List<Authenticator>
StreamFactory
ConcurrentLinkedDeque<UsageTrackingInternalConnection>
Runnable maintenanceTask
ScheduledExecutorService sizeMaintenanceTimer
DefaultConnectionFactory
DefaultServerMonitorFactory
ServerSettings
InternalStreamConnectionFactory
DefaultConnectionPool
获取或创建连接
MongoTemplate
MongoClientDelegate$DelegateOperationExecutor
FindOperation
ClusterBindingConnectionSource
DefaultServer
DefaultConnectionPool
ConcurrentPool
UsageTrackingInternalConnectionItemFactory
InternalStreamConnectionFactory
InternalStreamConnection
InternalStreamConnectionInitializer
打开连接
创建并打开socketStream
初始化连接
initializeConnectionDescription
执行命令:获取isMaster、buildInfo
构建ConnectionDescription
setFirstAuthenticator
ScramShaAuthenticator + SCRAM_SHA_1
authenticateAll
createSaslClient
执行命令:step 0,computeClientFirstMessage
执行命令:step 1,computeClientFinalMessage
执行命令:step 2,validateServerSignature
disposeOfSaslClient
completeConnectionDescriptionInitialization
更新ConnectionDescription
修改连接状态

收藏
0 条评论
下一页