Skip to content

Commit

Permalink
add config
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavier D. Johnson committed May 11, 2018
1 parent 419ee7e commit 42c108e
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ _testmain.go
*.test
dist
cryptojs_decrypt.js
sample_config.json
config.json
cryptexlyd_exec
*.idea
File renamed without changes.
Binary file added cryptexlyd/cryptexlyd_exec
Binary file not shown.
2 changes: 1 addition & 1 deletion cryptexlyd/middlewares/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
package middlewares

import (
"github.com/dgrijalva/jwt-go"
"github.com/detroitcybersec/cryptexly/cryptexlyd/config"
"github.com/detroitcybersec/cryptexly/cryptexlyd/events"
"github.com/detroitcybersec/cryptexly/cryptexlyd/log"
"github.com/detroitcybersec/cryptexly/cryptexlyd/utils"
"github.com/dgrijalva/jwt-go"
"github.com/gin-gonic/gin"
"regexp"
"strings"
Expand Down
41 changes: 41 additions & 0 deletions sample_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"address": "0.0.0.0",
"port": 8443,
"secret": "",
"certificate": "~/cryptexlyd-certificate.pem",
"key": "~/cryptexlyd-key.pem",
"username": "cryptexly",
"password": "$2a$10$RuOcSEwPNNFlA/lxjpRY3.3J0tR0LG/FyfG/IXolgdDxPh7.urgGe",
"database": "~/cryptexlydb",
"token_duration": 60,
"compression": true,
"scheduler": {
"enabled": true,
"period": 10,
"reports": {
"enabled": false,
"rate_limit": 60,
"filter": [ "login_ok", "login_ko", "token_ko", "update", "record_expired" ],
"to": "youremail@gmail.com",
"smtp":{
"address": "smtp.gmail.com",
"port": 587,
"username": "youremail@gmail.com",
"password": "your smtp password"
},
"pgp": {
"enabled": true,
"keys":{
"private": "~/server.private.key.asc",
"public": "~/my.public.key.asc"
}
}
}
},
"backups": {
"enabled": false,
"period": 1800,
"folder": "/some/backup/path/",
"run": "scp arc-backup.tar user@backup-server:/media/arc_backup/"
}
}

0 comments on commit 42c108e

Please sign in to comment.