Uploaded image for project: 'Web Terminal for OpenShift'
  1. Web Terminal for OpenShift
  2. WTO-153

Initializing OpenShift session fails when username is numeric

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.7.0
    • 1.6.0
    • machine-exec
    • None
    • False
    • None
    • False
    • Hide
      In Web Terminal Operator v1.6.0 and below, attempting to start a Web Terminal as a user with a numeric username would cause the terminal to fail to initialize as a result of improper handling of YAML strings. Web Terminal Operator v1.7.0 fixes this issue, allowing terminal to be used by users with numeric usernames.
      Show
      In Web Terminal Operator v1.6.0 and below, attempting to start a Web Terminal as a user with a numeric username would cause the terminal to fail to initialize as a result of improper handling of YAML strings. Web Terminal Operator v1.7.0 fixes this issue, allowing terminal to be used by users with numeric usernames.
    • Proposed

      When a user with a name that consists of only numbers attempts to use the web terminal, the automatic environment set up step fails as the web-terminal-exec component creates an invalid kubeconfig. For example:

      users: 
      - name: 123456
        user: 
          token: sha256~<snip>
      

      since the username is not quoted, it is interpreted as a number (and not a string) causing oc commands to fail:

      bash-4.4 ~ $ oc whoami
      error: error loading config file "/home/user/.kube/config": json: cannot unmarshal number into Go struct field Context.contexts.context.user of type string
      

              amisevsk Angel Misevski (Inactive)
              amisevsk Angel Misevski (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: