{"id":13558586,"url":"https://github.com/dokku/dokku-http-auth","last_synced_at":"2025-04-03T13:31:38.437Z","repository":{"id":28834104,"uuid":"32357745","full_name":"dokku/dokku-http-auth","owner":"dokku","description":"dokku plugin that gives the ability to manage HTTP basic auth for an application","archived":false,"fork":false,"pushed_at":"2024-07-02T17:28:15.000Z","size":49,"stargazers_count":85,"open_issues_count":4,"forks_count":20,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-30T00:56:03.657Z","etag":null,"topics":["auth","dokku","dokku-plugin","nginx","paas"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/dokku.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},"funding":{"github":"dokku","open_collective":"dokku","patreon":"dokku"}},"created_at":"2015-03-16T22:51:31.000Z","updated_at":"2024-10-20T22:54:31.000Z","dependencies_parsed_at":"2022-08-08T02:00:06.354Z","dependency_job_id":"370e4ee7-59e3-4841-9e0b-d4acc3f5b5ac","html_url":"https://github.com/dokku/dokku-http-auth","commit_stats":{"total_commits":43,"total_committers":6,"mean_commits":7.166666666666667,"dds":0.2325581395348837,"last_synced_commit":"9018722e8a7c80073e2b1257967ad4718f6f3da6"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dokku%2Fdokku-http-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dokku%2Fdokku-http-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dokku%2Fdokku-http-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dokku%2Fdokku-http-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dokku","download_url":"https://codeload.github.com/dokku/dokku-http-auth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246453825,"owners_count":20780024,"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":["auth","dokku","dokku-plugin","nginx","paas"],"created_at":"2024-08-01T12:05:02.847Z","updated_at":"2025-04-03T13:31:38.110Z","avatar_url":"https://github.com/dokku.png","language":"Shell","funding_links":["https://github.com/sponsors/dokku","https://opencollective.com/dokku","https://patreon.com/dokku"],"categories":["Shell","others"],"sub_categories":[],"readme":"# dokku-http-auth\n\ndokku-http-auth is a plugin for [dokku][dokku] that gives the ability to enable or disable HTTP authentication for an application.\n\n## Requirements\n\n`mkpasswd` from the `whois` package is required to generate secure hash (SHA-512) from provided passwords. It will be installed via `apt-get` when calling `dokku plugins-install`.\n\n## Installation\n\n```sh\n# dokku 0.4+\n$ dokku plugin:install https://github.com/dokku/dokku-http-auth.git\n```\n\n## Commands\n\n```\n$ dokku http-auth:help\n    http-auth:add-user \u003capp\u003e \u003cuser\u003e \u003cpassword\u003e  Add basic auth user to app\n    http-auth:add-allowed-ip \u003capp\u003e \u003caddress\u003e    Add allowed IP to basic auth bypass for an app\n    http-auth:disable \u003capp\u003e                     Disable HTTP auth for app\n    http-auth:enable \u003capp\u003e \u003cuser\u003e \u003cpassword\u003e    Enable HTTP auth for app\n    http-auth:remove-allowed-ip \u003capp\u003e \u003caddress\u003e Remove allowed IP from basic auth bypass for an app\n    http-auth:remove-user \u003capp\u003e \u003cuser\u003e          Remove basic auth user from app\n    http-auth:report [\u003capp\u003e] [\u003cflag\u003e]           Displays an http-auth report for one or more apps\n    http-auth:show-config \u003capp\u003e                 Display app http-auth config\n```\n\n## Usage\n\n### Enabling HTTP Auth\n\nThe `http-auth:enable` command can be used to enable HTTP Auth for an app.\n\n```shell\ndokku http-auth:enable node-js-app\n```\n\n```\n-----\u003e Enabling HTTP auth for node-js-app...\n !     Skipping user initialization\n-----\u003e Configuring node-js-app.dokku.me...(using built-in template)\n-----\u003e Creating https nginx.conf\n       Enabling HSTS\n       Reloading nginx\n       Done\n```\n\nA user/password combination can also be specified when enabling HTTP Auth.\n\n```shell\ndokku http-auth:enable node-js-app username password\n```\n\n```\n-----\u003e Enabling HTTP auth for node-js-app...\n-----\u003e Configuring node-js-app.dokku.me...(using built-in template)\n-----\u003e Creating https nginx.conf\n       Enabling HSTS\n       Reloading nginx\n       Done\n```\n\n### Adding users\n\nIndividual user/password combinations can be added at any point in time via the `http-auth:add-user` command. Specifying the same user twice will override the first instance of the user, even if the password is the same.\n\n```shell\ndokku http-auth:add-user node-js-app username password\n```\n\n```\n-----\u003e Adding username to basic auth list\n-----\u003e Configuring node-js-app.dokku.me...(using built-in template)\n-----\u003e Creating https nginx.conf\n       Enabling HSTS\n       Reloading nginx\n```\n\n### Removing users\n\nA user can be removed via the `http-auth:remove-user` command. This command will always reload nginx, even if the user does not exist.\n\n```shell\ndokku http-auth:remove-user node-js-app username\n```\n\n```\n-----\u003e Removing username from basic auth list\n-----\u003e Configuring node-js-app.dokku.me...(using built-in template)\n-----\u003e Creating https nginx.conf\n       Enabling HSTS\n       Reloading nginx\n```\n\n### Limiting access to specific IP Addresses\n\n\u003e See the [Nginx Documentation](https://nginx.org/en/docs/stream/ngx_stream_access_module.html) for more information on how this works\n\nAccess can be allowed to only a specified set of IP Addresses, CIDR Blocks, or UNIX-domain sockets via the `http-auth:add-allowed-ip` command. This is used in conjunction with the basic auth support.\n\n```shell\ndokku http-auth:add-allowed-ip node-js-app 127.0.0.1\n````\n\n```\n-----\u003e Adding 127.0.0.1 to allowed ip list\n-----\u003e Ensuring network configuration is in sync for node-js-app\n-----\u003e Configuring node-js-app.dokku.me...(using built-in template)\n-----\u003e Creating https nginx.conf\n       Enabling HSTS\n       Reloading nginx\n```\n\nThe specified IP address can be removed via the `http-auth:remove-allowed-ip` command.\n\n```shell\ndokku http-auth:remove-allowed-ip node-js-app 127.0.0.1\n````\n\n```\n-----\u003e Removing 127.0.0.1 from allowed ip list\n-----\u003e Ensuring network configuration is in sync for node-js-app\n-----\u003e Configuring node-js-app.dokku.me...(using built-in template)\n-----\u003e Creating https nginx.conf\n       Enabling HSTS\n       Reloading nginx\n```\n\n### Viewing http auth config\n\nThe nginx `http-auth.conf` file can be viewed via the `http-auth:show-config` command. This command will _not_ output the `htaccess` file.\n\n```shell\ndokku http-auth:show-config node-js-app username\n```\n\n```\nauth_basic           \"Restricted\";\nauth_basic_user_file /home/dokku/node-js-app/htpasswd;\n```\n\n### Displaying http auth reports for an app\n\nYou can get a report about the app's http-auth status using the `http-auth:report` command:\n\n```shell\n# dokku http-auth:report node-js-app\n```\n\n```\n=====\u003e node-js-app http-auth information\n       Http auth enabled:             true\n       Http auth allowed ips:         127.0.0.1\n       Http auth users:               root username\n```\n\nYou can pass flags which will output only the value of the specific information you want. For example:\n\n```shell\ndokku http-auth:report node-js-app --http-auth-enabled\n```\n\n## License\n\nThis plugin is released under the MIT license. See the file [LICENSE](LICENSE).\n\n[dokku]: https://github.com/dokku/dokku\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdokku%2Fdokku-http-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdokku%2Fdokku-http-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdokku%2Fdokku-http-auth/lists"}