diff --git a/source/security-and-authentication/mongodb-aws-auth.txt b/source/security-and-authentication/mongodb-aws-auth.txt index 2482f2eb..cd4137cb 100644 --- a/source/security-and-authentication/mongodb-aws-auth.txt +++ b/source/security-and-authentication/mongodb-aws-auth.txt @@ -113,15 +113,11 @@ provider: mongo.custom.auth.mechanism.providerClass=sample.AwsAssumeRoleCredentialProvider mongodbaws.auth.mechanism.roleArn=arn:aws:iam:::role/ -In this example, the ``sample.AwsAssumeRoleCredentialProvider`` -implementation class must be available on the classpath. The -authentication provider class reads the ARN you specify in the -``roleArn`` property. - The ``AwsAssumeRoleCredentialProvider`` class defines ``init()`` and ``validate()`` methods that are called when the connector initializes. -It returns an object of type ``com.mongodb.MongoCredential`` that is -used by the ``MongoClient``. The following code defines the custom +The ``getCustomCredential()`` method returns an object of type +``com.mongodb.MongoCredential`` that is used by the ``MongoClient`` +constructed for the connector. The following code defines the custom authentication provider: .. code-block:: java @@ -163,6 +159,11 @@ authentication provider: } } +In this example, the ``sample.AwsAssumeRoleCredentialProvider`` +implementation class must be available on the classpath. The +authentication provider class reads the ARN you specify in the +``roleArn`` property. + To view an example of a ``pom.xml`` file that can build the complete JAR containing the implementation class, see the `Kafka Connector GitHub repository README file