ADD README.md
parent
0f5803d994
commit
b9b2c12b04
|
|
@ -0,0 +1,75 @@
|
|||
# PKI-MANAGER
|
||||
Permet de creer des CA subCA et de certificat client & server
|
||||
|
||||
**Pour le moment le code est en court de develloppement et ne DOIT PAS servir en production !!**
|
||||
|
||||
Langage du moteur GO
|
||||
|
||||
Fonctionalites non encore implementées:
|
||||
- Authentification
|
||||
- Chiffrement en base
|
||||
- Ajout swagger
|
||||
- Autre fonctions d'api
|
||||
- Amélioration GUI
|
||||
|
||||
|
||||
## API
|
||||
- POST /api/v1/cas/ --> Creation d'une CA
|
||||
- GET /api/v1/cas/ --> Liste mes CAs
|
||||
- GET /api/v1/cas/:id --> Récuperation d'une CA
|
||||
- PUT /api/v1/cas/:id --> Modification d'une CA
|
||||
- DELETE /api/v1/cas/:id --> Effacement d'une CA
|
||||
- GET /api/v1/cas/:id/download/cert --> Recuperation du fichier de certificat d'une CA (Format PEM)
|
||||
- GET /api/v1/cas/:id/download/key --> Recuperation du fichier de clé d'une CA (Format PEM)
|
||||
|
||||
Idem pour les SubCA en modifiant l'appel part /api/v1/subcas/
|
||||
|
||||
Idem pour les Ceritificats en modifiant l'appel par /api/v1/certificates/
|
||||
|
||||
Ajout pour les certificats:
|
||||
|
||||
- GET /api/v1/certificates/:id/download/p12 Récuperation du certificat et de sont issuer au format pkcs12
|
||||
|
||||
## Configuration
|
||||
Créer un fichier .env à la racine du projet contenant:
|
||||
```
|
||||
MONGO_INITDB_ROOT_USERNAME=<Nom du compte admin mongo>
|
||||
MONGO_INITDB_ROOT_PASSWORD=<Mot de passe du compte admin mongo>
|
||||
JWT_SECRET=mon-super-token-my-jwt-secret
|
||||
EXTERNAL_PORT=<port expose port l'acces a l'application exemple:8080"
|
||||
```
|
||||
|
||||
## Si besoin d'accéder à la base Mongodb:
|
||||
Ajouter un export de port dans le service mongodb
|
||||
```yaml
|
||||
services:
|
||||
mongodb:
|
||||
...
|
||||
ports:
|
||||
- "27017:27017"
|
||||
volumes:
|
||||
- mongodb_data:/data/db
|
||||
- ./scripts/init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
|
||||
...
|
||||
```
|
||||
|
||||
## Dev Web
|
||||
Pour l'instant les repetoire contenant le code lié au web est monté via volume.
|
||||
|
||||
Vous pouvez donc modifier dynamiquement ce contenu sans avoir a rebuild.
|
||||
|
||||
docker-compose.yml
|
||||
```yaml
|
||||
pki-api:
|
||||
...
|
||||
volumes:
|
||||
- ./internal/web/static:/app/internal/web/static
|
||||
- ./internal/web/templates:/app/internal/web/templates
|
||||
```
|
||||
|
||||
Pour locker le webcode, retirez ces montages
|
||||
|
||||
## Lancement:
|
||||
```
|
||||
docker compose up --build -d
|
||||
```
|
||||
|
|
@ -19,14 +19,14 @@ services:
|
|||
depends_on:
|
||||
- mongodb
|
||||
ports:
|
||||
- "8080:8080"
|
||||
- "${EXTERNAL_PORT}:8080"
|
||||
environment:
|
||||
MONGODB_URI: mongodb://${MONGO_INITDB_ROOT_USERNAME}:${MONGO_INITDB_ROOT_PASSWORD}@mongodb:27017/pki_db?authSource=admin
|
||||
JWT_SECRET: ${JWT_SECRET}
|
||||
volumes:
|
||||
- ./certs:/app/certs
|
||||
- ./internal/web/static:/app/internal/web/static
|
||||
- ./internal/web/templates:/app/internal/web/templates
|
||||
# - ./internal/web/static:/app/internal/web/static
|
||||
# - ./internal/web/templates:/app/internal/web/templates
|
||||
|
||||
volumes:
|
||||
mongodb_data:
|
||||
|
|
|
|||
Loading…
Reference in New Issue