[DOCS-14207] FLE Code examples are a bit missleading Created: 10/Feb/21  Updated: 29/Oct/23  Resolved: 19/Feb/21

Status: Closed
Project: Documentation
Component/s: drivers, Field Level Encryption
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Pavel Duchovny Assignee: Kailie Yuan
Resolution: Fixed Votes: 0
Labels: csfle
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 2 years, 50 weeks, 5 days ago
Story Points: 1

 Description   

Description

Hello,

For AWS examples there is a python command that does not add up for example:

client_encryption = pymongo.encryption.ClientEncryption(
   {
     "aws": {
       "accessKeyId": "<IAM User Access Key ID>",
       "secretAccessKey": "<IAM User Secret Access Key>"
     }
   },
   key_vault_namespace,
   client,
   CodecOptions(uuid_representation=STANDARD)
)
data_key_id = client_encryption.create_data_key("aws")

The "client" is never defined no where, and the client_encryption.create_data_key("aws") expects to get actually a master_key parameter, eg:

data_key_id = client_encryption.create_data_key(kms_provider="aws",master_key = { "region": "eu-west-1","key": "arn:aws:kms:eu-west-1:..."})

I think those are critical for people to onboard FLE succesfully.

FYI

Scope of changes

As a user, I understand where variables are defined that are used in examples.

Refer to the companion project and the other languages in the guide for context on this project.

Impact to Other Docs

MVP (Work and Date)

Resources (Scope or Design Docs, Invision, etc.)



 Comments   
Comment by Kailie Yuan [ 19/Feb/21 ]

https://github.com/mongodb/docs-ecosystem/pull/722

Generated at Thu Feb 08 08:09:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.