Skip to content

Move certificate related settings out of DebugService.env #2416

Closed
@mkwan01

Description

@mkwan01

Code for IBM i currently saves the following certificate related settings to /QIBM/ProdData/IBMiDebugService/bin/DebugService.env:

JAVA_HOME=/QOpenSys/QIBM/ProdData/JavaVM/jdk11/64bit
DEBUG_SERVICE_KEYSTORE_FILE=/QIBM/UserData/IBMiDebugService/certs/debug_service.pfx
DEBUG_SERVICE_KEYSTORE_PASSWORD=xxxxxxxxx
CODE4IDEBUG=$([ -f $DBGSRV_WRK_DIR/.code4i.debug ] && cp $DBGSRV_WRK_DIR/.code4i.debug $DBGSRV_WRK_DIR/key.properties)

This solution has two problems:

  1. The settings will be removed if we update the debug service PTF.
  2. It may create a conflict with other debug setup scenarios which do not use vscode.

Starting from debug service version 2.0.1, the startDebugService.sh script checks for a new environment variable DEBUG_SERVICE_EXTERNAL_CONFIG_FILE. If this environment variable is set, the script will load the settings specified in the external file.

Here is the proposed solution to move the certificate settings:

  1. Store the certificate settings in a file under /QIBM/UserData/IBMiDebugService. The files under the UserData folder will not be overwritten by a debug service PTF install.
  2. Set the environment variable DEBUG_SERVICE_EXTERNAL_CONFIG_FILE to the fully qualified path of the new setting file under UserData, before running the startDebugService.sh script.

Of course, you need to check for the debug service version. You can only use the new solution if debug service is at version 2.0.1+. Please note that JAVA_HOME is no longer required in 2.0.1+. It will be defaulted to /QOpenSys/QIBM/ProdData/JavaVM/jdk11/64bit if JAVA_HOME is not set.

@worksofliam @sebjulliand

Metadata

Metadata

Assignees

No one assigned

    Labels

    ideaFeature suggestion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions