REST API Extension error 403 running on Docker

While making requests to a Bonita’s Extension API, that internally calls an external API from another service, on a Docker environment with Runtime Bonita installed, I got an error 403. 

Since I think it’s a permission error, I have followed a community post’s steps (this one): 

1. I have defined a custom permission at extension’s page.properties 

myExtension.permissions=myPermission 

2. Then I have executed a setup pull command to create a current folder. Inside that folder, I edited custom-permissions-mapping.properties file by adding the following line: 

user|mbk=[myPermission] 

3. I have also edited security-config.properties and set security.rest.api.authorizations.check.enabled to false. 

security.rest.api.authorizations.check.enabled false 

Afterwards, I have done a setup push, but the error 403 hasn’t been solved. 

This is my docker-compose file: 

version: '3'

 

services:

  db:

    image: bonitasoft/bonita-postgres:12.6

    ports:

      - 5433:5432

    environment:

      POSTGRES_PASSWORD: example

    restart: always

    command:

      - -c

      - max_prepared_transactions=100

  bonita:

    # image: bonita:7.14.0

    image: bonita:7.15.0

    hostname: bonita.ajover.com

    tty: true

 

    volumes:

      - ./my-config/log4j:/opt/bonita/conf/logs

      # - ./my-config/resolv.conf:/etc/resolv.conf

      # - ./tenant-data:/opt/bonita/server/temp

      # - ./logs-bonita:/opt/bonita/logs/bonita.ajover.com

    ports:

      - 8081:8080

    environment:

      - DB_VENDOR=postgres

      - DB_HOST=db

      - DB_PORT=5432

      - DB_NAME=bonita

      - DB_USER=bonita

      - DB_PASS=bpm

      - BIZ_DB_NAME=business_data

      - BIZ_DB_USER=business_data

      - BIZ_DB_PASS=bpm

      - TENANT_LOGIN=install

      - TENANT_PASSWORD=install

      - PLATFORM_LOGIN=mbk

      - PLATFORM_PASSWORD=mbk

      # - HTTP_API=true

      # - HTTP_API_USERNAME=mbk

      # - HTTP_API_PASSWORD=mbk

      - ACCESSLOGS_STDOUT_ENABLED=true

      - ACCESSLOGS_FILES_ENABLED=true

      - ACCESSLOGS_PATH_APPEND_HOSTNAME=true

      - ACCESSLOGS_MAX_DAYS=30

   

    restart: on-failure:2

    depends_on:

      - db

    entrypoint:

      - bash

      - -c

      - |

        set -e

        echo 'Waiting for PostgreSQL to be available'

        maxTries=10

        while [ "$$maxTries" -gt 0 ] && [ $$(echo 'QUIT' | nc -w 1 "$$DB_HOST" 5432; echo "$$?") -gt 0 ]; do

            sleep 1

            let maxTries--

        done

        if [ "$$maxTries" -le 0 ]; then

            echo >&2 'error: unable to contact Postgres after 10 tries'

            exit 1

        fi

        exec /opt/files/startup.sh /opt/bonita/server/bin/catalina.sh run

  # access-gateway:

  #   dns:

  #   - 8.8.8.8

  #   - 8.8.4.4

volumes:

    logs-bonita:

    tenant-data: