Skip to content

eloycoto/APIcast

This branch is 1 commit ahead of, 792 commits behind 3scale/APIcast:master.

Folders and files

NameName
Last commit message
Last commit date
Jan 9, 2020
Jun 7, 2018
May 30, 2018
Jun 3, 2019
Feb 12, 2020
Feb 13, 2019
Oct 12, 2017
Mar 9, 2020
Jul 23, 2018
Jul 10, 2019
Feb 18, 2020
Jan 31, 2020
Sep 12, 2019
May 31, 2018
Jun 28, 2018
May 30, 2018
Jun 11, 2018
Aug 4, 2017
Mar 14, 2017
Apr 9, 2019
Sep 5, 2016
Feb 4, 2019
Aug 21, 2016
Nov 22, 2016
May 31, 2018
Oct 3, 2016
Oct 3, 2016
Jun 6, 2018
Mar 9, 2020
May 9, 2017
Nov 25, 2016
Oct 10, 2016
Mar 2, 2020
Nov 25, 2016
Mar 15, 2019
Jun 28, 2018
Jun 11, 2019
Jun 11, 2019
Sep 2, 2019
Jun 28, 2018
Apr 27, 2018
Oct 12, 2017
Sep 2, 2016
Jun 5, 2019
Jul 3, 2017
Sep 12, 2016
Jul 23, 2019

Repository files navigation

APIcast

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

Docker

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 YOUR_ACCOUNT-admin.3scale.net.

docker run --name apicast --rm -p 8080:8080 -e THREESCALE_PORTAL_ENDPOINT=https://ACCESS_TOKEN@ADMIN_PORTAL_DOMAIN quay.io/3scale/apicast:master

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 quay.io/3scale/apicast:master

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.

Openshift

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 \
   --type=kubernetes.io/basic-auth
oc new-app -f https://raw.githubusercontent.com/3scale/apicast/master/openshift/apicast-template.yml

Features

  • 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.

Development

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.

Documentation

License

Apache 2.0

About

3scale API Gateway

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Lua 65.0%
  • Perl 31.8%
  • Shell 0.9%
  • Makefile 0.8%
  • Other 0.8%
  • Liquid 0.6%
  • Ruby 0.1%