Skip to content

Commit a48b3d3

Browse files
authored
docs: add note in every example pointing out that encryption context is not secret (#267)
1 parent b10c415 commit a48b3d3

26 files changed

+26
-0
lines changed

examples/src/crypto_materials_manager/caching/simple_cache.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def run(aws_kms_cmk, source_plaintext):
3636
:param bytes source_plaintext: Plaintext to encrypt
3737
"""
3838
# Prepare your encryption context.
39+
# Remember that your encryption context is NOT SECRET.
3940
# https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context
4041
encryption_context = {
4142
"encryption": "context",

examples/src/crypto_materials_manager/custom/algorithm_suite_enforcement.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def run(aws_kms_cmk, source_plaintext):
8282
:param bytes source_plaintext: Plaintext to encrypt
8383
"""
8484
# Prepare your encryption context.
85+
# Remember that your encryption context is NOT SECRET.
8586
# https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context
8687
encryption_context = {
8788
"encryption": "context",

examples/src/crypto_materials_manager/custom/requiring_encryption_context_fields.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ def run(aws_kms_cmk, source_plaintext):
7777
:param bytes source_plaintext: Plaintext to encrypt
7878
"""
7979
# Prepare your encryption context.
80+
# Remember that your encryption context is NOT SECRET.
8081
# https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context
8182
encryption_context = {
8283
"encryption": "context",

examples/src/file_streaming_defaults.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def run(aws_kms_cmk, source_plaintext_filename):
3030
decrypted_filename = ciphertext_filename + ".decrypted"
3131

3232
# Prepare your encryption context.
33+
# Remember that your encryption context is NOT SECRET.
3334
# https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context
3435
encryption_context = {
3536
"encryption": "context",

examples/src/in_memory_streaming_defaults.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def run(aws_kms_cmk, source_plaintext):
2525
:param bytes source_plaintext: Plaintext to encrypt
2626
"""
2727
# Prepare your encryption context.
28+
# Remember that your encryption context is NOT SECRET.
2829
# https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context
2930
encryption_context = {
3031
"encryption": "context",

examples/src/keyring/aws_kms/act_like_aws_kms_master_key_provider.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def run(aws_kms_cmk, aws_kms_additional_cmks, source_plaintext):
4646
:param bytes source_plaintext: Plaintext to encrypt
4747
"""
4848
# Prepare your encryption context.
49+
# Remember that your encryption context is NOT SECRET.
4950
# https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context
5051
encryption_context = {
5152
"encryption": "context",

examples/src/keyring/aws_kms/custom_client_supplier.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ def run(aws_kms_cmk, source_plaintext):
7878
:param bytes source_plaintext: Plaintext to encrypt
7979
"""
8080
# Prepare your encryption context.
81+
# Remember that your encryption context is NOT SECRET.
8182
# https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context
8283
encryption_context = {
8384
"encryption": "context",

examples/src/keyring/aws_kms/custom_kms_client_config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def run(aws_kms_cmk, source_plaintext):
3838
:param bytes source_plaintext: Plaintext to encrypt
3939
"""
4040
# Prepare your encryption context.
41+
# Remember that your encryption context is NOT SECRET.
4142
# https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context
4243
encryption_context = {
4344
"encryption": "context",

examples/src/keyring/aws_kms/discovery_decrypt.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def run(aws_kms_cmk, source_plaintext):
4141
:param bytes source_plaintext: Plaintext to encrypt
4242
"""
4343
# Prepare your encryption context.
44+
# Remember that your encryption context is NOT SECRET.
4445
# https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context
4546
encryption_context = {
4647
"encryption": "context",

examples/src/keyring/aws_kms/discovery_decrypt_in_region_only.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def run(aws_kms_cmk, source_plaintext):
4545
:param bytes source_plaintext: Plaintext to encrypt
4646
"""
4747
# Prepare your encryption context.
48+
# Remember that your encryption context is NOT SECRET.
4849
# https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#encryption-context
4950
encryption_context = {
5051
"encryption": "context",

0 commit comments

Comments
 (0)