Refine Helm Client Charts
[aaf/authz.git] / cadi / aaf / src / main / java / org / onap / aaf / cadi / configure / PropHolder.java
index 0f9666c..1b8b76e 100644 (file)
@@ -117,7 +117,13 @@ public class PropHolder {
        }
 
        public void addEnc(final String tag, Access orig, final String def) throws IOException {
-               addEnc(tag,orig.getProperty(tag, def));
+               String pwd = orig.getProperty(tag, def);
+               if(pwd==null) {
+                       return;
+               } else if(pwd.startsWith("enc:")) {
+                       pwd = orig.decrypt(pwd, true);
+               }
+               addEnc(tag,pwd);
        }
        
        public void write() throws IOException {
@@ -146,7 +152,7 @@ public class PropHolder {
             pw.println(System.getProperty("user.name"));
             pw.print("#   on ");
             pw.println(Chrono.dateStamp());
-            pw.println("# @copyright 2016, AT&T");
+            pw.println("# @copyright 2019, AT&T");
             for (int i=0;i<60;++i) {
                 pw.print('#');
             }
@@ -154,16 +160,9 @@ public class PropHolder {
             
              for (Map.Entry<String,String> me : props.entrySet()) {
                String key = me.getKey();
-                //if (    key.startsWith("cm_") 
-//                    || key.startsWith(Config.HOSTNAME)
-//                    || key.startsWith("aaf")
-//                    || key.startsWith("cadi")
-//                    || key.startsWith("Challenge")
-//                    ) {
                     pw.print(key);
                     pw.print('=');
                     pw.println(me.getValue());
-//                }
             }
         } finally {
             pw.close();