Commits (3)
...@@ -30,6 +30,7 @@ namespace Coscine.ResourceTypeWaterbutlerRdsS3.Test ...@@ -30,6 +30,7 @@ namespace Coscine.ResourceTypeWaterbutlerRdsS3.Test
private string _readUser; private string _readUser;
private string _writeUser; private string _writeUser;
private string _accessKey;
[OneTimeSetUp] [OneTimeSetUp]
public void Setup() public void Setup()
...@@ -45,7 +46,7 @@ namespace Coscine.ResourceTypeWaterbutlerRdsS3.Test ...@@ -45,7 +46,7 @@ namespace Coscine.ResourceTypeWaterbutlerRdsS3.Test
_readUser = $"{_testPrefix}.read_{_guid}"; _readUser = $"{_testPrefix}.read_{_guid}";
_writeUser = $"{_testPrefix}.write_{_guid}"; _writeUser = $"{_testPrefix}.write_{_guid}";
_endpoint = _configuration.GetString("coscine/global/rds/ecs-rwth/rds-s3/s3_endpoint"); _endpoint = _configuration.GetString("coscine/global/rds/ecs-rwth/rds-s3/s3_endpoint");
_accessKey = _configuration.GetString("coscine/global/rds/ecs-rwth/rds-s3/object_user_name");
_rdsS3EcsManager = new EcsManager _rdsS3EcsManager = new EcsManager
{ {
EcsManagerConfiguration = new EcsManagerConfiguration EcsManagerConfiguration = new EcsManagerConfiguration
...@@ -101,6 +102,7 @@ namespace Coscine.ResourceTypeWaterbutlerRdsS3.Test ...@@ -101,6 +102,7 @@ namespace Coscine.ResourceTypeWaterbutlerRdsS3.Test
resourceType.CreateResource(new Dictionary<string, string> { resourceType.CreateResource(new Dictionary<string, string> {
{ "bucketname", _bucketName }, { "bucketname", _bucketName },
{ "size", $"{_quota}" }, { "size", $"{_quota}" },
{ "accessKey", "" },
{ "accessKeyRead", _readUser }, { "accessKeyRead", _readUser },
{ "secretKeyRead", _secretKey }, { "secretKeyRead", _secretKey },
{ "accessKeyWrite", _writeUser }, { "accessKeyWrite", _writeUser },
......
...@@ -229,7 +229,7 @@ namespace Coscine.ResourceTypeWaterbutlerRdsS3 ...@@ -229,7 +229,7 @@ namespace Coscine.ResourceTypeWaterbutlerRdsS3
""Action"": [""s3:PutObject"", ""s3:GetObject"", ""s3:GetObjectAcl"", ""s3:GetObjectVersion"", ""s3:DeleteObject"", ""s3:DeleteObjectVersion""], ""Action"": [""s3:PutObject"", ""s3:GetObject"", ""s3:GetObjectAcl"", ""s3:GetObjectVersion"", ""s3:DeleteObject"", ""s3:DeleteObjectVersion""],
""Effect"": ""Allow"", ""Effect"": ""Allow"",
""Resource"": [""{options["bucketname"]}/*""], ""Resource"": [""{options["bucketname"]}/*""],
""Principal"": [""{options["accessKeyWrite"]}""] ""Principal"": [""{options["accessKeyWrite"]}"", ""{options["accessKey"]}""]
}}, }},
{{ {{
""Action"": [""s3:GetObject"", ""s3:GetObjectAcl"", ""s3:GetObjectVersion""], ""Action"": [""s3:GetObject"", ""s3:GetObjectAcl"", ""s3:GetObjectVersion""],
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<RootNamespace>Coscine.ResourceTypeWaterbutlerRdsS3</RootNamespace> <RootNamespace>Coscine.ResourceTypeWaterbutlerRdsS3</RootNamespace>
<AssemblyName>Coscine.ResourceTypeWaterbutlerRdsS3</AssemblyName> <AssemblyName>Coscine.ResourceTypeWaterbutlerRdsS3</AssemblyName>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<Version>1.2.1</Version> <Version>1.2.2</Version>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<Authors>RWTH Aachen University</Authors> <Authors>RWTH Aachen University</Authors>
......