Class: Mongo::Auth::Scram256::Conversation Private
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
|
|
|
Instance Chain:
|
|
| Inherits: |
Mongo::Auth::ScramConversationBase
|
| Defined in: | lib/mongo/auth/scram256/conversation.rb |
Overview
Defines behavior around a single SCRAM-SHA-256 conversation between the client and server.
Constant Summary
::Mongo::Auth::SaslConversationBase - Inherited
CLIENT_CONTINUE_MESSAGE, CLIENT_FIRST_MESSAGE
::Mongo::Auth::ScramConversationBase - Inherited
Class Method Summary
::Mongo::Auth::ScramConversationBase - Inherited
| .new | Create the new conversation. |
::Mongo::Auth::ConversationBase - Inherited
| .new | Create the new conversation. |
Instance Attribute Summary
::Mongo::Auth::ScramConversationBase - Inherited
| #client_nonce, | |
| #id | Get the id of the conversation. |
| #server_verified? | Whether the client verified the ServerSignature from the server. |
| #auth_message |
|
| #iterations | Get the iterations from the server response. |
| #payload_data | Get the data from the returned payload. |
| #salt | Gets the salt from the server response. |
| #server_nonce | Get the server nonce from the payload. |
::Mongo::Auth::ConversationBase - Inherited
Instance Method Summary
- #digest private Internal use only
-
#hi(data)
private
Internal use only
HI algorithm implementation.
-
#salted_password
private
Internal use only
Salted password algorithm implementation.
::Mongo::Auth::ScramConversationBase - Inherited
| #continue | Continue the SCRAM conversation. |
| #finalize | Finalize the SCRAM conversation. |
| #process_continue_response | Processes the second response from the server. |
| #speculative_auth_document | Returns the hash to provide to the server in the handshake as value of the speculativeAuthenticate key. |
| #cache_key, | |
| #check_server_signature | Looks for field ‘v’ in payload data, if it is present verifies the server signature. |
| #client_empty_message | Get the empty client message. |
| #client_final |
|
| #client_final_message | Get the final client message. |
| #client_first_message_options, #client_first_payload, | |
| #client_key |
|
| #client_proof |
|
| #client_signature |
|
| #compare_digest, | |
| #first_bare | First bare implementation. |
| #h | H algorithm implementation. |
| #hmac | HMAC algorithm implementation. |
| #parse_payload | Parses a payload like a=value,b=value2 into a hash like |
| #server_key |
|
| #server_signature |
|
| #stored_key | Stored key algorithm implementation. |
| #without_proof | Get the without proof message. |
| #xor | XOR operation for two strings. |
::Mongo::Auth::SaslConversationBase - Inherited
| #start | Start the SASL conversation. |
| #auth_mechanism_name | Gets the auth mechanism name for the conversation class. |
| #client_first_document, #client_first_message_options, | |
| #validate_server_nonce! | Helper method to validate that server nonce starts with the client nonce. |
::Mongo::Auth::ConversationBase - Inherited
| #build_message, | |
| #speculative_auth_document | Returns the hash to provide to the server in the handshake as value of the speculativeAuthenticate key. |
| #validate_external_auth_source | |
Instance Method Details
#digest (private)
# File 'lib/mongo/auth/scram256/conversation.rb', line 60
def digest @digest ||= OpenSSL::Digest::SHA256.new.freeze end
#hi(data) (private)
HI algorithm implementation.
#salted_password (private)
Salted password algorithm implementation.
# File 'lib/mongo/auth/scram256/conversation.rb', line 54
def salted_password @salted_password ||= CredentialCache.cache(cache_key(:salted_password)) do hi(user.sasl_prepped_password) end end