• Stars
    star
    304
  • Rank 136,579 (Top 3 %)
  • Language
    Lua
  • License
    Apache License 2.0
  • Created over 8 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

3scale API Gateway

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.
  • NGINX instrumentation using OpenTelemetry. Works 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.

More info can be found in the development specific doc.

Documentation

License

Apache 2.0

More Repositories

1

porta

Red Hat 3scale API Management, Porta
Ruby
73
star
2

3scale-operator

Openshift operator to install a 3scale API Management solution
Go
43
star
3

lua-resty-url

OpenResty library for parsing URI
Lua
42
star
4

3scale-amp-openshift-templates

3scale API Management OpenShift Templates
Ruby
42
star
5

docker-openresty

Docker Image with Openresty, redis and luarocks
Makefile
39
star
6

3scale_toolbox

3scale toolbox
Ruby
37
star
7

apisonator

Red Hat 3scale API Management Apisonator backend
Ruby
35
star
8

3scale-istio-adapter

Red Hat 3scale Istio Mixer Adapter - Add 3scale's API Management to the Service Mesh
Go
33
star
9

dwight-conrad

The son of Hermes and LaBarbara Conrad, also an Openresty dynamic router.
Nginx
33
star
10

zync

Zync takes your 3scale data and pushes it somewhere else, reliably.
Ruby
19
star
11

echo-api

Simple sinatra app that returns back info about the request
Ruby
15
star
12

3scale-Operations

This repo contains documentation and tools to help in the day-to-day operations of 3scale API Management
12
star
13

3scale-api-ruby

3scale API Ruby Client
Ruby
9
star
14

lua-resty-env

OpenResty ENV cache
Lua
9
star
15

apicast-operator

Go
8
star
16

apicast-cli

APIcast CLI
Lua
5
star
17

pisoni

Client for the Apisonator internal API to push model data
Ruby
4
star
18

threescale-wasm-auth

Proxy-WASM filter for 3scale integration
Rust
4
star
19

config_for

Framework for generating, uploading and loading yaml configurations in Ruby apps.
Ruby
4
star
20

cors-proxy

Lua
3
star
21

docker-base

Docker Base image with tuned apt
Makefile
3
star
22

s2i-openresty

Shell
3
star
23

3scale-go-client

Go
3
star
24

apicast-cloud-hosted

APIcast Cloud Hosted
Lua
2
star
25

lua-rover

Lua
2
star
26

unicorn-prewarm

Prewarm your Unicorn workers before real requests come in
Ruby
2
star
27

Test-APIcast

APIcast testing framework using Test::Nginx
Perl
2
star
28

3scale-porta-go-client

3scale Account Management API Client
Go
2
star
29

3scale-operator-metadata

3scale Operator Metadata
Makefile
1
star
30

apicast-operator-metadata

Apicast Operator Metadata
Makefile
1
star
31

oracle-database

PLSQL
1
star
32

rack-x_served_by

Rack Middleware that adds X-Served-By header
Ruby
1
star
33

docker-mysql

Shell
1
star
34

apicast-private-ip-blacklist-policy

APIcast policy that blocks upstream connections to private IP ranges
Lua
1
star