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.
See the codeNote: This repository is source visibile, but not open-source. Please check the LICENSE before using this software.
Insomnia Mockbin is maintained by Kong, who also maintains the open-source API Gateway Kong and Insomnia.
X-Forwarded-* headers for IP resolution)X-HTTP-Method-Override or through query string parameter: _methodbrew install redis
brew services start redis
Redis should be now running on localhost:6379 Mockbin will start without redis but you wont be able to set or get response bins.
git clone https://github.com/Kong/mockbin.git ./mockbin
cd mockbin
cp .env.sample .env
brew install fnm
fnm use
npm install
Note: nvm, n or volta can be used instead of fnm.
npm start
# OR watch for changes
npm run dev
# OR with debug logs
DEBUG=mockbin npm run dev
docker compose up
Run the following command and push the newly created commit into your PR. This will bump commit and tag, you will need to push this to the remote, which trigger the release action upon merging the PR.
npm version patch
git push origin tag <tag_name>
Read the full API documentation, please review the API Docs.
See https://developer.konghq.com/insomnia/mock-servers/ for the available options for deploying mockbin.
Kong Insomnia Mockbin produces SBOMs for the below categories:
The SBOMs are available to download at:
Docker container images are now signed using cosign with signatures published to a Github Container registry with insomnia-mockbin repository. Separate images are published for cloud hosted mocks (ghcr.io/kong/insomnia-mockbin-cloud) and self-hosted mocks (ghcr.io/kong/insomnia-mockbin-self-hosted). Modify the examples below if you need to verify the image for self-hosted mocks.
Steps to verify signatures for signed Kong Insomnia Mockbin Docker container images in two different ways:
A 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.
cosign verify \
ghcr.io/kong/insomnia-mockbin-cloud:<tag>@sha256:<digest> \
--certificate-oidc-issuer='https://token.actions.githubusercontent.com' \
--certificate-identity-regexp='https://github.com/Kong/insomnia-mockbin/.github/workflows/release.yaml'
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:
cosign verify \
ghcr.io/kong/insomnia-mockbin-cloud:<tag>@sha256:<digest> \
--certificate-oidc-issuer='https://token.actions.githubusercontent.com' \
--certificate-identity-regexp='https://github.com/Kong/insomnia-mockbin/.github/workflows/release.yaml' \
-a repo='Kong/insomnia-mockbin' \
-a workflow='Package & Release'
Kong 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 with insomnia-mockbin repository.
Steps to verify provenance for signed Kong Insomnia Mockbin Docker container images:
Fetch the image <manifest_digest> using regctl:
regctl image digest ghcr.io/kong/insomnia-mockbin-cloud:<tag>
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.
cosign verify-attestation \
ghcr.io/kong/insomnia-mockbin-cloud:<tag>@sha256:<manifest_digest> \
--type='slsaprovenance' \
--certificate-oidc-issuer='https://token.actions.githubusercontent.com' \
--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]+$'
slsa-verifier verify-image \
ghcr.io/kong/insomnia-mockbin-cloud:<tag>@sha256:<manifest_digest> \
--print-provenance \
--source-uri 'github.com/Kong/insomnia-mockbin'
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:
cosign verify-attestation \
ghcr.io/kong/insomnia-mockbin-cloud:<tag>@sha256:<manifest_digest> \
--type='slsaprovenance' \
--certificate-oidc-issuer='https://token.actions.githubusercontent.com' \
--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]+$' \
--certificate-github-workflow-repository='Kong/insomnia-mockbin' \
--certificate-github-workflow-name='Package & Release'
slsa-verifier verify-image \
ghcr.io/kong/insomnia-mockbin-cloud:<tag>@sha256:<manifest_digest> \
--print-provenance \
--source-uri 'github.com/Kong/insomnia-mockbin' \
--source-tag '<tag>'
Have a bug or a feature request? Please first read the issue guidelines and search for existing and closed issues. If your problem or idea is not addressed yet, please open a new issue.
Please read through our contributing guidelines. Included are directions for opening issues, coding standards, and notes on development.
More over, if your pull request contains JavaScript patches or features, you must include relevant unit tests.
Editor preferences are available in the editor config for easy use in common text editors. Read more and download plugins at http://editorconfig.org.
152 followers · starred Apr 2015
9,083 followers · starred Apr 2015
895 followers · starred Feb 2017
51 followers · starred May 2020
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.
See the codeNote: This repository is source visibile, but not open-source. Please check the LICENSE before using this software.
Insomnia Mockbin is maintained by Kong, who also maintains the open-source API Gateway Kong and Insomnia.
X-Forwarded-* headers for IP resolution)X-HTTP-Method-Override or through query string parameter: _methodbrew install redis
brew services start redis
Redis should be now running on localhost:6379 Mockbin will start without redis but you wont be able to set or get response bins.
git clone https://github.com/Kong/mockbin.git ./mockbin
cd mockbin
cp .env.sample .env
brew install fnm
fnm use
npm install
Note: nvm, n or volta can be used instead of fnm.
npm start
# OR watch for changes
npm run dev
# OR with debug logs
DEBUG=mockbin npm run dev
docker compose up
Run the following command and push the newly created commit into your PR. This will bump commit and tag, you will need to push this to the remote, which trigger the release action upon merging the PR.
npm version patch
git push origin tag <tag_name>
Read the full API documentation, please review the API Docs.
See https://developer.konghq.com/insomnia/mock-servers/ for the available options for deploying mockbin.
Kong Insomnia Mockbin produces SBOMs for the below categories:
The SBOMs are available to download at:
Docker container images are now signed using cosign with signatures published to a Github Container registry with insomnia-mockbin repository. Separate images are published for cloud hosted mocks (ghcr.io/kong/insomnia-mockbin-cloud) and self-hosted mocks (ghcr.io/kong/insomnia-mockbin-self-hosted). Modify the examples below if you need to verify the image for self-hosted mocks.
Steps to verify signatures for signed Kong Insomnia Mockbin Docker container images in two different ways:
A 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.
cosign verify \
ghcr.io/kong/insomnia-mockbin-cloud:<tag>@sha256:<digest> \
--certificate-oidc-issuer='https://token.actions.githubusercontent.com' \
--certificate-identity-regexp='https://github.com/Kong/insomnia-mockbin/.github/workflows/release.yaml'
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:
cosign verify \
ghcr.io/kong/insomnia-mockbin-cloud:<tag>@sha256:<digest> \
--certificate-oidc-issuer='https://token.actions.githubusercontent.com' \
--certificate-identity-regexp='https://github.com/Kong/insomnia-mockbin/.github/workflows/release.yaml' \
-a repo='Kong/insomnia-mockbin' \
-a workflow='Package & Release'
Kong 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 with insomnia-mockbin repository.
Steps to verify provenance for signed Kong Insomnia Mockbin Docker container images:
Fetch the image <manifest_digest> using regctl:
regctl image digest ghcr.io/kong/insomnia-mockbin-cloud:<tag>
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.
cosign verify-attestation \
ghcr.io/kong/insomnia-mockbin-cloud:<tag>@sha256:<manifest_digest> \
--type='slsaprovenance' \
--certificate-oidc-issuer='https://token.actions.githubusercontent.com' \
--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]+$'
slsa-verifier verify-image \
ghcr.io/kong/insomnia-mockbin-cloud:<tag>@sha256:<manifest_digest> \
--print-provenance \
--source-uri 'github.com/Kong/insomnia-mockbin'
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:
cosign verify-attestation \
ghcr.io/kong/insomnia-mockbin-cloud:<tag>@sha256:<manifest_digest> \
--type='slsaprovenance' \
--certificate-oidc-issuer='https://token.actions.githubusercontent.com' \
--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]+$' \
--certificate-github-workflow-repository='Kong/insomnia-mockbin' \
--certificate-github-workflow-name='Package & Release'
slsa-verifier verify-image \
ghcr.io/kong/insomnia-mockbin-cloud:<tag>@sha256:<manifest_digest> \
--print-provenance \
--source-uri 'github.com/Kong/insomnia-mockbin' \
--source-tag '<tag>'
Have a bug or a feature request? Please first read the issue guidelines and search for existing and closed issues. If your problem or idea is not addressed yet, please open a new issue.
Please read through our contributing guidelines. Included are directions for opening issues, coding standards, and notes on development.
More over, if your pull request contains JavaScript patches or features, you must include relevant unit tests.
Editor preferences are available in the editor config for easy use in common text editors. Read more and download plugins at http://editorconfig.org.
152 followers · starred Apr 2015
9,083 followers · starred Apr 2015
895 followers · starred Feb 2017
51 followers · starred May 2020