{"id":29586640,"url":"https://github.com/basecamp/mission_control-web","last_synced_at":"2025-10-10T12:15:55.245Z","repository":{"id":239742922,"uuid":"522493041","full_name":"basecamp/mission_control-web","owner":"basecamp","description":"Dashboard and Rails middleware to control web requests","archived":false,"fork":false,"pushed_at":"2024-08-22T20:39:12.000Z","size":287,"stargazers_count":92,"open_issues_count":12,"forks_count":5,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-09-30T10:38:39.105Z","etag":null,"topics":[],"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/basecamp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-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":"2022-08-08T09:57:05.000Z","updated_at":"2025-09-19T23:22:15.000Z","dependencies_parsed_at":"2024-06-04T23:39:44.194Z","dependency_job_id":"9e345112-5a26-42d3-8cc5-5c2835c81a12","html_url":"https://github.com/basecamp/mission_control-web","commit_stats":null,"previous_names":["basecamp/mission_control-web"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/basecamp/mission_control-web","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Fmission_control-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Fmission_control-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Fmission_control-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Fmission_control-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/basecamp","download_url":"https://codeload.github.com/basecamp/mission_control-web/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Fmission_control-web/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278861176,"owners_count":26058659,"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-10-07T02:00:06.786Z","response_time":59,"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":"2025-07-20T03:30:53.884Z","updated_at":"2025-10-10T12:15:55.230Z","avatar_url":"https://github.com/basecamp.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mission Control - Web\n\nThis gem provides a Rails-based frontend and middleware to deny access to particular parts of your application. This is\nespecially useful in an incident response scenario such as deployment of unperformant code, or a denial of service\nattack.\n\n\u003cimg width=\"952\" alt=\"Screenshot of Mission Control - Web admin UI\" src=\"https://github.com/basecamp/mission_control-web/assets/1773614/5c75a304-820e-4151-882e-f0782211356c\"\u003e\n\n## How it works\n\nMission Control - Web can be configured via the admin interface to block requests whose path matched a regex pattern. If\nthe requested path matches any \"Denied\" path, it will be blocked with a 503 HTTP status code.\n\n## Usage\n\nYou can choose to deploy Mission Control - Web admin and middleware both in the same Rails app, or two separate apps, a\nprotected Rails app and an admin app.\n\nThe benefit of using two separate apps is that if your protected app is attacked or suffers a performance issue, it may\nbecome inaccessible while an admin app does not.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem \"mission_control-web\"\n```\n\nAnd then execute:\n```bash\n$ bundle\n```\n\nthen, follow the instructions below for a single app, or a separate admin app.\n\n## Installation in a single app\n\nAnd then execute:\n```bash\n$ bin/rails generate mission_control:web:install\n```\n\n## Installation with two apps, admin and protected\n\nAfter adding the `mission_control-web` gem, in your admin app:\n\n```bash\n$ bin/rails generate mission_control:web:install:admin\n```\n\nand in your protected Rails app:\n\n```bash\n$ bin/rails generate mission_control:web:install:middleware\n```\n\n## Configuration\n\n### Redis client\n\nConfigure Mission Control - Web with a Redis client.\n\n```rb\n# config/initializers/mission_control_web.rb\n\nconfig.mission_control.web.redis = Redis.new(url: \"redis://server:6379/0\")\n```\n\n### Administered applications\n\n```rb\nconfig.mission_control.web.administered_applications = [ { name: \"My Rails App\", redis: Redis.new(url: \"redis://server:6379/0\") } ]\n```\n\n### Authentication and base controller class\n\nBy default, Mission Control's controllers will extend the host app's ApplicationController. If no authentication is\nenforced, the admin pages will be available to everyone. You might want to implement some kind of authentication for\nthis in your app. To make this easier, you can specify a different controller as the base class for Mission Control's\ncontrollers:\n\n```rb\nconfig.mission_control.web.base_controller_class = \"AdminController\"\n```\n\n### Custom \"denied\" page\n\nYou can configure a custom page to show to users when a request is denied by Mission Control - Web. Configure this like\nso:\n\n```rb\nconfig.mission_control.web.errors_controller = MissionControl::Web::CustomErrorsController\n```\n\nThen, in your application, create a custom errors controller:\n\n```rb\nclass MissionControl::Web::CustomErrorsController \u003c MissionControl::Web::ErrorsController\n  def disallowed\n    render file: \"public/503.html\"\n  end\nend\n```\n\n### Other configuration\n\nUseful for disabling the Mission Control - Web request intercept middleware on a per-application or per-environment basis:\n\n```rb\nconfig.mission_control.web.middleware_enabled = false\n```\n\nDenied paths are cached by the middleware and refreshed from Redis on this interval. With this configuration, it takes up to 10 seconds for path denial to take effect:\n\n```rb\nconfig.mission_control.web.routes_cache_ttl = 10.seconds\n```\n\n## Testing\n\nRun:\n\n```sh\nrake test\n```\n\nPerformance tests can be run in the \"profile\" environment for more consistent results with:\n\n```sh\nRAILS_ENV=profile rake test:performance\n```\n\n## Resiliency\n\nIf Redis is down (or raises any instance of Redis::BaseConnectionError), Mission Control Web middleware will fail-open.\n\nIt's recommended to also consider using a resilient Redis client with a circuit-breaker. See [Semian](https://github.com/Shopify/semian).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasecamp%2Fmission_control-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasecamp%2Fmission_control-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasecamp%2Fmission_control-web/lists"}