Details

    • Type: Sub-task Sub-task
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.6.0
    • Component/s: shell
    • Labels:
      None

      Description

      OpenSSL allows the user to read the password from a number of places, including a file, environment variable, file descriptor, command line argument, or standard in. It would be nice for accumulo to do the same, to ease scripting while still not revealing password through ps or it's brethren.

      A logical way to implement this might be using a JCommander Custom Type for the password field.

        Issue Links

          Activity

          Hide
          Mike Drob added a comment -

          I started working on this using JCommander (and got a functioning prototype) before realizing that the shell still uses Apache CLI. Is it worth refactoring to take advantage of some of the niceness of JCommander, considering that a bunch of the other utility classes already have made the switch in ACCUMULO-745

          Show
          Mike Drob added a comment - I started working on this using JCommander (and got a functioning prototype) before realizing that the shell still uses Apache CLI. Is it worth refactoring to take advantage of some of the niceness of JCommander, considering that a bunch of the other utility classes already have made the switch in ACCUMULO-745
          Hide
          Eric Newton added a comment -

          Yes, it's worth doing. I wanted to do it eventually.

          Show
          Eric Newton added a comment - Yes, it's worth doing. I wanted to do it eventually.
          Hide
          Mike Drob added a comment - - edited

          Patch ACCUMULO-1412-v1.patch depends on the v3 patch from ACCUMULO-1478, applies to trunk with -p1.

          This patch allows users to specify the value to --password as any of the following:

          • pass:<password>
          • file:<local file>
          • env:<environment variable>
          • stdin

          The design is extensible for future implementations, as I know Christopher Tubbs had expressed an interest in wiring it to gnome-keyring.

          Show
          Mike Drob added a comment - - edited Patch ACCUMULO-1412-v1.patch depends on the v3 patch from ACCUMULO-1478 , applies to trunk with -p1 . This patch allows users to specify the value to --password as any of the following: pass:<password> file:<local file> env:<environment variable> stdin The design is extensible for future implementations, as I know Christopher Tubbs had expressed an interest in wiring it to gnome-keyring.
          Hide
          ASF subversion and git services added a comment -

          Commit 714c12f63b78f83a14f5285c139ac5ba3b503b4c in branch refs/heads/master from Mike Drob
          [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=714c12f ]

          ACCUMULO-1412 Adding PasswordConverter

          Show
          ASF subversion and git services added a comment - Commit 714c12f63b78f83a14f5285c139ac5ba3b503b4c in branch refs/heads/master from Mike Drob [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=714c12f ] ACCUMULO-1412 Adding PasswordConverter
          Hide
          Mike Drob added a comment -

          Applied original patch + better unit tests.

          Show
          Mike Drob added a comment - Applied original patch + better unit tests.
          Hide
          Ted Yu added a comment -

          I got the following:

          [ERROR] /Users/tyu/accumulo/core/src/main/java/org/apache/accumulo/core/util/shell/ShellOptionsJC.java:[60,18] cannot find symbol
          [ERROR] symbol  : constructor ParameterException(java.lang.String,java.io.FileNotFoundException)
          [ERROR] location: class com.beust.jcommander.ParameterException
          

          FYI

          Show
          Ted Yu added a comment - I got the following: [ERROR] /Users/tyu/accumulo/core/src/main/java/org/apache/accumulo/core/util/shell/ShellOptionsJC.java:[60,18] cannot find symbol [ERROR] symbol : constructor ParameterException(java.lang. String ,java.io.FileNotFoundException) [ERROR] location: class com.beust.jcommander.ParameterException FYI
          Hide
          Mike Drob added a comment -

          That's what I get for not realizing that I was using a custom version of JCommander.

          Show
          Mike Drob added a comment - That's what I get for not realizing that I was using a custom version of JCommander.
          Hide
          ASF subversion and git services added a comment -

          Commit 98ce83aa703362d2498d278bf53fcde56545c77e in branch refs/heads/master from Mike Drob
          [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=98ce83a ]

          ACCUMULO-1412 Used wrong ParameterException ctor

          Show
          ASF subversion and git services added a comment - Commit 98ce83aa703362d2498d278bf53fcde56545c77e in branch refs/heads/master from Mike Drob [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=98ce83a ] ACCUMULO-1412 Used wrong ParameterException ctor

            People

            • Assignee:
              Mike Drob
              Reporter:
              Mike Drob
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development