Module: Mongo::Crypt::KMS

Defined in:
lib/mongo/crypt/kms.rb,
lib/mongo/crypt/kms/credentials.rb,
lib/mongo/crypt/kms/aws/credentials.rb,
lib/mongo/crypt/kms/gcp/credentials.rb,
lib/mongo/crypt/kms/kmip/credentials.rb,
lib/mongo/crypt/kms/azure/credentials.rb,
lib/mongo/crypt/kms/local/credentials.rb,
lib/mongo/crypt/kms/azure/access_token.rb,
lib/mongo/crypt/kms/aws/master_document.rb,
lib/mongo/crypt/kms/gcp/master_document.rb,
lib/mongo/crypt/kms/master_key_document.rb,
lib/mongo/crypt/kms/kmip/master_document.rb,
lib/mongo/crypt/kms/azure/master_document.rb,
lib/mongo/crypt/kms/local/master_document.rb,
lib/mongo/crypt/kms/gcp/credentials_retriever.rb,
lib/mongo/crypt/kms/azure/credentials_retriever.rb

Overview

rubocop:disable Style/Documentation

Defined Under Namespace

Modules: AWS, Azure, GCP, KMIP, Local, Validations Classes: Credentials, CredentialsNotFound, MasterKeyDocument

Class Method Summary collapse

Class Method Details

.provider_base_type(identifier) ⇒ String

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns the base provider type from a KMS provider identifier. For example, "aws:name1" returns "aws" and :aws returns "aws".

Parameters:

  • identifier (String | Symbol)

    The KMS provider identifier.

Returns:

  • (String)

    The base provider type.



33
34
35
# File 'lib/mongo/crypt/kms.rb', line 33

def self.provider_base_type(identifier)
  identifier.to_s.split(':').first
end