https://github.com/kevinalbs/markup
A utility for testing the Automatic Encryption Shared Library
https://github.com/kevinalbs/markup
csfle
Last synced: 8 months ago
JSON representation
A utility for testing the Automatic Encryption Shared Library
- Host: GitHub
- URL: https://github.com/kevinalbs/markup
- Owner: kevinAlbs
- Created: 2022-11-28T12:49:30.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-01-19T20:42:30.000Z (over 3 years ago)
- Last Synced: 2024-10-09T12:04:14.642Z (over 1 year ago)
- Topics: csfle
- Language: Python
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
A utility for testing the [Automatic Encryption Shared Library](https://www.mongodb.com/docs/manual/core/queryable-encryption/reference/shared-library/).
Examples:
```
$ python markup.py --version --libpath ~/bin/crypt_shared-6.0.0/lib/mongo_crypt_v1.dylib
mongo_crypt_v1-dev-6.0.0
```
```
$ cat example-input.json | python markup.py --libpath ~/bin/crypt_shared-6.0.0/lib/mongo_crypt_v1.dylib
{
"hasEncryptionPlaceholders": true,
"schemaRequiresEncryption": true,
"result": {
"find": "test",
"filter": {
"value": {
"$eq": {
"$binary": {
"base64": "A1gAAAAQdAACAAAAEGEAAgAAAAVraQAQAAAABBI0VngSNJh2EjQSNFZ4kBIFa3UAEAAAAAQSNFZ4EjSYdhI0EjRWeJASEHYAQOIBABJjbQAAAAAAAAAAAAA=",
"subType": "06"
}
}
}
},
"encryptionInformation": {
"type": {
"$numberInt": "1"
},
"schema": {
"db.test": {
"escCollection": "esc",
"eccCollection": "ecc",
"ecocCollection": "ecoc",
"fields": [
{
"keyId": {
"$binary": {
"base64": "EjRWeBI0mHYSNBI0VniQEg==",
"subType": "04"
}
},
"path": "value",
"bsonType": "int",
"queries": {
"queryType": "equality",
"contention": {
"$numberLong": "0"
}
}
}
]
}
}
}
}
}
```
`markup.py` depends on cffi. Use `pip install cffi`.