Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-3748

Copying lot of commands into CLI prompt fails

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 5.0.0.Beta1
    • 5.0.0.Alpha3
    • CLI
    • None
    • Hide
      • Copy from editor
        # prepare server and client key materials
        # generate server keystore
        /subsystem=elytron/key-store=server_keystore:add(type=PKCS12, credential-reference={clear-text=secret},path=/tmp/server.keystore)
        /subsystem=elytron/key-store=server_keystore:generate-key-pair(alias=server, distinguished-name="CN=server")
        /subsystem=elytron/key-store=server_keystore:export-certificate(alias=server,path=/tmp/server.certificate.pem,pem=true)
        # generate client keystore
        /subsystem=elytron/key-store=client_keystore:add(type=PKCS12, credential-reference={clear-text=secret},path=/tmp/client.keystore)
        /subsystem=elytron/key-store=client_keystore:generate-key-pair(alias=client, distinguished-name="CN=client")
        /subsystem=elytron/key-store=client_keystore:export-certificate(alias=client,path=/tmp/client.certificate.pem,pem=true)
        # generate server truststore
        /subsystem=elytron/key-store=server_truststore:add(type=PKCS12, credential-reference={clear-text=secret},path=/tmp/server.truststore)
        /subsystem=elytron/key-store=server_truststore:import-certificate(alias=server,path=/tmp/client.certificate.pem,validate=false
        # generate client truststore
        /subsystem=elytron/key-store=client_truststore:add(type=PKCS12, credential-reference={clear-text=secret},path=/tmp/client.truststore)
        /subsystem=elytron/key-store=client_truststore:import-certificate(alias=server,path=/tmp/server.certificate.pem,validate=false
        # save it all
        /subsystem=elytron/key-store=server_keystore:store()
        /subsystem=elytron/key-store=client_keystore:store()
        /subsystem=elytron/key-store=server_truststore:store()
        /subsystem=elytron/key-store=client_truststore:store()
        
      • Paste into ./jboss-cli.sh prompt
      Show
      Copy from editor # prepare server and client key materials # generate server keystore /subsystem=elytron/key-store=server_keystore:add(type=PKCS12, credential-reference={clear-text=secret},path=/tmp/server.keystore) /subsystem=elytron/key-store=server_keystore:generate-key-pair(alias=server, distinguished-name= "CN=server" ) /subsystem=elytron/key-store=server_keystore:export-certificate(alias=server,path=/tmp/server.certificate.pem,pem= true ) # generate client keystore /subsystem=elytron/key-store=client_keystore:add(type=PKCS12, credential-reference={clear-text=secret},path=/tmp/client.keystore) /subsystem=elytron/key-store=client_keystore:generate-key-pair(alias=client, distinguished-name= "CN=client" ) /subsystem=elytron/key-store=client_keystore:export-certificate(alias=client,path=/tmp/client.certificate.pem,pem= true ) # generate server truststore /subsystem=elytron/key-store=server_truststore:add(type=PKCS12, credential-reference={clear-text=secret},path=/tmp/server.truststore) /subsystem=elytron/key-store=server_truststore: import -certificate(alias=server,path=/tmp/client.certificate.pem,validate= false # generate client truststore /subsystem=elytron/key-store=client_truststore:add(type=PKCS12, credential-reference={clear-text=secret},path=/tmp/client.truststore) /subsystem=elytron/key-store=client_truststore: import -certificate(alias=server,path=/tmp/server.certificate.pem,validate= false # save it all /subsystem=elytron/key-store=server_keystore:store() /subsystem=elytron/key-store=client_keystore:store() /subsystem=elytron/key-store=server_truststore:store() /subsystem=elytron/key-store=client_truststore:store() Paste into ./jboss-cli.sh prompt

    Description

      Running commands with --file option works OK. Copying commands one by one works OK

      Seems to me as something is beeing overflowed.

      [standalone@localhost:9990 /] # prepare server and client key materials
      [standalone@localhost:9990 /] # generate server keystore
      [standalone@localhost:9990 /] /subsystem=elytron/key-store=server_keystore:add(type=PKCS12, credential-reference={clear-text=secret},path=/tmp/server.keystore)
      {"outcome" => "success"}
      [standalone@localhost:9990 /] /subsystem=elytron/key-store=server_keystore:generate-key-pair(alias=server, distinguished-name="CN=server")
      {"outcome" => "success"}
      [standalone@localhost:9990 /] /subsystem=elytron/key-store=server_keystore:export-certificate(alias=server,path=/tmp/server.certificate.pem,pem=true)
      {"outcome" => "success"}
      [standalone@localhost:9990 /] # generate client keystore
      [standalone@localhost:9990 /] /subsystem=elytron/key-store=client_keystore:add(type=PKCS12, credential-reference={clear-text=secret},path=/tmp/client.keystore)
      {"outcome" => "success"}
      [standalone@localhost:9990 /] /subsystem=elytron/key-store=client_keystore:generate-key-pair(alias=client, distinguished-name="CN=client")
      {"outcome" => "success"}
      [standalone@localhost:9990 /] /subsystem=elytron/key-store=client_keystore:export-certificate(alias=clieytron/key-store=client_truststore:import-certificate(alias=server,path=/tmp/server.certificate.pem,validate=false
      Closing ')' is missing.
      [standalone@localhost:9990 /] # save it all
      [standalone@localhost:9990 /] /subsystem=elytron/key-store=server_keystore:store()
      {
          "outcome" => "success",
          "result" => undefined
      }
      [standalone@localhost:9990 /] /subsystem=elytron/key-store=client_keystore:store()
      {
          "outcome" => "success",
          "result" => undefined
      }
      [standalone@localhost:9990 /] /subsystem=elytron/key-store=server_truststore:store()
      {
          "outcome" => "failed",
          "failure-description" => "WFLYCTL0216: Management resource '[
          (\"subsystem\" => \"elytron\"),
          (\"key-store\" => \"server_truststore\")
      ]' not found",
          "rolled-back" => true
      }
      [standalone@localhost:9990 /] /subsystem=elytron/key-store=client_truststore:store()
      

      Attachments

        Issue Links

          Activity

            People

              jdenise@redhat.com Jean Francois Denise
              mchoma@redhat.com Martin Choma
              Erich Duda Erich Duda (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: