summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOla Aunrønning <olaa@verizonmedia.com>2020-10-23 14:09:07 +0200
committerOla Aunrønning <olaa@verizonmedia.com>2020-10-23 14:09:07 +0200
commit5ceb3deefdafd77ce2dba976a5124faa8b7f75f1 (patch)
tree11a67ddb7087c6dee55bf92ef1bbb8a246a8f5a6
parent877e68322991c5133c5253410a4bb9c22c55e93b (diff)
Id, not assertionId
-rw-r--r--vespa-athenz/src/main/java/com/yahoo/vespa/athenz/client/zms/DefaultZmsClient.java2
-rw-r--r--vespa-athenz/src/main/java/com/yahoo/vespa/athenz/client/zms/bindings/AssertionEntity.java12
-rw-r--r--vespa-athenz/src/main/java/com/yahoo/vespa/athenz/client/zms/bindings/PolicyEntity.java2
3 files changed, 10 insertions, 6 deletions
diff --git a/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/client/zms/DefaultZmsClient.java b/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/client/zms/DefaultZmsClient.java
index 31c9e7839b6..33cb6d7d5d4 100644
--- a/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/client/zms/DefaultZmsClient.java
+++ b/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/client/zms/DefaultZmsClient.java
@@ -177,7 +177,7 @@ public class DefaultZmsClient extends ClientBase implements ZmsClient {
.filter(assertionEntity -> assertionEntity.getAction().equals(action) &&
assertionEntity.getResource().equals(resourceName.toResourceNameString()) &&
assertionEntity.getRole().equals(athenzRole.toResourceNameString()))
- .mapToInt(AssertionEntity::getAssertionId).findFirst();
+ .mapToInt(AssertionEntity::getId).findFirst();
if (assertionId.isEmpty()) {
return false;
diff --git a/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/client/zms/bindings/AssertionEntity.java b/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/client/zms/bindings/AssertionEntity.java
index b181bc7a8c7..824aa3b4606 100644
--- a/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/client/zms/bindings/AssertionEntity.java
+++ b/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/client/zms/bindings/AssertionEntity.java
@@ -2,6 +2,7 @@
package com.yahoo.vespa.athenz.client.zms.bindings;
import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -9,12 +10,13 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* @author olaa
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
public class AssertionEntity {
private final String role;
private final String resource;
private final String action;
- private final Integer assertionId;
+ private final Integer id;
public AssertionEntity(String role, String resource, String action) {
@@ -24,11 +26,11 @@ public class AssertionEntity {
public AssertionEntity(@JsonProperty("role") String role,
@JsonProperty("resource") String resource,
@JsonProperty("action") String action,
- @JsonProperty("assertionId") Integer assertionId) {
+ @JsonProperty("id") Integer id) {
this.role = role;
this.resource = resource;
this.action = action;
- this.assertionId = assertionId;
+ this.id = id;
}
public String getRole() {
@@ -44,7 +46,7 @@ public class AssertionEntity {
}
@JsonIgnore
- public int getAssertionId() {
- return assertionId;
+ public int getId() {
+ return id;
}
}
diff --git a/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/client/zms/bindings/PolicyEntity.java b/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/client/zms/bindings/PolicyEntity.java
index 442f9d12c71..ebc0997cb09 100644
--- a/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/client/zms/bindings/PolicyEntity.java
+++ b/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/client/zms/bindings/PolicyEntity.java
@@ -1,6 +1,7 @@
// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.athenz.client.zms.bindings;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -9,6 +10,7 @@ import java.util.List;
/**
* @author olaa
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public class PolicyEntity {
@JsonInclude(JsonInclude.Include.NON_EMPTY)