{"id":16486163,"url":"https://github.com/xsc/nginx-sidecar-basic-auth","last_synced_at":"2025-03-21T07:31:07.597Z","repository":{"id":72493838,"uuid":"175469564","full_name":"xsc/nginx-sidecar-basic-auth","owner":"xsc","description":"Docker image for an nginx proxy providing HTTP basic auth","archived":false,"fork":false,"pushed_at":"2020-03-19T18:41:33.000Z","size":16,"stargazers_count":30,"open_issues_count":2,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-29T11:33:15.164Z","etag":null,"topics":["alpine","basic-authentication","docker","nginx","openshift","sidecar-proxy"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/xscys/nginx-sidecar-basic-auth","language":"Smarty","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/xsc.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},"funding":{"github":["xsc"],"open_collective":"xsc-clojure"}},"created_at":"2019-03-13T17:36:56.000Z","updated_at":"2024-02-20T13:46:09.000Z","dependencies_parsed_at":"2023-06-27T00:08:45.032Z","dependency_job_id":null,"html_url":"https://github.com/xsc/nginx-sidecar-basic-auth","commit_stats":{"total_commits":8,"total_committers":2,"mean_commits":4.0,"dds":0.375,"last_synced_commit":"713835494671c75c1127fd9b64c599941f017123"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xsc%2Fnginx-sidecar-basic-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xsc%2Fnginx-sidecar-basic-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xsc%2Fnginx-sidecar-basic-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xsc%2Fnginx-sidecar-basic-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xsc","download_url":"https://codeload.github.com/xsc/nginx-sidecar-basic-auth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244119773,"owners_count":20401045,"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":["alpine","basic-authentication","docker","nginx","openshift","sidecar-proxy"],"created_at":"2024-10-11T13:28:32.882Z","updated_at":"2025-03-21T07:31:07.282Z","avatar_url":"https://github.com/xsc.png","language":"Smarty","readme":"# nginx-sidecar-basic-auth\n\n[![](https://images.microbadger.com/badges/version/xscys/nginx-sidecar-basic-auth.svg)](https://hub.docker.com/r/xscys/nginx-sidecar-basic-auth)\n[![](https://images.microbadger.com/badges/image/xscys/nginx-sidecar-basic-auth.svg)](https://hub.docker.com/r/xscys/nginx-sidecar-basic-auth)\n\nThis is a Docker image that provides an [nginx][nginx] proxy server enforcing\nHTTP basic authentication on every request (exception `OPTIONS`). It is suitable\nfor operation within [OpenShift][openshift], e.g. as a sidecar container.\n\n[openshift]: https://openshift.com\n[nginx]: https://www.nginx.com\n\n## Configuration\n\nConfiguration is provided using environment variables:\n\n| Environment               | Description                                                        | Default Value |\n| --------------------------| ------------------------------------------------------------------ | ------------- |\n| `PORT`                    | Port to listen on                                                  | `8087`        |\n| `FORWARD_HOST`            | Hostname of the backend server to proxy to                         | `localhost`   |\n| `FORWARD_PORT`            | Port of the backend server to proxy to                             | `8080`        |\n| `BASIC_AUTH_USERNAME`     | Username to use for authentication                                 | `admin`       |\n| `BASIC_AUTH_PASSWORD`     | Password to use for authentication                                 | `admin`       |\n| `PROXY_READ_TIMEOUT`      | Defines a timeout for reading a response from the proxied server   | `60s`         |\n| `PROXY_SEND_TIMEOUT`      | Sets a timeout for transmitting a request to the proxied server    | `60s`         |\n| `CLIENT_MAX_BODY_SIZE`    | Sets the maximum allowed size of the client request body           | `1m`          |\n| `PROXY_REQUEST_BUFFERING` | Enables or disables buffering of a client request body             | `on`          |\n| `PROXY_BUFFERING`         | Enables or disables buffering of responses from the proxied server | `on`          |\n| `WEBSOCKET_PATH`          | Activates websocket handling on the given path                     | (none)        |\n| `FORWARD_WEBSOCKET_PATH`  | If the remote path differs from `WEBSOCKET_PATH`, use this         | (none)        |\n\n\n## Usage\n\n### Docker\n\nStart the container and link it with your backend (alternatively, use Docker\nnetworks):\n\n```sh\ndocker run -d --name nginx-basic-auth -p 8087:8087 \\\n  --link backend:backend \\\n  -e FORWARD_HOST=backend \\\n  -e FORWARD_PORT=3000 \\\n  xscys/nginx-sidecar-basic-auth\n```\n\n### OpenShift Sidecar Usage\n\nAdd the sidecar container next to your application container in your deployment\nconfiguration:\n\n```yaml\n- image: xscys/nginx-sidecar-basic-auth\n  imagePullPolicy: Always\n  name: auth-proxy\n  ports:\n    - containerPort: 8087\n      protocol: TCP\n  env:\n    - name: FORWARD_PORT\n      value: ${BACKEND_CONTAINER_PORT}\n```\n\n## License\n\n```\nMIT License\n\nCopyright (c) 2019 Yannick Scherer\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","funding_links":["https://github.com/sponsors/xsc","https://opencollective.com/xsc-clojure"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxsc%2Fnginx-sidecar-basic-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxsc%2Fnginx-sidecar-basic-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxsc%2Fnginx-sidecar-basic-auth/lists"}