Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-4930

Connect Rest API allows creating connectors with an empty name - KIP-212

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.10.2.0
    • 1.1.0
    • connect
    • None

    Description

      The Connect Rest API allows to deploy connectors with an empty name field, which then cannot be removed through the api.

      Sending the following request:

      {
          "name": "",
          "config": {
              "connector.class": "org.apache.kafka.connect.tools.MockSourceConnector",
              "tasks.max": "1",
              "topics": "test-topic"
              
          }
      }
      

      Results in a connector being deployed which can be seen in the list of connectors:

      [
      	"",
      	"testconnector"
      ]

      But cannot be removed via a DELETE call, as the api thinks we are trying to delete the /connectors endpoint and declines the request.

      I don't think there is a valid case for the connector name to be empty so perhaps we should add a check for this. I am happy to work on this.

      Attachments

        Issue Links

          Activity

            People

              sliebau Sönke Liebau
              sliebau Sönke Liebau
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: