Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-15163

[Drivers] Errors in Doc

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: drivers
    • Labels:
      None

      https://docs.mongodb.com/drivers/security/client-side-field-level-encryption-local-key-to-kms/

      Section 4 - "Create a New Data Encryption Key" 

      Java Sync instructions missing

       
      String keyVaultNamespace = "admin.datakeys";
      ClientEncryption clientEncryption = ClientEncryptions.create(ClientEncryptionSettings.builder() ...
       
      and wrong parenthesis and comma positioning:
       

      BsonString masterKeyArn = new BsonString("<Master Key ARN>"); // e.g. "arn:aws:kms:us-east-2:111122223333:alias/test-key"
      BsonString masterKeyRegion = new BsonString("<Master Key Region>")
      DataKeyOptions dataKeyOptions = new DataKeyOptions().masterKey(
      new BsonDocument()
      .append("key", masterKeyArn));
      .append("region", masterKeyRegion)

      should be

      BsonString masterKeyArn = new BsonString("<Master Key ARN>"); // e.g. "arn:aws:kms:us-east-2:111122223333:alias/test-key"
      BsonString masterKeyRegion = new BsonString("<Master Key Region>")
      DataKeyOptions dataKeyOptions = new DataKeyOptions().masterKey(
      new BsonDocument()
      .append("key", masterKeyArn)
      .append("region", masterKeyRegion));

            Assignee:
            jordan.smith@mongodb.com Jordan Smith
            Reporter:
            greg.cox@mongodb.com Greg Cox
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              1 year, 18 weeks, 2 days ago