From 1c201f8a99753109f18a47053c16c2d9b756ac37 Mon Sep 17 00:00:00 2001 From: Venkatrangan Govindarajan Date: Thu, 28 May 2020 02:27:58 +0530 Subject: [PATCH] Use censor attribute for CLI commands This patch will help avoid usernames/passwords for device access to be saved in karafhistory JIRA: NETCONF-694 Change-Id: If2ac255b0ec9bbc32e3aec7d0247497cc927a3e1 Signed-off-by: Venkatrangan Govindarajan --- .../netconf/console/commands/NetconfConnectDeviceCommand.java | 2 ++ .../netconf/console/commands/NetconfUpdateDeviceCommand.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/netconf/netconf-console/src/main/java/org/opendaylight/netconf/console/commands/NetconfConnectDeviceCommand.java b/netconf/netconf-console/src/main/java/org/opendaylight/netconf/console/commands/NetconfConnectDeviceCommand.java index 8476772ac3..bdf2cd8ed8 100644 --- a/netconf/netconf-console/src/main/java/org/opendaylight/netconf/console/commands/NetconfConnectDeviceCommand.java +++ b/netconf/netconf-console/src/main/java/org/opendaylight/netconf/console/commands/NetconfConnectDeviceCommand.java @@ -76,6 +76,7 @@ public class NetconfConnectDeviceCommand implements Action { aliases = { "--username" }, description = "Username for netconf connection", required = false, + censor = true, multiValued = false) private String username; @@ -83,6 +84,7 @@ public class NetconfConnectDeviceCommand implements Action { aliases = { "--password" }, description = "Password for netconf connection", required = false, + censor = true, multiValued = false) private String password; diff --git a/netconf/netconf-console/src/main/java/org/opendaylight/netconf/console/commands/NetconfUpdateDeviceCommand.java b/netconf/netconf-console/src/main/java/org/opendaylight/netconf/console/commands/NetconfUpdateDeviceCommand.java index 62978e2088..9d0581b8a4 100644 --- a/netconf/netconf-console/src/main/java/org/opendaylight/netconf/console/commands/NetconfUpdateDeviceCommand.java +++ b/netconf/netconf-console/src/main/java/org/opendaylight/netconf/console/commands/NetconfUpdateDeviceCommand.java @@ -47,6 +47,7 @@ public class NetconfUpdateDeviceCommand implements Action { aliases = { "--username" }, description = "Username for NETCONF connection", required = true, + censor = true, multiValued = false) private String username; @@ -54,6 +55,7 @@ public class NetconfUpdateDeviceCommand implements Action { aliases = { "--password" }, description = "Password for NETCONF connection", required = true, + censor = true, multiValued = false) private String password; -- 2.36.6