{"id":19200410,"url":"https://github.com/fabriziofiorucci/nginx-api-gw","last_synced_at":"2025-05-09T02:42:32.947Z","repository":{"id":109968565,"uuid":"351089863","full_name":"fabriziofiorucci/NGINX-API-GW","owner":"fabriziofiorucci","description":"An enhanced NGINX Plus-based API Gateway deployment with dynamic OIDC idP selection","archived":false,"fork":false,"pushed_at":"2023-05-05T10:03:15.000Z","size":100,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-20T12:41:15.641Z","etag":null,"topics":["authn","authz","gateway-api","nginx","oidc","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fabriziofiorucci.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-03-24T13:28:33.000Z","updated_at":"2023-05-05T10:03:20.000Z","dependencies_parsed_at":"2025-04-20T12:52:26.726Z","dependency_job_id":null,"html_url":"https://github.com/fabriziofiorucci/NGINX-API-GW","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabriziofiorucci%2FNGINX-API-GW","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabriziofiorucci%2FNGINX-API-GW/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabriziofiorucci%2FNGINX-API-GW/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabriziofiorucci%2FNGINX-API-GW/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabriziofiorucci","download_url":"https://codeload.github.com/fabriziofiorucci/NGINX-API-GW/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253180027,"owners_count":21866850,"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":["authn","authz","gateway-api","nginx","oidc","rest-api"],"created_at":"2024-11-09T12:32:52.245Z","updated_at":"2025-05-09T02:42:32.939Z","avatar_url":"https://github.com/fabriziofiorucci.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NGINX Plus API Gateway\n\n## Description\n\nThis code is based on https://docs.nginx.com/nginx/deployment-guides/single-sign-on/\n\nThe original deployment guide focuses on FQDN-based OIDC IdP selection, this repository provides a number of changes and enhancements to support dynamic multiple IdPs based on the URI (map-based setup) and FQDN + URI (keyval-based setup), authorization and URI rewriting.\n\nThis supports deployments where all published REST APIs share a common FQDN (ie. http(s)://api.ff.lan/) and must be handled based on the first URI token, that is:\n\n```\nhttp://api.ff.lan/testapi-1/tasks -\u003e this gets authenticated by IdP #1\nhttp://api.ff.lan/testapi-2/tasks -\u003e this gets authenticated by IdP #2\n```\n\n## Prerequisites\n\n- a Kubernetes or Openshift cluster\n- a private registry to push the NGINX Plus image and the test api images\n- at least one OIDC IdP (like Keycloak, Okta, MS ADFS, etc)\n- the NGINX Plus image must be built with support for javascript (nginx-plus-module-njs) and lua (nginx-plus-module-lua)\n\n## Building the NGINX Plus image\n\n```\ncd nginx-dockerfile\n```\n\ncopy your nginx-repo.crt and nginx-repo.key to the local dir\n\n```\ndocker build --no-cache -t YOUR_PRIVATE_REGISTRY/nginxplus-js-lua:TAG .\ndocker push YOUR_PRIVATE_REGISTRY/nginxplus-js-lua:TAG\n```\n\n## Current and upcoming features\n\n- [X] per-URI OIDC IdP selection (endpoints, client id, client key, ...) based on NGINX \"maps\"\n- [X] per-FQDN/URI OIDC IdP selection (endpoints, client id, client key, ...) based on NGINX \"keyval_zone\"\n- [X] per-FQDN/URI / per-REST API function HTTP method filtering\n- [X] per-FQDN/URI REST API function quota\n- [X] URI rewriting support\n\n## Deployment types\n\n- [Based on NGINX maps](manifests-map)\n- [Based on NGINX keyval zones and REST APIs](manifests-keyval)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabriziofiorucci%2Fnginx-api-gw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabriziofiorucci%2Fnginx-api-gw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabriziofiorucci%2Fnginx-api-gw/lists"}