https://github.com/aau-network-security/haaukins-store
New haaukins component responsible to store data into the database
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.9%) to scientific vocabulary
Keywords
Repository
New haaukins component responsible to store data into the database
Basic Info
- Host: GitHub
- Owner: aau-network-security
- License: gpl-3.0
- Language: Go
- Default Branch: master
- Homepage: https://docs.haaukins.com
- Size: 372 KB
Statistics
- Stars: 0
- Watchers: 2
- Forks: 3
- Open Issues: 9
- Releases: 15
Topics
Metadata Files
README.md
haaukins-store
Haaukins store is internally used for managing information about events and teams which are exists in Hauukins. With gRPC communication, Haaukins is able to get/post information into haaukins store, although we have store folder in Haaukins repo, we are retrieving and updating information through Haaukins store. The one which is exists on Haaukins is just used for caching purposes. However, we have some local data which consists of configuration files which are fetched and updated directly from host for Haaukins. They are namely;
config.yml: This is main file to run Haaukins daemon, it specifies all necesseary information regarding to private registries, users, frontends and exercises file location.exercises.yml: This file includes information about existing challenges in Haaukins environment. Since it is too strucctured, it was not ok to combine into Haaukins store, however we are thinking to replace it.frontends.yml: Provides overall information about frontend which is used in Haaukins, frontends are instances in this context, likeKali,Parrot,Ubuntu.users.yml: Have information about users who have access to administrator side of Haaukins.
Production usage
Docker image of haaukins store could be used in any docker compose file if environment variables provided correctly. When using in production, you can specify image address instead of building it fromm source code.
Haaukins store image with recent changes will be available at docker hub, with released tag.
No need to clone the repository, make sure that .env and config.yml files are set correctly.
Steps to run it in production:
- Make sure you have configured
.envandconfig.ymlaccording to the instructions in configuration section. curl -o docker-compose.yml https://raw.githubusercontent.com/aau-network-security/haaukins-store/master/docker-compose.yml- Change
build: .intoimage: aaunetworksecurity/haaukins-store:<release-tag> - If everything works as expected, you have recent changes in your server.
Configuration
Haaukins store uses two crucial configuration files which are namely, .env for docker-compose.yml and config.yml for retrieving some information in gRPC server side.
Specifications and more information about them given below.
Environment File
Here is the information which should be included into .env file:
```text CERTSPATH=/scratch/configs/certs CONFIGPATH=/scratch/configs/config.yml POSTGRES_DB=exampledb
POSTGRESHOSTAUTH_METHOD="trust"
POSTGRES_PASSWORD=exammplepassword
```
CERTS_PATH: Should be provided if TLS is enabled and certificates should be valid for provided host in config.yml file.CONFIG_PATH: Place to yourconfig.ymlfile which is mount indocker-compose.ymlfilePOSTGRES_DB: This is the database information that you have provided in config.yml file.POSTGRES_HOST_AUTH_METHOD: This parameter could be used for local developments however it is NOT recommended, because it eliminates authentication (no password for postgres connection)POSTGRES_PASSWORD: Recommended way of running haaukins store, should be same with the one in config.yml file.POSTGRES_USER: Could be useful to have, should be same withdb.userparameter in config.yml file
Note that there could be cases where password is not required, in those cases POSTGRES_HOST_AUTH_METHOD could be used. However when you are using it, you do NOT need to provide POSTGRES_PASSWORD.
Configuration file
Example configuration file to run haaukins store without any error.
yaml
host: localhost:50051
auth-key: development-auth-key
signin-key: development-signin-key
db:
host: postgres-db
user: postgres
pass: postgres
db_name: dummydb
db_port: 5432
tls:
enabled: false
certfile: ./tests/certs/localhost_50051.crt
certkey: ./tests/certs/localhost_50051.key
cafile: ./tests/
host: It is gRPC server host address which means that the server, that will be run through docker compose, will run on that address.auth-key: This is authentication key between gRPC server and client, which means that when haaukins store client is used,auth-keyshould match between server and client.signin-key: Similar rule applies asauth-key, signing key should also match to be able to use gRPC calls.db.host: This is the host name under db configuration, since haaukins store is using docker compose and we are running server with docker compose, it is ok to use service name as database host.db.user: As name declares, it is database user.db_name: Database name, which should be same with the one in your.envdb_port: It is the port to lookup by server which will be build duringdocker-compose run -dtls: This consists of some information regarding to your certificates paths, iftls.enabledis true which means that you are preferring to use secure communication between server and client.
Docker compose
Docker compose file is defining how services will communicate and how they will be called when they run. The defined services which are defined in docker-compose.yml file might change during time.
However, the changes will be written here, currently it uses port 5432 for postgres and port 50051 for gRPC server communication.
Within docker-compose.yml, pgadmin4 service is disabled because we decided to use our own tool instead of that one. It could be enabled if we desire at some point.
Run
Haaukins store could be run by ;
docker-compose run -d: will build and run images which are defined indocker-compose.ymlfile IF this is your first time to rundocker-compose.ymlfile.
Could be re-build and run by ;
docker-compose run -d --build: If you performed some changes in source code, you need to add--buildflag todocker-compose run -d.
Could be removed by;
docker-compose down --remove-orphans
Owner
- Name: Network Security
- Login: aau-network-security
- Kind: organization
- Email: cyber@es.aau.dk
- Location: Aalborg
- Website: http://es.aau.dk
- Repositories: 43
- Profile: https://github.com/aau-network-security
Network Security Group, Wireless Communication Systems at Aalborg University
GitHub Events
Total
Last Year
Issues and Pull Requests
Last synced: almost 3 years ago
All Time
- Total issues: 19
- Total pull requests: 53
- Average time to close issues: 2 months
- Average time to close pull requests: 9 days
- Total issue authors: 4
- Total pull request authors: 4
- Average comments per issue: 0.21
- Average comments per pull request: 0.32
- Merged pull requests: 47
- Bot issues: 0
- Bot pull requests: 2
Past Year
- Issues: 1
- Pull requests: 6
- Average time to close issues: 2 months
- Average time to close pull requests: 24 days
- Issue authors: 1
- Pull request authors: 2
- Average comments per issue: 1.0
- Average comments per pull request: 1.17
- Merged pull requests: 3
- Bot issues: 0
- Bot pull requests: 2
Top Authors
Issue Authors
- mrtrkmn (11)
- gianmarcomennecozzi (6)
- igibek (1)
- kdhageman (1)
Pull Request Authors
- mrtrkmn (44)
- gianmarcomennecozzi (5)
- Mikkelhost (2)
- dependabot[bot] (2)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- 116 dependencies
- github.com/golang-jwt/jwt/v4 v4.0.0
- github.com/golang/protobuf v1.5.2
- github.com/lib/pq v1.3.0
- golang.org/x/net v0.0.0-20210614182718-04defd469f4e
- golang.org/x/sys v0.0.0-20210616094352-59db8d763f22
- google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84
- google.golang.org/grpc v1.38.0
- google.golang.org/protobuf v1.26.0
- gopkg.in/yaml.v2 v2.3.0
- actions/checkout v3 composite
- actions/setup-python v3 composite
- actions/checkout v3 composite
- github/codeql-action/analyze v2 composite
- github/codeql-action/autobuild v2 composite
- github/codeql-action/init v2 composite
- actions/checkout v3 composite
- docker/build-push-action v3 composite
- ncipollo/release-action v1.10.0 composite
- actions/checkout v3 composite
- actions/setup-go v3 composite
- postgres latest docker
- gcr.io/distroless/base-debian10 latest build
- golang 1.16.5-buster build
- postgres alpine
- postgres alpine