You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by mb...@apache.org on 2020/01/31 19:08:21 UTC
[asterixdb] 01/03: [NO ISSUE][RT] Add ability to store sensitive
info to coordination service
This is an automated email from the ASF dual-hosted git repository.
mblow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git
commit c10b6ab47582180c5ed7c0dd78acc3e2ced38c1c
Author: Michael Blow <mb...@apache.org>
AuthorDate: Wed Jan 29 00:01:09 2020 -0500
[NO ISSUE][RT] Add ability to store sensitive info to coordination service
Change-Id: If63443171139c0153d6b9d71c1991311f2335e14
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/4784
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Michael Blow <mb...@apache.org>
Reviewed-by: Hussain Towaileb <hu...@gmail.com>
---
.../org/apache/asterix/common/api/ICoordinationService.java | 12 ++++++++++++
.../asterix/runtime/utils/NoOpCoordinationService.java | 5 +++++
2 files changed, 17 insertions(+)
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/api/ICoordinationService.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/api/ICoordinationService.java
index 2019da9..5d2ef07 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/api/ICoordinationService.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/api/ICoordinationService.java
@@ -35,6 +35,18 @@ public interface ICoordinationService {
void put(String key, byte[] value) throws HyracksDataException;
/**
+ * Adds or updates the property with the name {@code key}
+ * with {@code value}, and indicates that values associated with
+ * this key should be treated as sensitive (e.g. not logged). Once a
+ * key is considered sensitive, it remains sensitive until deleted.
+ *
+ * @param key
+ * @param value
+ * @throws HyracksDataException
+ */
+ void putSensitive(String key, byte[] value) throws HyracksDataException;
+
+ /**
* Gets the value of the property with name {@code key} if exists.
*
* @param key
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/utils/NoOpCoordinationService.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/utils/NoOpCoordinationService.java
index 6f9a8d2..3cbaed4 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/utils/NoOpCoordinationService.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/utils/NoOpCoordinationService.java
@@ -35,6 +35,11 @@ public class NoOpCoordinationService implements ICoordinationService {
}
@Override
+ public void putSensitive(String key, byte[] value) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
public Optional<byte[]> get(String key) {
throw new UnsupportedOperationException();
}