Skip to content
3scale API Gateway
Lua Perl Shell Makefile Perl 6 Liquid Ruby
Branch: master
Clone or download
eloycoto Merge pull request #1090 from eloycoto/THREESCALE-1555
Openshift: delete dnsmasq procces [THREESCALE-1555]
Latest commit f2c4168 Aug 9, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci .circleci/config: disable profiling job temporarily Jul 19, 2019
.github [github] change owner to core team Jun 7, 2018
benchmark [test] lua port of benchmark-ips May 30, 2018
bin Fix invalid warning message from openresty Jun 3, 2019
doc doc/parameters: clarify APICAST_LOAD_SERVICES_WHEN_NEEDED Jul 30, 2019
examples Move maintenance policy to builtin path Aug 6, 2019
fixtures Add limits exceeded error in example config files Oct 12, 2017
gateway Openshift: remove dnsmasq Aug 9, 2019
openshift Set LOG_LEVEL param to required Jul 23, 2018
script CIRCLE: bump Openresty to 1.15.1 version. Jul 10, 2019
spec policy/maintenance: make content-type header configurable Aug 6, 2019
t policy/maintenance: make content-type header configurable Aug 6, 2019
travis [travis] build with latest openresty May 3, 2017
.busted [ci] print busted tests in the log as well as junit May 31, 2018
.codeclimate.yml [codeclimate] luacheck was released to the stable channel Jun 28, 2018
.codecov.yml codecov.yml: ignore files that codecov picks from outside gateway/src May 30, 2018
.dockerignore [make] improve development environment Jun 11, 2018
.env [proxy] introduce second cache handler Aug 4, 2017
.gitattributes [git] allow merge=union on the changelog file Mar 14, 2017
.gitignore [git] ignore .cpanm folder Apr 9, 2019
.lgtm [lgtm] configure lgtm approvals Sep 5, 2016
.luacheckrc [luacheck] openresty provides coroutine._* methods Feb 4, 2019
.luacov run luacov Aug 21, 2016
.mailmap .mailmap: map authors to their names/addresses Nov 22, 2016
.travis.yml [travis] don't build builder image on travis May 31, 2018
3scale-gateway-openshift-template.yml rename to APIcast Oct 3, 2016
3scale-portal-endpoint-secret.yml rename to APIcast Oct 3, 2016
Brewfile [brew] link installed dependencies so they are available as commands Jun 6, 2018 Openshift: remove dnsmasq Aug 9, 2019
Dangerfile [danger] require changelog only when merging to master May 9, 2017
LICENSE Change license file to have contents of Apache2.0 license Nov 25, 2016
Makefile fix for make development failures reported in #957 Jun 11, 2019
NOTICE Add NOTICE Nov 25, 2016 README: fix Circle CI badge link Mar 15, 2019
Vagrantfile [circleci] install native apicast for profiling Jun 28, 2018
docker-compose-devel-volmount-default.yml fix for make development failures reported in #957 Jun 11, 2019
docker-compose-devel-volmount-mac.yml fix for make development failures reported in #957 Jun 11, 2019
docker-compose-devel.yml fix for make development failures reported in #957 Jun 11, 2019
docker-compose.benchmark.yml [benchmark] more stable benchmark output Jun 28, 2018
docker-compose.yml [compose] provide jaeger all-in-one to try opentracing Apr 27, 2018
luarocks.config use resty-cli as lua interpreter Oct 12, 2017
openresty.repo Install openresty using the official RPM's Sep 2, 2016
package.json {package.json, yarn.lock}: bump markdown-link-check to 3.7.3 Jun 5, 2019
rockspec circleci Jul 3, 2017
schema.json minimal json schema specification for the config Sep 12, 2016
yarn.lock Yarn: Upgrade dependencies Jul 23, 2019


CircleCI Docker Repository on Quay codecov

APIcast is an API gateway built on top of NGINX. It is part of the Red Hat 3scale API Management Platform.

Getting started

master branch is not recommended for production use. For the latest release, go to the Releases page


You need to specify an ACCESS_TOKEN, that you can get from the 3scale admin portal, and also your ADMIN_PORTAL_DOMAIN. If you are using SaaS, it is

docker run --name apicast --rm -p 8080:8080 -e THREESCALE_PORTAL_ENDPOINT=https://ACCESS_TOKEN@ADMIN_PORTAL_DOMAIN

You can use a JSON configuration file instead:

docker run --name apicast --rm -p 8080:8080 -v $(pwd)/config.json:/opt/app/config.json:ro -e THREESCALE_CONFIG_FILE=/opt/app/config.json

In this example config.json is located in the same directory where the docker command is executed, and it is mounted as a volume at /opt/app/config.json. :ro indicates that the volume will be read-only.

The JSON file needs to follow the schema, see an example file with the fields that are used by APIcast.


You need to create a secret with your ACCESS_TOKEN and your ADMIN_PORTAL_DOMAIN:

oc create secret generic apicast-configuration-url-secret \
   --from-literal=password=https://ACCESS_TOKEN@ADMIN_PORTAL_DOMAIN \
oc new-app -f


  • Performance: it is fast because it's built on top of NGINX and uses LuaJIT.
  • Scalability: APIcast is stateless, so it scales horizontally.
  • Request transformation: allows to modify the headers, the path and the arguments of a request.
  • Rate-limit: can apply limits based on a header, JWT claims, the IP of the request and many more.
  • Modular and extensible: thanks to the APIcast policies framework.
  • Monitoring with Prometheus.
  • OpenTracing integration with Jaeger.
  • Can be deployed in Openshift.
  • Integrates with IDPs like Keycloak to provide authentication based on OIDC.


Using Docker you just need to run:

make development

That will create a Docker container and run bash inside it. The project's source code will be available in the container and sync'ed with your local apicast directory, so you can edit files in your preferred environment and still be able to run whatever you need inside the Docker container.

To install the dependencies inside the container run:

make dependencies

To run the unit tests inside the container:

make busted

To run the integration tests inside the container:

make prove

To learn about the other available make targets:

make help

APIcast uses:

  • OpenResty: a platform that includes NGINX, LuaJIT and Lua modules.
  • busted: for the unit tests.
  • Test::Nginx: for the integration tests.



Apache 2.0

You can’t perform that action at this time.