Hi everyone, can someone guide me to integrate bas...
# pinot-dev
a
Hi everyone, can someone guide me to integrate basic auth while running pinot using docker-compose.yml file
a
Hi @Barkha Herman thanks for the reply, I have gone through this and written a pinot-controller.conf and pinot-server.conf file and put the properties mentioned in the document you shared and also I have to put some extra properties since there were some errors logging after adding the authentication properties and I mounted those two files on the docker compose -> is this the correct approach?
Copy code
pinot-controller:
    image: apachepinot/pinot:1.1.0
    command: "StartController -configFileName /var/pinot/controller/config/pinot-controller.conf"
    # command: "StartController -zkAddress pinot-zookeeper:2181"
    container_name: pinot-controller
    restart: unless-stopped
    ports:
      - "9000:9000"
    volumes:
      - ./docker/pinot-controller.conf:/var/pinot/controller/config/pinot-controller.conf
    environment:
      JAVA_OPTS: "-Dplugins.dir=/opt/pinot/plugins -Xms1G -Xmx4G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xloggc:gc-pinot-controller.log"
    depends_on:
      - pinot-zookeeper
pinot-server:
    image: apachepinot/pinot:1.1.0
    command: "StartServer -zkAddress pinot-zookeeper:2181 -configFileName /var/pinot/server/config/pinot-server.conf"
    # command: "StartServer -zkAddress pinot-zookeeper:2181"
    restart: unless-stopped
    container_name: "pinot-server"
    ports:
      - "8098:8098"
    volumes:
        - ./docker/pinot-server.conf:/var/pinot/server/config/pinot-server.conf
    environment:
      JAVA_OPTS: "-Dplugins.dir=/opt/pinot/plugins -Xms4G -Xmx16G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xloggc:gc-pinot-server.log"
    depends_on:
      - pinot-broker
now the authentication is working fine in UI but still some error is logging on the controller which I avoided because it was not causing any harm... anyway I will attach the error here this error comes only when I am landing on the home page of pinot-controller UI
Copy code
ERROR [WebApplicationExceptionMapper] [grizzly-http-server-12] Server error: 
java.lang.IllegalArgumentException: Invalid path string "//LIVEINSTANCES" caused by empty node name specified @1
	at org.apache.zookeeper.common.PathUtils.validatePath(PathUtils.java:91) ~[pinot-all-1.1.0-jar-with-dependencies.jar:1.1.0-c2606742bbc4b15cff857eb0ffe7ec878ff181bb]
	at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:1848) ~[pinot-all-1.1.0-jar-with-dependencies.jar:1.1.0-c2606742bbc4b15cff857eb0ffe7ec878ff181bb]
	at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:1893) ~[pinot-all-1.1.0-jar-with-dependencies.jar:1.1.0-c2606742bbc4b15cff857eb0ffe7ec878ff181bb]
	at org.apache.helix.zookeeper.zkclient.ZkClient.lambda$getStat$7(ZkClient.java:1516) ~[pinot-all-1.1.0-jar-with-dependencies.jar:1.1.0-c2606742bbc4b15cff857eb0ffe7ec878ff181bb]
	at org.apache.helix.zookeeper.zkclient.ZkClient.retryUntilConnected(ZkClient.java:2079) ~[pinot-all-1.1.0-jar-with-dependencies.jar:1.1.0-c2606742bbc4b15cff857eb0ffe7ec878ff181bb]
	at org.apache.helix.zookeeper.zkclient.ZkClient.getStat(ZkClient.java:1515) ~[pinot-all-1.1.0-jar-with-dependencies.jar:1.1.0-c2606742bbc4b15cff857eb0ffe7ec878ff181bb]
	at org.apache.helix.zookeeper.zkclient.ZkClient.getStat(ZkClient.java:1507) ~[pinot-all-1.1.0-jar-with-dependencies.jar:1.1.0-c2606742bbc4b15cff857eb0ffe7ec878ff181bb]
	at org.apache.helix.manager.zk.ZkBaseDataAccessor.getStat(ZkBaseDataAccessor.java:714) ~[pinot-all-1.1.0-jar-with-dependencies.jar:1.1.0-c2606742bbc4b15cff857eb0ffe7ec878ff181bb]
	at org.apache.pinot.controller.helix.core.PinotHelixResourceManager.getZKStat(PinotHelixResourceManager.java:1737) ~[pinot-all-1.1.0-jar-with-dependencies.jar:1.1.0-c2606742bbc4b15cff857eb0ffe7ec878ff181bb]
The issue which concerns me is when I change the password and auth.token properties inside the conf file for both server and controller the UI authentication is working fine but I am getting permission denied when I use the curl commands to post schema,table config and data but when I switch to previous password and token there is no issues in sending the schema,table config and data through the curl command.....I have also prune the docker container,images and volumes and tested it still the same issue persist....I will attahc the curl commands which I have used
Copy code
curl -X 'POST'   '<http://localhost:9000/schemas?override=true&force=false>'   -H 'accept: application/json'   -H 'Content-Type: application/json' -H "Authorization: Basic <base64encoded>" -d '@schema.json'   -> This is for schema
b
Sounds to me like a caching issue? Let me dig a bit more...
a
Hi @Barkha Herman if it is a cache issue then the cache should be cleared on docker prune right 🤔