azure-sdk-tools/tools/keyvault-mock-attestation
dependabot[bot] ee5779f699
Bump semver from 7.3.8 to 7.5.3 in /tools/keyvault-mock-attestation (#6395)
Bumps [semver](https://github.com/npm/node-semver) from 7.3.8 to 7.5.3.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.3.8...v7.5.3)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-23 10:39:47 -07:00
..
.dockerignore
.gitignore
Dockerfile Fixed the security supply chain warnings for tools repo (#3275) 2022-05-05 10:56:26 -07:00
README.md
index.js [mock-attestation] - Update node-jose (#2959) 2022-03-31 13:26:58 -07:00
package-lock.json Bump semver from 7.3.8 to 7.5.3 in /tools/keyvault-mock-attestation (#6395) 2023-06-23 10:39:47 -07:00
package.json Bump node-jose from 2.1.0 to 2.2.0 in /tools/keyvault-mock-attestation (#5482) 2023-02-22 15:53:24 -08:00

README.md

Azure Key Vault Mock Attestation service

This folder contains the source code for the Azure Key Vault Mock Attestation service which is used to run the Secure Key Release live tests for Azure Key Vault.

Secure Key Release requires a signed attestation in order to release the key. In order to simluate the attestation we created this mock service that can generate a fake key for testing key release as well as provide endpoints for the Managed HSM to call out when verifying the attestation token.

Endpoints

  • GET /generate-test-token: called by the test itself, it returns a signed token that can be passed to the Managed HSM when releasing the key.
  • GET /.well-known/openid-configuration: the OIDC discovery document containing the jwks_uri as described in the OIDC spec. The service uses /keys as the jwks_uri.
  • GET /keys: The jwks_uri points to this endpoint, and is used to get the public key of the attestation service in order to verify the attestation token.

How to use the service

This service is published as a Docker container to the Azure SDK Tools Docker container registry and the image can be used to deploy the service to an Azure App Service or Azure Container Instance as needed.

Note: The service is not intended to be used in production, it is only used for testing.

Locally you can run the service by running the following command:

npm install
npm run start

To start an express app service locally using port 5000.