{"id":25135463,"url":"https://github.com/soofstad/baffle","last_synced_at":"2025-04-03T02:26:48.009Z","repository":{"id":275554294,"uuid":"924616678","full_name":"soofstad/baffle","owner":"soofstad","description":"A simple, configurable,  OAuth2 Backend-for-frontend","archived":false,"fork":false,"pushed_at":"2025-02-03T08:45:23.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-03T09:36:56.320Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/soofstad.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}},"created_at":"2025-01-30T10:46:50.000Z","updated_at":"2025-02-03T08:45:27.000Z","dependencies_parsed_at":"2025-02-03T09:36:58.759Z","dependency_job_id":"916d0b89-5c2b-436e-9149-e696b69f23ce","html_url":"https://github.com/soofstad/baffle","commit_stats":null,"previous_names":["soofstad/baffle"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soofstad%2Fbaffle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soofstad%2Fbaffle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soofstad%2Fbaffle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soofstad%2Fbaffle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soofstad","download_url":"https://codeload.github.com/soofstad/baffle/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246924008,"owners_count":20855651,"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":"2025-02-08T16:33:02.647Z","updated_at":"2025-04-03T02:26:47.981Z","avatar_url":"https://github.com/soofstad.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GoathBFF\nA simple, fast, and configurable OAuth2 Backend-for-frontend\n\n## DISCLAIMER\n- This is a work-in-progress and should __not be used in production__\n- Only meant to support single, stateless, API-calls. Not meant for serving HTML pages or static assets\n- Probably not very secure or reliable at the moment... but we're working on it!\n- Also not the greatest of all time (yet)\n\n## Example\n\nThis example uses docker-compose to run a simple setup with a backend and the GoathBFF.  \nThe GoathBFF will proxy requests to the backend and handle OAuth2 authentication.  \nThe backend will receive a regular \"Authorization\" header with the access/bearer token.\n\nYour frontend should be using GoathBFF for all API requests.  \nOther clients (confidential clients) should obtain an access token in other ways, and send requests directly to the backend. \n\n```bash\n\n```yaml\nservices:\n  goathbff:\n    image: soofstad/goathbff:latest\n    environment:\n      # OAuth2 configuration\n      CLIENT_SECRET: ${CLIENT_SECRET}\n      CLIENT_ID: 5cb6c4de-28d0-4b62-a547-262dc2377baf\n      REDIRECT_URI: http://localhost:8080/callback\n      TOKEN_ENDPOINT: \"https://login.microsoftonline.com/3aa4a235-b6e2-48d5-9195-7fcf05b459b0/oauth2/v2.0/token\"\n      AUTHENTICATION_ENDPOINT: \"https://login.microsoftonline.com/3aa4a235-b6e2-48d5-9195-7fcf05b459b0/oauth2/v2.0/authorize\"\n      SCOPE: \"openid profile email\"\n      \n      # Paths that should be proxied to the backend(s)\n      # Note that '/callback' and '/session' are reserved by baffle\n      # Format: \"path,backend-url;path,backend-url\" (empty path is allowed)\n      PATH_BACKEND_MAPPING: \"api,http://backend;,http://backend\"\n      \n      # Optional - will default to \"session\"\n      COOKIE_NAME: \"session\"\n    ports:\n      - \"80:8080\"\n  \n  backend:\n    image: nginx\n    ports:\n      - \"8080:80\"\n```\n\n## How-to\nTODO: Something about correct IdentityProvider setup. Do not allow SPA or implicit flow for example...","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoofstad%2Fbaffle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoofstad%2Fbaffle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoofstad%2Fbaffle/lists"}