{"id":31161473,"url":"https://github.com/ferencsarai/envoy-auth","last_synced_at":"2026-01-04T22:13:46.619Z","repository":{"id":315074387,"uuid":"840374596","full_name":"ferencsarai/envoy-auth","owner":"ferencsarai","description":"This project provides an external authorization service using Envoy Proxy","archived":false,"fork":false,"pushed_at":"2025-09-16T14:55:40.000Z","size":50,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-16T15:50:38.438Z","etag":null,"topics":["docker","docker-compose","envoy-proxy","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ferencsarai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2024-08-09T15:01:45.000Z","updated_at":"2025-09-16T14:47:35.000Z","dependencies_parsed_at":"2025-09-17T17:00:26.322Z","dependency_job_id":null,"html_url":"https://github.com/ferencsarai/envoy-auth","commit_stats":null,"previous_names":["ferencsarai/envoy-auth"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ferencsarai/envoy-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferencsarai%2Fenvoy-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferencsarai%2Fenvoy-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferencsarai%2Fenvoy-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferencsarai%2Fenvoy-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ferencsarai","download_url":"https://codeload.github.com/ferencsarai/envoy-auth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferencsarai%2Fenvoy-auth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275877341,"owners_count":25544467,"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-09-19T02:00:09.700Z","response_time":108,"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":["docker","docker-compose","envoy-proxy","ruby"],"created_at":"2025-09-19T03:56:12.135Z","updated_at":"2025-10-26T15:38:34.958Z","avatar_url":"https://github.com/ferencsarai.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Envoy External Authorization\n\n[![CI](https://github.com/ferencsarai/envoy-auth/actions/workflows/ci.yml/badge.svg)](https://github.com/ferencsarai/envoy-auth/actions/workflows/ci.yml)\n![Envoy Proxy](https://img.shields.io/badge/envoy_proxy-magenta?style=social\u0026logo=envoyproxy\u0026logoSize=auto) ![Docker](https://img.shields.io/badge/docker-blue?style=social\u0026logo=docker\u0026logoSize=auto) ![Ruby](https://img.shields.io/badge/ruby-red?style=social\u0026logo=ruby\u0026logoSize=auto)\n\nThis repository demonstrates how to use [Envoy proxy](https://www.envoyproxy.io/) with an external authorization service.\n\n## Install, build and run\n\nTo install the project, follow these steps:\n\n1. Clone the repository:\n\n    ```bash\n    git clone https://github.com/ferencsarai/envoy-auth\n    ```\n\n2. Change into the project directory:\n\n    ```bash\n    cd envoy-auth\n    ```\n\n3. Build the project using Docker Compose:\n\n    ```bash\n    docker-compose build\n    ```\n\n4. To run the project, use the following command:\n\n    ```bash\n    docker-compose up\n    ```\n\n## Usage\n\nOnce the project is running, you can send requests to `http://localhost:8000` with the `User-Agent: Chrome` header to get a successful response. Requests with any other `User-Agent` header will result in a `403` status code.\n\n- **Not allowed (403)**:\n\n    ```bash\n    curl -v -A \"sfjs\" http://localhost:8000\n    ```\n\n- **Allowed (200)** - this will return a response from the echo service [http-echo](https://hub.docker.com/r/solsson/http-echo):\n\n    ```bash\n    curl -v -A \"Chrome\" http://localhost:8000\n    ```\n\n## How it works\n\n![Envoy External Authorization](./assets/envoy_proxy.png)\n\nThe project utilizes three containers from the docker-compose [file](docker-compose.yaml).\n\n1. [Envoy proxy](docker/envoy-proxy/Dockerfile) ([config](docker/envoy-proxy/envoy.yaml))\n2. [External authorization service](docker/auth-service/Dockerfile) ([Ruby script](docker/auth-service/auth-service.rb))\n3. [Service (http-echo)](docker/web-echo/Dockerfile)\n\n## Request flow\n\n1. The client sends a request to Envoy proxy.\n2. Envoy proxy forwards the request to the external authorization service.\n3. The external authorization service checks the `User-Agent` header.\n   - If the `User-Agent` contains `Chrome`, it returns `200`.\n   - If the `User-Agent` does not contain `Chrome`, it returns `403`.\n4. Envoy proxy forwards the request to the service if `200` is returned. Otherwise, it returns `403` to the client without forwarding the request to the service.\n\n## Configuration\n\nEnvoy proxy configuration: [envoy.yaml](docker/envoy-proxy/envoy.yaml)\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. Please also review our [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) and [CODEOWNERS](CODEOWNERS).\n\n## License\n\nThis project is licensed under the terms of the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferencsarai%2Fenvoy-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fferencsarai%2Fenvoy-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferencsarai%2Fenvoy-auth/lists"}