Skip to content

Commit 5a75c43

Browse files
authored
feat: repair dependencies in item encryptor (#465)
* feat: repair dependencies in item encryptor et al
1 parent fa2b610 commit 5a75c43

File tree

7 files changed

+31
-2
lines changed

7 files changed

+31
-2
lines changed

DynamoDbEncryption/dafny/DynamoDbEncryptionTransforms/Model/AwsCryptographyDbEncryptionSdkDynamoDbTransformsTypes.dfy

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
include "../../../../submodules/MaterialProviders/StandardLibrary/src/Index.dfy"
55
include "../../DynamoDbEncryption/src/Index.dfy"
66
include "../../DynamoDbItemEncryptor/src/Index.dfy"
7+
include "../../StructuredEncryption/src/Index.dfy"
8+
include "../../../../submodules/MaterialProviders/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Index.dfy"
79
include "../../../../submodules/MaterialProviders/ComAmazonawsDynamodb/src/Index.dfy"
810
module {:extern "software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types" } AwsCryptographyDbEncryptionSdkDynamoDbTransformsTypes
911
{
@@ -12,6 +14,8 @@ include "../../../../submodules/MaterialProviders/StandardLibrary/src/Index.dfy"
1214
import opened UTF8
1315
import AwsCryptographyDbEncryptionSdkDynamoDbTypes
1416
import AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptorTypes
17+
import AwsCryptographyDbEncryptionSdkStructuredEncryptionTypes
18+
import AwsCryptographyMaterialProvidersTypes
1519
import ComAmazonawsDynamodbTypes
1620
// Generic helpers for verification of mock/unit tests.
1721
datatype DafnyCallEvent<I, O> = DafnyCallEvent(input: I, output: O)
@@ -696,6 +700,8 @@ include "../../../../submodules/MaterialProviders/StandardLibrary/src/Index.dfy"
696700
// Any dependent models are listed here
697701
| AwsCryptographyDbEncryptionSdkDynamoDb(AwsCryptographyDbEncryptionSdkDynamoDb: AwsCryptographyDbEncryptionSdkDynamoDbTypes.Error)
698702
| AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor(AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor: AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptorTypes.Error)
703+
| AwsCryptographyDbEncryptionSdkStructuredEncryption(AwsCryptographyDbEncryptionSdkStructuredEncryption: AwsCryptographyDbEncryptionSdkStructuredEncryptionTypes.Error)
704+
| AwsCryptographyMaterialProviders(AwsCryptographyMaterialProviders: AwsCryptographyMaterialProvidersTypes.Error)
699705
| ComAmazonawsDynamodb(ComAmazonawsDynamodb: ComAmazonawsDynamodbTypes.Error)
700706
// The Collection error is used to collect several errors together
701707
// This is useful when composing OR logic.

DynamoDbEncryption/dafny/DynamoDbEncryptionTransforms/Model/DynamoDbEncryptionTransforms.smithy

+10
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ use com.amazonaws.dynamodb#AttributeMap
1111
use aws.cryptography.dbEncryptionSdk.dynamoDb#DynamoDbEncryption
1212
use aws.cryptography.dbEncryptionSdk.dynamoDb.itemEncryptor#DynamoDbItemEncryptor
1313
use aws.cryptography.dbEncryptionSdk.dynamoDb#VersionNumber
14+
use aws.cryptography.dbEncryptionSdk.structuredEncryption#StructuredEncryption
15+
use aws.cryptography.materialProviders#AwsCryptographicMaterialProviders
1416

1517
use aws.polymorph#localService
1618
use aws.polymorph#javadoc
@@ -22,6 +24,7 @@ use aws.polymorph#javadoc
2224
DynamoDB_20120810,
2325
DynamoDbEncryption,
2426
DynamoDbItemEncryptor,
27+
StructuredEncryption
2528
]
2629
)
2730
service DynamoDbEncryptionTransforms {
@@ -96,8 +99,15 @@ structure DynamoDbItemEncryptorReference {}
9699
@aws.polymorph#reference(service: aws.cryptography.dbEncryptionSdk.dynamoDb#DynamoDbEncryption)
97100
structure DynamoDbEncryptionReference {}
98101

102+
@aws.polymorph#reference(service: aws.cryptography.dbEncryptionSdk.structuredEncryption#StructuredEncryption)
103+
structure StructuredEncryptionReference {}
104+
105+
@aws.polymorph#reference(service: aws.cryptography.materialProviders#AwsCryptographicMaterialProviders)
106+
structure AwsCryptographicMaterialProvidersReference {}
107+
99108
@error("client")
100109
structure DynamoDbEncryptionTransformsException {
101110
@required
102111
message: String,
103112
}
113+

DynamoDbEncryption/dafny/DynamoDbItemEncryptor/Model/AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptorTypes.dfy

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// Do not modify this file. This file is machine generated, and any changes to it will be overwritten.
44
include "../../../../submodules/MaterialProviders/StandardLibrary/src/Index.dfy"
55
include "../../DynamoDbEncryption/src/Index.dfy"
6+
include "../../StructuredEncryption/src/Index.dfy"
67
include "../../../../submodules/MaterialProviders/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Index.dfy"
78
include "../../../../submodules/MaterialProviders/AwsCryptographyPrimitives/src/Index.dfy"
89
include "../../../../submodules/MaterialProviders/ComAmazonawsDynamodb/src/Index.dfy"
@@ -12,6 +13,7 @@ include "../../../../submodules/MaterialProviders/StandardLibrary/src/Index.dfy"
1213
import opened StandardLibrary.UInt
1314
import opened UTF8
1415
import AwsCryptographyDbEncryptionSdkDynamoDbTypes
16+
import AwsCryptographyDbEncryptionSdkStructuredEncryptionTypes
1517
import AwsCryptographyMaterialProvidersTypes
1618
import AwsCryptographyPrimitivesTypes
1719
import ComAmazonawsDynamodbTypes
@@ -126,6 +128,7 @@ include "../../../../submodules/MaterialProviders/StandardLibrary/src/Index.dfy"
126128
)
127129
// Any dependent models are listed here
128130
| AwsCryptographyDbEncryptionSdkDynamoDb(AwsCryptographyDbEncryptionSdkDynamoDb: AwsCryptographyDbEncryptionSdkDynamoDbTypes.Error)
131+
| AwsCryptographyDbEncryptionSdkStructuredEncryption(AwsCryptographyDbEncryptionSdkStructuredEncryption: AwsCryptographyDbEncryptionSdkStructuredEncryptionTypes.Error)
129132
| AwsCryptographyMaterialProviders(AwsCryptographyMaterialProviders: AwsCryptographyMaterialProvidersTypes.Error)
130133
| AwsCryptographyPrimitives(AwsCryptographyPrimitives: AwsCryptographyPrimitivesTypes.Error)
131134
| ComAmazonawsDynamodb(ComAmazonawsDynamodb: ComAmazonawsDynamodbTypes.Error)

