{"id":15035824,"url":"https://github.com/kong/insomnia-mockbin","last_synced_at":"2025-05-14T06:05:53.276Z","repository":{"id":14880279,"uuid":"17603844","full_name":"Kong/insomnia-mockbin","owner":"Kong","description":"Insomnia Mockbin is the underlying backend for the API mocks capability of Insomnia. It is built and used by Kong, the author of the open-source Kong Gateway. ","archived":false,"fork":false,"pushed_at":"2024-08-27T15:01:03.000Z","size":698,"stargazers_count":2037,"open_issues_count":43,"forks_count":212,"subscribers_count":58,"default_branch":"master","last_synced_at":"2024-10-29T15:38:07.593Z","etag":null,"topics":["api-client","api-management","api-mock","api-test","api-testing","apis","mocking","testing-tools"],"latest_commit_sha":null,"homepage":"https://insomnia.rest/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"andrewviren/MyPPR","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kong.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2014-03-10T18:34:36.000Z","updated_at":"2024-10-10T13:37:33.000Z","dependencies_parsed_at":"2024-04-16T07:42:56.686Z","dependency_job_id":"e21623f8-e939-4cba-a2a5-5207ffc6887f","html_url":"https://github.com/Kong/insomnia-mockbin","commit_stats":null,"previous_names":["mashape/mockbin","kong/insomnia-mockbin","kong/mockbin"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kong%2Finsomnia-mockbin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kong%2Finsomnia-mockbin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kong%2Finsomnia-mockbin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kong%2Finsomnia-mockbin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kong","download_url":"https://codeload.github.com/Kong/insomnia-mockbin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248388411,"owners_count":21095386,"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":["api-client","api-management","api-mock","api-test","api-testing","apis","mocking","testing-tools"],"created_at":"2024-09-24T20:29:34.548Z","updated_at":"2025-04-11T11:47:46.804Z","avatar_url":"https://github.com/Kong.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Insomnia Mockbin ![version][npm-version] [![License][npm-license]][license-url]\n\n**Note:** This repository is source visibile, but not open-source. Please check the [LICENSE](LICENSE) before using this software.\n\nInsomnia Mockbin is maintained by [Kong](https://github.com/Kong), who also maintains the open-source API Gateway [Kong](https://github.com/Kong/kong) and [Insomnia](https://github.com/Kong/insomnia).\n\n## Table of contents\n\n- [Insomnia Mockbin  ](#insomnia-mockbin--)\n  - [Table of contents](#table-of-contents)\n  - [Features](#features)\n  - [Installation](#installation)\n    - [Requirements](#requirements)\n    - [Running with Node](#running-with-node)\n  - [Running with Docker Compose](#running-with-docker-compose)\n  - [Documentation](#documentation)\n    - [API Docs](#api-docs)\n  - [Releasing](#releasing)\n    - [Software Bill of materials](#software-bill-of-materials)\n    - [Verify a container image signature](#verify-a-container-image-signature)\n    - [Verify a container image provenance](#verify-a-container-image-provenance)\n  - [Bugs and feature requests](#bugs-and-feature-requests)\n  - [Contributing](#contributing)\n  - [License](#license)\n\n## Features\n\n- uses HAR format\n- supports JSON, YAML, XML, HTML output\n- plays nice with proxies (uses the X-Forwarded-* headers for IP resolution)\n- allows for HTTP Method Override using the header `X-HTTP-Method-Override` or through query string parameter: `_method`\n- create custom bins for experimenting log collection\n\n## Installation\n\n### Requirements\n\n- [Redis](http://redis.io/)\n\n```shell\nbrew install redis\nbrew services start redis\n```\n\nRedis should be now running on localhost:6379\nMockbin will start without redis but you wont be able to set or get response bins.\n\n```shell\ngit clone https://github.com/Kong/mockbin.git ./mockbin\ncd mockbin\ncp .env.sample .env\nbrew install fnm\nfnm use\nnpm install\n```\n\nNote: nvm, n or volta can be used instead of fnm.\n\n### Running with Node\n\n```shell\nnpm start\n# OR watch for changes\nnpm run dev\n# OR with debug logs\nDEBUG=mockbin npm run dev\n```\n\n## Running with Docker Compose\n\n```shell\ndocker compose up\n```\n\n## Documentation\n\n### API Docs\n\nRead the full API documentation, please review the [API Docs](https://github.com/Kong/mockbin/tree/master/docs).\n\n## Releasing\n\nRun the following command and push the newly created commit into your PR.\nThis will bump commit and tag, you will need to push this to the remote, which trigger the release action upon merging the PR.\n\n```sh\nnpm version patch\ngit push origin tag \u003ctag_name\u003e\n```\n\n### Software Bill of materials\n\nKong Insomnia Mockbin produces SBOMs for the below categories:\n\n- For docker container images\n- For source code repository\n\nThe SBOMs are available to download at:\n\n- Github Release / Tag Assets\n- Github workflow assets for other workflow runs\n\n### Verify a container image signature\n\nDocker container images are now signed using cosign with signatures published to a [Github Container registry](https://ghcr.io) with `insomnia-mockbin` repository.\n\nSteps to verify signatures for signed Kong Insomnia Mockbin Docker container images in two different ways:\n\nA minimal example, used to verify an image without leveraging any annotations. For the minimal example, you only need Docker details, a GitHub repo name, and a GitHub workflow filename.\n\n```code\ncosign verify \\\n  ghcr.io/kong/insomnia-mockbin:\u003ctag\u003e@sha256:\u003cdigest\u003e \\\n  --certificate-oidc-issuer='https://token.actions.githubusercontent.com' \\\n  --certificate-identity-regexp='https://github.com/Kong/insomnia-mockbin/.github/workflows/release.yaml'\n```\n\nA complete example, leveraging optional annotations for increased trust. For the complete example, you need the same details as the minimal example, as well as any of the optional annotations you wish to verify:\n\n```code\ncosign verify \\\n  ghcr.io/kong/insomnia-mockbin:\u003ctag\u003e@sha256:\u003cdigest\u003e \\\n  --certificate-oidc-issuer='https://token.actions.githubusercontent.com' \\\n  --certificate-identity-regexp='https://github.com/Kong/insomnia-mockbin/.github/workflows/release.yaml' \\\n  -a repo='Kong/insomnia-mockbin' \\\n  -a workflow='Package \u0026 Release'\n```\n\n### Verify a container image provenance\n\nKong Insomnia Mockbin produces build provenance for docker container images for `Github tags`, which can be verified using cosign / slsa-verifier with attestations published to a [Github Container registry](https://ghcr.io) with `insomnia-mockbin` repository.\n\nSteps to verify provenance for signed Kong Insomnia Mockbin Docker container images:\n\n1. Fetch the image `\u003cmanifest_digest\u003e` using regctl:\n\n    ```code\n    regctl image digest ghcr.io/kong/insomnia-mockbin:\u003ctag\u003e\n    ```\n\n2. A minimal example, used to verify an image without leveraging any annotations. For the minimal example, you only need Docker Image manifest, a GitHub repo name.\n\n    ```code\n    cosign verify-attestation \\\n      ghcr.io/kong/insomnia-mockbin:\u003ctag\u003e@sha256:\u003cmanifest_digest\u003e \\\n      --type='slsaprovenance' \\\n      --certificate-oidc-issuer='https://token.actions.githubusercontent.com' \\\n      --certificate-identity-regexp='^https://github.com/slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@refs/tags/v[0-9]+.[0-9]+.[0-9]+$'\n    ```\n\n    ```code\n    slsa-verifier verify-image \\\n      ghcr.io/kong/insomnia-mockbin:\u003ctag\u003e@sha256:\u003cmanifest_digest\u003e \\\n      --print-provenance \\\n      --source-uri 'github.com/Kong/insomnia-mockbin'\n    ```\n\n3. A complete example, leveraging optional annotations for increased trust. For the complete example, you need the same details as the minimal example, as well as any of the optional annotations you wish to verify:\n\n    ```code\n    cosign verify-attestation \\\n      ghcr.io/kong/insomnia-mockbin:\u003ctag\u003e@sha256:\u003cmanifest_digest\u003e \\\n      --type='slsaprovenance' \\\n      --certificate-oidc-issuer='https://token.actions.githubusercontent.com' \\\n      --certificate-identity-regexp='^https://github.com/slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@refs/tags/v[0-9]+.[0-9]+.[0-9]+$' \\\n      --certificate-github-workflow-repository='Kong/insomnia-mockbin' \\\n      --certificate-github-workflow-name='Package \u0026 Release'\n    ```\n\n    ```code\n    slsa-verifier verify-image \\\n      ghcr.io/kong/insomnia-mockbin:\u003ctag\u003e@sha256:\u003cmanifest_digest\u003e \\\n      --print-provenance \\\n      --source-uri 'github.com/Kong/insomnia-mockbin' \\\n      --source-tag '\u003ctag\u003e'\n    ```\n\n## Bugs and feature requests\n\nHave a bug or a feature request? Please first read the [issue guidelines](CONTRIBUTING.md#using-the-issue-tracker) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](/issues).\n\n## Contributing\n\nPlease read through our [contributing guidelines](CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.\n\nMore over, if your pull request contains JavaScript patches or features, you must include relevant unit tests.\n\nEditor preferences are available in the [editor config](.editorconfig) for easy use in common text editors. Read more and download plugins at \u003chttp://editorconfig.org\u003e.\n\n## License\n\n[Enterprise](LICENSE) \u0026copy; [Kong](https://www.konghq.com)\n\n[license-url]: https://github.com/Kong/mockbin/blob/master/LICENSE\n\n[npm-license]: https://img.shields.io/npm/l/mockbin.svg?style=flat-square\n[npm-version]: https://img.shields.io/npm/v/mockbin.svg?style=flat-square\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkong%2Finsomnia-mockbin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkong%2Finsomnia-mockbin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkong%2Finsomnia-mockbin/lists"}