Uploaded image for project: 'Couchbase Elasticsearch Connector'
  1. Couchbase Elasticsearch Connector
  2. CBES-179

When custom port is specified, elasticsearch host assumes http even if secure = true

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.2.0
    • 4.2.5
    • None
    • 1

    Description

      A user ran into an issue which can be roughly described as:

      "We need to provide a scheme, because otherwise http is used even if secure = true"

      So a config like this:

      [elasticsearch]
      secureConnection = true
      hosts = ['myhost:9201']
      

      will try http. If https://myhost:9201 is used, it will work.

      Note that there is a check which checks the reverse (so if secure is false, but https is used), but not the other way round.

      Cursory inspection of https://github.com/couchbase/couchbase-elasticsearch-connector/blob/4.2.0/src/main/java/com/couchbase/connector/config/ConfigHelper.java#L70 suggests that HttpHost will default to HTTP scheme if not explicitly provided, but it should use https if secure = true .. and/or some sanity check?

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          daschl Michael Nitschinger created issue -
          tim.bradgate Tim Bradgate (Inactive) made changes -
          Field Original Value New Value
          Affects Version/s 4.2.0 [ 16306 ]
          david.nault David Nault made changes -
          Description A user ran into an issue which can be roughly described as:

          "We need to provide a scheme, because otherwise http is used even if secure = true"

          So a config like this:

          {code}
          [elasticsearch]
          secureConnection = true
          hosts = ['myhost:9201']
          {code}

          will try http. If https://myhost:9201 is used, it will work.

          Note that there is a check which checks the reverse (so if secure is false, but https is used), but not the other way round.

          Cursory inspection of https://github.com/couchbase/couchbase-elasticsearch-connector/blob/4.2.0/src/main/java/com/couchbase/connector/config/ConfigHelper.java#L70 suggests that HttpHost will default to HTTP scheme if not explicitly provided, but it should use https if secure = true .. and/or some sanity check?
          A user ran into an issue which can be roughly described as:

          "We need to provide a scheme, because otherwise http is used even if secure = true"

          So a config like this:
          {code}[elasticsearch]
          secureConnection = true
          hosts = ['http://myhost:9201']
          {code}
          will try http. If [https://myhost:9201|https://myhost:9201/] is used, it will work.

          Note that there is a check which checks the reverse (so if secure is false, but https is used), but not the other way round.

          Cursory inspection of [https://github.com/couchbase/couchbase-elasticsearch-connector/blob/4.2.0/src/main/java/com/couchbase/connector/config/ConfigHelper.java#L70] suggests that HttpHost will default to HTTP scheme if not explicitly provided, but it should use https if secure = true .. and/or some sanity check?
          david.nault David Nault made changes -
          Fix Version/s 4.2.5 [ 17138 ]
          david.nault David Nault made changes -
          Status New [ 10003 ] Open [ 1 ]
          david.nault David Nault made changes -
          Summary elasticsearch host assumes http even if secure = true "http" in Elasticsearch host URL forces insecure connection
          david.nault David Nault made changes -
          Description A user ran into an issue which can be roughly described as:

          "We need to provide a scheme, because otherwise http is used even if secure = true"

          So a config like this:
          {code}[elasticsearch]
          secureConnection = true
          hosts = ['http://myhost:9201']
          {code}
          will try http. If [https://myhost:9201|https://myhost:9201/] is used, it will work.

          Note that there is a check which checks the reverse (so if secure is false, but https is used), but not the other way round.

          Cursory inspection of [https://github.com/couchbase/couchbase-elasticsearch-connector/blob/4.2.0/src/main/java/com/couchbase/connector/config/ConfigHelper.java#L70] suggests that HttpHost will default to HTTP scheme if not explicitly provided, but it should use https if secure = true .. and/or some sanity check?
          A user ran into an issue which can be roughly described as:

          "We need to provide a scheme, because otherwise http is used even if secure = true"

          So a config like this:
          {code}[elasticsearch]
          secureConnection = true
          hosts = ['myhost:9201']
          {code}
          will try http. If [https://myhost:9201|https://myhost:9201/] is used, it will work.

          Note that there is a check which checks the reverse (so if secure is false, but https is used), but not the other way round.

          Cursory inspection of [https://github.com/couchbase/couchbase-elasticsearch-connector/blob/4.2.0/src/main/java/com/couchbase/connector/config/ConfigHelper.java#L70] suggests that HttpHost will default to HTTP scheme if not explicitly provided, but it should use https if secure = true .. and/or some sanity check?
          david.nault David Nault made changes -
          Summary "http" in Elasticsearch host URL forces insecure connection When custom port is specified, elasticsearch host assumes http even if secure = true
          tim.bradgate Tim Bradgate (Inactive) made changes -
          Link This issue blocks CBSE-9163 [ CBSE-9163 ]
          david.nault David Nault made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]

          People

            david.nault David Nault
            daschl Michael Nitschinger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty