{"id":21185599,"url":"https://github.com/raystack/kong-plugin-frontier","last_synced_at":"2025-08-18T10:10:06.327Z","repository":{"id":191984538,"uuid":"685811253","full_name":"raystack/kong-plugin-frontier","owner":"raystack","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-23T11:19:58.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-23T12:27:16.560Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raystack.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":"2023-09-01T04:12:46.000Z","updated_at":"2025-07-23T11:20:02.000Z","dependencies_parsed_at":"2023-12-19T10:44:54.506Z","dependency_job_id":"ae8cf0a9-1f74-446e-a4c3-ca2cf520ddc9","html_url":"https://github.com/raystack/kong-plugin-frontier","commit_stats":null,"previous_names":["raystack/kong-plugin-frontier"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/raystack/kong-plugin-frontier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raystack%2Fkong-plugin-frontier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raystack%2Fkong-plugin-frontier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raystack%2Fkong-plugin-frontier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raystack%2Fkong-plugin-frontier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raystack","download_url":"https://codeload.github.com/raystack/kong-plugin-frontier/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raystack%2Fkong-plugin-frontier/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270976292,"owners_count":24678467,"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","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-20T18:17:15.323Z","updated_at":"2025-08-18T10:10:06.284Z","avatar_url":"https://github.com/raystack.png","language":"Lua","readme":"# Kong Plugin - Frontier\n\nKong plugin to use with [frontier](https://github.com/raystack/frontier/) auth server.\n- Can exchange browser cookies/bearer header with user token\n- Inject user token in all proxy request as bearer token\n- Can verify if an endpoint is allowed based on user credentials by hitting frontier check APIs\n\n### TODO\n- Add test cases\n- https://github.com/lunarmodules/luacheck\n- cache frontier response - https://docs.konghq.com/gateway/latest/plugin-development/entities-cache/#cache-custom-entities\n\n### Notes\n- Add plugin configuration in kong.yml file where url is a required field\n```yml\nplugins:\n- name: frontier\n  service: backend-app\n  config: \n    url: http://host.docker.internal:7400/admin/v1beta1/users/self\n```\n- Configurable items\n```\nhttp_connect_timeout = {\n    type = \"number\",\n    default = 2000\n},\nhttp_send_timeout = {\n    type = \"number\",\n    default = 2000\n},\nhttp_read_timeout = {\n    type = \"number\",\n    default = 2000\n},\nheader_name = {\n    type = \"string\",\n    default = \"x-user-token\"\n},\nhttp_method = {\n    type = \"string\",\n    default = \"GET\"\n},\ntoken_claims_to_append_as_headers = {\n    type = \"array\",\n    default = DEFAULT_TOKEN_HEADERS,\n    elements = {\n        type = \"string\"\n    }\n},\nfrontier_header_prefix = {\n    type = \"string\",\n    default = \"X-Frontier-\"\n}\nrequest_organization_id_header = {\n    type = \"string\",\n    default = \"X-Organization-Id\"\n},\nverify_request_organization_id_header = {\n    type = \"boolean\",\n    default = false\n},\ndisabled = {\n    type = \"boolean\",\n    default = false\n}\n```\n- For local development linting\n```\nbrew install wget\nbrew install luarocks\nluarocks install luacheck\n```\n\n- For running tests locally\nUnit tests are written in [Kong Pongo](https://github.com/Kong/kong-pongo)\n\nInstallation:\n```\ngit clone git@github.com:Kong/kong-pongo.git\nPATH=$PATH:~/.local/bin\ngit clone https://github.com/Kong/kong-pongo.git\nmkdir -p ~/.local/bin\nln -s $(realpath kong-pongo/pongo.sh) ~/.local/bin/pongo\n```\n\nRunning tests:\n```\npongo up\ncd \u003croot_folder_of_plugin\u003e\npongo run ./\n```\n\nIf you get a `pongo: command not found` error after installation, add the pongo binary to path with `PATH=$PATH:~/.local/bin`\n\n### References\n- https://github.com/Kong/kong-plugin\n- https://docs.konghq.com/gateway/3.2.x/plugin-development/pdk/","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraystack%2Fkong-plugin-frontier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraystack%2Fkong-plugin-frontier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraystack%2Fkong-plugin-frontier/lists"}