Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rsatrio/softhsm2-rest
REST API for SoftHSM2
https://github.com/rsatrio/softhsm2-rest
Last synced: 10 days ago
JSON representation
REST API for SoftHSM2
- Host: GitHub
- URL: https://github.com/rsatrio/softhsm2-rest
- Owner: rsatrio
- License: mit
- Created: 2021-08-01T18:33:52.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-19T06:05:02.000Z (almost 3 years ago)
- Last Synced: 2024-04-25T07:02:29.723Z (7 months ago)
- Language: Java
- Size: 13.7 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SoftHSM2 REST API
A simple REST API for SoftHSM2. This project is build with dropwizard 2.x,Java 8, SoftHSM2, and Docker.
## Features
- REST Endpoint
- Swagger page to test the API
- Create RSA Key on Initialized Slot at SoftHSM2
- Signing Base64 data with Key stored in SoftHSM2. Signing Mechanism is using SHA256withRSA
- Retrieve RSA Public Key from HSM
- Dockerized## Build
- Run docker build
```shell
docker build -t softhsm-rest .
```
- Run the docker image from previous step:
```shell
docker run -p 9080:9080 softhsm-rest
```
- Take note of the Slot ID created and User PIN (check Dockerfile, it should be 1234567)- Go to the swagger page (http://localhost:9080/swagger), and test creating key in the SlotID (or just enter 0) created before. Use the /v1/softhsm/create-key endpoint
- If key successfully created, then try to sign Base64 data with that key. For convenience, you can use the swagger interface earlier. Use the /v1/softhsm/sign-data endpoint## Feedback
For feedback, please raise issues in the issue section of the repository. Periodically, I will update the example with more real-life use case example. Enjoy!!.