DynamoDbEncryption/dafny/DynamoDbItemEncryptor/Model/DynamoDbItemEncryptor.smithy

+5-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ use aws.cryptography.dbEncryptionSdk.dynamoDb#PlaintextOverride
2323
use aws.cryptography.materialProviders#AwsCryptographicMaterialProviders
2424
use aws.cryptography.primitives#AwsCryptographicPrimitives
2525
use aws.cryptography.dbEncryptionSdk.dynamoDb#DynamoDbEncryption
26+
use aws.cryptography.dbEncryptionSdk.structuredEncryption#StructuredEncryption
2627

2728
@localService(
2829
sdkId: "DynamoDbItemEncryptor",
@@ -31,7 +32,8 @@ use aws.cryptography.dbEncryptionSdk.dynamoDb#DynamoDbEncryption
3132
AwsCryptographicPrimitives,
3233
DynamoDB_20120810,
3334
AwsCryptographicMaterialProviders,
34-
DynamoDbEncryption
35+
StructuredEncryption,
36+
DynamoDbEncryption,
3537
]
3638
)
3739
service DynamoDbItemEncryptor {
@@ -206,6 +208,8 @@ structure DecryptItemOutput {
206208

207209
@aws.polymorph#reference(service: aws.cryptography.primitives#AwsCryptographicPrimitives)
208210
structure AtomicPrimitivesReference {}
211+
@aws.polymorph#reference(service: aws.cryptography.dbEncryptionSdk.structuredEncryption#StructuredEncryption)
212+
structure StructuredEncryptionReference {}
209213

210214
/////////////
211215
// Errors

DynamoDbEncryption/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/dbencryptionsdk/dynamodb/itemencryptor/ToNative.java

+3
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ public static RuntimeException Error(Error dafnyValue) {
6262
if (dafnyValue.is_AwsCryptographyMaterialProviders()) {
6363
return software.amazon.cryptography.materialproviders.ToNative.Error(dafnyValue.dtor_AwsCryptographyMaterialProviders());
6464
}
65+
if (dafnyValue.is_AwsCryptographyDbEncryptionSdkStructuredEncryption()) {
66+
return software.amazon.cryptography.dbencryptionsdk.structuredencryption.ToNative.Error(dafnyValue.dtor_AwsCryptographyDbEncryptionSdkStructuredEncryption());
67+
}
6568
if (dafnyValue.is_AwsCryptographyDbEncryptionSdkDynamoDb()) {
6669
return software.amazon.cryptography.dbencryptionsdk.dynamodb.ToNative.Error(dafnyValue.dtor_AwsCryptographyDbEncryptionSdkDynamoDb());
6770
}

DynamoDbEncryption/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/dbencryptionsdk/dynamodb/transforms/ToNative.java

+3
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ public static RuntimeException Error(Error dafnyValue) {
115115
if (dafnyValue.is_AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor()) {
116116
return software.amazon.cryptography.dbencryptionsdk.dynamodb.itemencryptor.ToNative.Error(dafnyValue.dtor_AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor());
117117
}
118+
if (dafnyValue.is_AwsCryptographyDbEncryptionSdkStructuredEncryption()) {
119+
return software.amazon.cryptography.dbencryptionsdk.structuredencryption.ToNative.Error(dafnyValue.dtor_AwsCryptographyDbEncryptionSdkStructuredEncryption());
120+
}
118121
OpaqueError.Builder nativeBuilder = OpaqueError.builder();
119122
nativeBuilder.obj(dafnyValue);
120123
return nativeBuilder.build();

DynamoDbEncryption/runtimes/net/DynamoDbEncryption.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<ItemGroup>
1313
<PackageReference Include="AWSSDK.Core" Version="3.7.103" />
14-
<PackageReference Include="DafnyRuntime" Version="4.0.0.50303" />
14+
<PackageReference Include="DafnyRuntime" Version="4.2.0" />
1515
<PackageReference Include="Portable.BouncyCastle" Version="1.8.5.2" />
1616
<!--
1717
System.Collections.Immutable can be removed once dafny.msbuild is updated with

0 commit comments

Comments
 (0)