Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ufukbakan/kms-sim
https://github.com/ufukbakan/kms-sim
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ufukbakan/kms-sim
- Owner: ufukbakan
- Created: 2022-01-13T23:42:02.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-30T01:27:34.000Z (over 1 year ago)
- Last Synced: 2024-12-18T06:24:22.968Z (16 days ago)
- Language: JavaScript
- Size: 57.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# KMS-Sim
This is a dockerized, node.js fastify server application which simulates a key management service.## API:
- /buy/:product_id (payload credit card)
- /activate/:product_id/:key
- /key
- /listAll
- /extend/:key {payload credit card}
- /delete/:key
- /deleteAllA credit card payload appears similar to this in body:
```
{
"number": "1234567890123456",
"expirationDate": "08/28",
"CVC": 330
}
```Also all endpoints require a authentication token in the field "token" of HTTP Header
Sample tokens:
READ_ONLY (EXPIRED) # typical user
```
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiUkVBRF9PTkxZIiwiaWF0IjoxNjQxOTk3NjU0MjcxLCJleHAiOjE1NDczMDMyNTQuMjd9.MGwBchftGKjnwzs-SNfXfFF9DvmLmqO63K5NI9Wk34g
```READ_ONLY # typical user
```
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiUkVBRF9PTkxZIiwiaWF0IjoxNjQxOTk3NTAxMTQ1LCJleHAiOjE4MzEyOTk5MDEuMTQzfQ.WQtCl-u4hWOG2QBc8CUhH4iXjPVGxwtn3TYu8MVrWc4
```READ_WRITE (EXPIRED) # administrator
```
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiUkVBRF9XUklURSIsImlhdCI6MTY0MTk5NzY1NDI3MCwiZXhwIjoxNTQ3MzAzMjU0LjI3fQ.yITL2_Q6-kdpM6EbXbPRG0QhaPDxO4ANT7Dv0XW-Fqc
```READ_WRITE # administrator
```
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiUkVBRF9XUklURSIsImlhdCI6MTY0MTk5NzUwMTE0NSwiZXhwIjoxODMxMjk5OTAxLjE0M30.4ixLwkixIZOQFH1ZfScUKPFVdaoTumtD2SmYzolnAao
```