{"id":22511628,"url":"https://github.com/thibauult/tee-mock-server","last_synced_at":"2026-02-13T19:31:59.418Z","repository":{"id":265863699,"uuid":"896106067","full_name":"thibauult/tee-mock-server","owner":"thibauult","description":"A mock server written in Go that generates signed JWT tokens for simulating Google Cloud Confidential Space authentication","archived":false,"fork":false,"pushed_at":"2024-12-05T18:57:00.000Z","size":23,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-19T20:03:24.157Z","etag":null,"topics":["attestation-service","confidential-computing","google-cloud","google-cloud-platform","mock-server","tee","trusted-execution-environment"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thibauult.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}},"created_at":"2024-11-29T14:57:48.000Z","updated_at":"2025-01-17T16:58:23.000Z","dependencies_parsed_at":"2025-03-28T00:45:53.464Z","dependency_job_id":"2741e199-b5d6-40b5-9db4-93e84c904e23","html_url":"https://github.com/thibauult/tee-mock-server","commit_stats":null,"previous_names":["thibauult/tee-mock-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thibauult/tee-mock-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thibauult%2Ftee-mock-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thibauult%2Ftee-mock-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thibauult%2Ftee-mock-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thibauult%2Ftee-mock-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thibauult","download_url":"https://codeload.github.com/thibauult/tee-mock-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thibauult%2Ftee-mock-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29415581,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["attestation-service","confidential-computing","google-cloud","google-cloud-platform","mock-server","tee","trusted-execution-environment"],"created_at":"2024-12-07T02:13:33.960Z","updated_at":"2026-02-13T19:31:59.390Z","avatar_url":"https://github.com/thibauult.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca name=\"readme-top\"\u003e\u003c/a\u003e\n\u003cp align=\"center\"\u003e\n        \u003ca href=\"https://github.com/thibauult/tee-mock-server/graphs/contributors\"\u003e\u003cimg src=\"https://img.shields.io/github/contributors/thibauult/tee-mock-server.svg?style=for-the-badge\" alt=\"Contributors\"\u003e\u003c/a\u003e\n        \u003ca href=\"https://github.com/thibauult/tee-mock-server/network/members\"\u003e\u003cimg src=\"https://img.shields.io/github/forks/thibauult/tee-mock-server.svg?style=for-the-badge\" alt=\"Forks\"\u003e\u003c/a\u003e\n        \u003ca href=\"https://github.com/thibauult/tee-mock-server/stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/thibauult/tee-mock-server.svg?style=for-the-badge\" alt=\"Stargazers\"\u003e\u003c/a\u003e\n        \u003ca href=\"https://github.com/thibauult/tee-mock-server/issues\"\u003e\u003cimg src=\"https://img.shields.io/github/issues/thibauult/tee-mock-server.svg?style=for-the-badge\" alt=\"Issues\"\u003e\u003c/a\u003e\u003c/p\u003e\u003cbr/\u003e\n\u003cdiv align=\"center\"\u003e\n\n# TEE Mock Server\n\nA mock server written in Go that generates signed JWT tokens for simulating Google Cloud Confidential Space authentication.\n\n\u003ch4\u003e\n    \u003ca href=\"#about-the-project\"\u003eAbout the Project\u003c/a\u003e • \u003ca href=\"#features\"\u003eFeatures\u003c/a\u003e • \u003ca href=\"#-setup\"\u003e️Setup\u003c/a\u003e • \u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\n\u003c/h4\u003e\n\u003c/div\u003e\n\n## About the Project\n\nThe `tee-mock-server` is a Golang-based project designed to simulate a server that generates JWT tokens, \nspecifically tailored for Google Cloud's Confidential Space. \nIt listens on a Unix domain socket and responds with a newly signed JWT that includes custom claims related \nto [Confidential Space](https://cloud.google.com/confidential-computing/confidential-space/docs/reference/token-claims). \n\nThe server uses an RSA private key to sign the token and handles graceful shutdown with automatic cleanup of \nthe socket file on termination. \n\nThis mock server is useful for testing and simulating token-based authentication workflows in Confidential Space environments.\n\n## Features\n\n1. **JWT Token Generation**: The server generates signed JWT tokens using a predefined RSA private key, including custom claims related to Google Cloud Confidential Space.\n2. **Unix Domain Socket**: It listens for incoming requests on a Unix domain socket, providing a simple and efficient way to interact with the server, with automatic cleanup of the socket file upon termination.\n\n## ️Setup\n\n### Prerequisites\nBefore starting the mock server, you must make sure that the `/run/container_launcher` folder exists and you have the \nright to write in it: \n```shell\nsudo mkdir /run/container_launcher\nsudo chmod -R 777 /run/container_launcher \n```\n\n### Installation\nTo install this project using Docker, you can simply run the following command:\n```shell\ndocker compose up\n```\n\n### Usage\nYou can easily generate a new token using the following cURL command: \n```shell\nsudo curl -s -N --unix-socket /run/container_launcher/teeserver.sock --data '{ \"audience\": \"foobar\", \"token_type\": \"PKI\"  }' http://localhost/v1/token\n```\n\n## Configuration\nThe TEE Mock Server allows some level of configuration so that the token it generates can vary depending on your needs. \nHere's a list of the different environment variables that can be set when starting the server: \n\n| Name                              | Default                                       | Description                                                                               |\n|-----------------------------------|-----------------------------------------------|-------------------------------------------------------------------------------------------|\n| `TEE_GOOGLE_SERVICE_ACCOUNT`      | tee-mock-server@localhost.gserviceaccount.com | The GCP SA that is set in the \"google_service_accounts\" \u003cbr\u003eclaims of the generated token |\n| `TEE_TOKEN_EXPIRATION_IN_MINUTES` | 5                                             | The token expiration time in minutes                                                      |\n\n## License\n[![GitHub License file](https://img.shields.io/github/license/thibauult/tee-mock-server)](https://github.com/thibauult/tee-mock-server/blob/main/LICENSE)\n\nThis project is distributed under the [Apache License 2.0](http://www.apache.org/licenses/),\nmaking it open and free for anyone to use and contribute to.\nSee the [license](./LICENSE) file for detailed terms.\n\n\u003cp align=\"right\"\u003e\u003ca href=\"#readme-top\"\u003e(Back to top)\u003c/a\u003e\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthibauult%2Ftee-mock-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthibauult%2Ftee-mock-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthibauult%2Ftee-mock-server/lists"}