Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-7137

Attribute "required" on key-store makes no difference of behaviour

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 11.0.0.Alpha1
    • None
    • Security
    • None

    Description

      There is attribute required which can be set on key-store, that should disable check "does keystore file exists?"

      "required" => {
          "type" => BOOLEAN,
          "description" => "Is the file required to exist at the time the KeyStore service starts?",
          "attribute-group" => "file",
          "expressions-allowed" => true,
          "nillable" => true,
          "default" => false,
          "requires" => ["path"],
          "access-type" => "read-write",
          "storage" => "configuration",
          "restart-required" => "resource-services"
      },
      

      However, when I try to use it, there is no difference if required attribute is set to true or false.

      [standalone@localhost:9990 /] /subsystem=elytron/key-store=server:add(type="jks", path="/path/non-existing", required=false)
      {
          "outcome" => "failed",
          "failure-description" => {
              "WFLYCTL0080: Failed services" => {"org.wildfly.security.key-store.server" => "org.jboss.msc.service.StartException in service org.wildfly.security.key-store.server: WFLYELY00004: Unable to start the service.
          Caused by: java.io.FileNotFoundException: /path/non-existing (No such file or directory)"},
              "WFLYCTL0412: Required services that are not installed:" => ["org.wildfly.security.key-store.server"],
              "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
          },
          "rolled-back" => true
      }
      [standalone@localhost:9990 /] /subsystem=elytron/key-store=server:add(type="jks", path="/path/non-existing", required=true)
      {
          "outcome" => "failed",
          "failure-description" => {
              "WFLYCTL0080: Failed services" => {"org.wildfly.security.key-store.server" => "org.jboss.msc.service.StartException in service org.wildfly.security.key-store.server: WFLYELY00004: Unable to start the service.
          Caused by: java.io.FileNotFoundException: /path/non-existing (No such file or directory)"},
              "WFLYCTL0412: Required services that are not installed:" => ["org.wildfly.security.key-store.server"],
              "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
          },
          "rolled-back" => true
      }
      

      I have already seen people generating keystores in their app, so I think this option would be useful for them.

      Attachments

        Issue Links

          Activity

            People

              jkalina@redhat.com Jan Kalina (Inactive)
              mchoma@redhat.com Martin Choma
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: