cTAKES
  1. cTAKES
  2. CTAKES-28

Externalize dictionarylookup/UMLS password to password file or variable

    Details

      Description

      Moved from SF Traker: 3486359
      To avoid users accidently checking in the UMLS configuration file with pw, it would be good to externalize it so that the pw is stored to an external file.

        Activity

        Hide
        Pei Chen added a comment -

        Fixed in r.1402328

        • UMLS username and password could be passed in as a system property or env variable.
          -Added a simple util class called EnvironmentVariable .getEnv(name) will attempt to read the variables
          from system properties, environment variable, then context.
          -Renamed variable name to ctakes.umlsuser and ctakes.umlspw to avoid any potential clashes in the future.
          -Updated any references that used to use those parameters.
          -Added a note to the startup scripts and README for users
          Feel free to use this/edit consolidated mechanism so it will be easier for maintenance if we decide to change things.
        Show
        Pei Chen added a comment - Fixed in r.1402328 UMLS username and password could be passed in as a system property or env variable. -Added a simple util class called EnvironmentVariable .getEnv(name) will attempt to read the variables from system properties, environment variable, then context. -Renamed variable name to ctakes.umlsuser and ctakes.umlspw to avoid any potential clashes in the future. -Updated any references that used to use those parameters. -Added a note to the startup scripts and README for users Feel free to use this/edit consolidated mechanism so it will be easier for maintenance if we decide to change things.
        Hide
        Steven Bethard added a comment -

        It would be really nice if you could supply these as Java properties, e.g. run java with:

        -Dumls.user=...
        -Dumls.password=...

        This could be as simple as adding to UmlsDictionaryLookupAnnotator.java

        + UMLSUser = System.getProperty("umls.user");
        + if (UMLSUser == null)

        { UMLSUser = (String) iv_context.getConfigParameterValue(UMLSUSER_PARAM); + }

        + UMLSPW = System.getProperty("umls.password");
        + if (UMLSPW == null)

        { UMLSPW = (String) iv_context.getConfigParameterValue(UMLSPW_PARAM); + }
        Show
        Steven Bethard added a comment - It would be really nice if you could supply these as Java properties, e.g. run java with: -Dumls.user=... -Dumls.password=... This could be as simple as adding to UmlsDictionaryLookupAnnotator.java + UMLSUser = System.getProperty("umls.user"); + if (UMLSUser == null) { UMLSUser = (String) iv_context.getConfigParameterValue(UMLSUSER_PARAM); + } + UMLSPW = System.getProperty("umls.password"); + if (UMLSPW == null) { UMLSPW = (String) iv_context.getConfigParameterValue(UMLSPW_PARAM); + }

          People

          • Assignee:
            Pei Chen
            Reporter:
            Pei Chen
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development