{"id":13776360,"url":"https://github.com/monarchapis/gateway-openresty","last_synced_at":"2026-01-11T05:55:56.128Z","repository":{"id":26635767,"uuid":"30091581","full_name":"monarchapis/gateway-openresty","owner":"monarchapis","description":"OpenResty-based API Gateway for Monarch","archived":false,"fork":false,"pushed_at":"2016-02-11T16:15:35.000Z","size":15,"stargazers_count":8,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-03-17T20:56:27.460Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/monarchapis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-30T21:29:33.000Z","updated_at":"2018-12-23T15:33:21.000Z","dependencies_parsed_at":"2022-09-01T21:23:18.568Z","dependency_job_id":null,"html_url":"https://github.com/monarchapis/gateway-openresty","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monarchapis%2Fgateway-openresty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monarchapis%2Fgateway-openresty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monarchapis%2Fgateway-openresty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monarchapis%2Fgateway-openresty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/monarchapis","download_url":"https://codeload.github.com/monarchapis/gateway-openresty/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253551526,"owners_count":21926310,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T18:00:23.898Z","updated_at":"2026-01-11T05:55:56.085Z","avatar_url":"https://github.com/monarchapis.png","language":"Lua","readme":"Monarch OpenResty-based API Gateway\n===================================\n\nWorks in tandem with the API Manager to authenticate and authorize requests before proxying them to the appropriate backend service.\n\nSimply overlay the following files into your [OpenResty](http://openresty.org \"OpenResty home page\") installation directory (e.g. /usr/local/openresty).\n\n- **lualib/monarch.lua** - The main gateway script that handles calling the Monarch API Manager to verify the incoming request.\n- **lualib/resty/hmac.lua** - A contributed script that adds HMAC support.\n- **lualib/net/url.lua** - A contributed script that parses URLs.\n- **nginx/conf/nginx.conf** - The API gateway Nginx configuration.\n\nNext, you will need to edit nginx.conf to configure the following values:\n\n- **Host** and **Environment ID** - Under `location = /monarch_auth` and `location = /monarch_traffic` you will need to update the `Host` and `X-Environment-Id` headers.  The Monarch environment ID can be accessed in the admin console  by clicking the gear icon next to your user name in the upper right-hand corner. Likewise, the `upstream monarch_backend` needs to have the correct host and port.\n- **Provider Key** and **Shared Secret** - You will need to create a new Provider in the admin console (e.g. name = gateway, permissions = Authenticate API requests) and change the `set $provider_key \"XXXX\";` in nginx.conf to have the correct provider API key and shared secret you created for this provider.\n\nRefer to the `location /` for how to enable the communication with Monarch.  You can find documentation on configuring Nginx [on their wiki](http://wiki.nginx.org/Configuration \"Nginx configuration\").","funding_links":[],"categories":["Libraries"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonarchapis%2Fgateway-openresty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonarchapis%2Fgateway-openresty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonarchapis%2Fgateway-openresty/lists"}