Skip to content

Commit

Permalink
fix(ecs): reject task def artifact if it contains unknown properties (#…
Browse files Browse the repository at this point in the history
…4211) (#4219)

* fix(ecs): reject task def artifact if it contains unknown properties
  • Loading branch information
spinnakerbot authored and Travis Tomsu committed Dec 16, 2019
1 parent 024b922 commit 76ecdb5
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import com.amazonaws.services.identitymanagement.model.GetRoleRequest;
import com.amazonaws.services.identitymanagement.model.GetRoleResult;
import com.amazonaws.services.identitymanagement.model.Role;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.netflix.spinnaker.clouddriver.artifacts.ArtifactDownloader;
import com.netflix.spinnaker.clouddriver.aws.security.AmazonCredentials;
Expand Down Expand Up @@ -98,6 +99,9 @@ public class CreateServerGroupAtomicOperation
protected static final String DOCKER_LABEL_KEY_STACK = "spinnaker.stack";
protected static final String DOCKER_LABEL_KEY_DETAIL = "spinnaker.detail";

protected ObjectMapper mapper =
new ObjectMapper().enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);

@Autowired EcsCloudMetricService ecsCloudMetricService;
@Autowired IamPolicyReader iamPolicyReader;

Expand All @@ -107,8 +111,6 @@ public class CreateServerGroupAtomicOperation

@Autowired ArtifactDownloader artifactDownloader;

@Autowired ObjectMapper mapper;

public CreateServerGroupAtomicOperation(CreateServerGroupDescription description) {
super(description, "CREATE_ECS_SERVER_GROUP");
}
Expand Down

0 comments on commit 76ecdb5

Please sign in to comment.