Hi. I'm praetorian Cornelius ⚔️. My main task is to protect the Roman emperors 🤴, but in my free time I also like to protect software companies with my shield 🛡.
Praetorian is an information security system providing protection across all major areas of software companies.
Important aspects of the system: ...
We use poetry to manage our dependencies. Use poetry install
to create new environment
and install all required dependencies.
- Run command for making roles :
python manage.py sync_roles
- Seed fixtures to the database:
python manage.py loaddata api_keys languages users devices remotes services projects users_projects_devices
- Run command for making permissions:
python manage.py sync_perms
- Loading specific database table content into json:
python manage.py dumpdata core.ApiKey > apps/core/fixtures/api_keys.json
- LDAP:
apps.api.auth.ldap_backend.LDAPBackend
- TOKEN:
apps.api.auth.token_backend.TokenBackend
{
"BIND_DN": "",
"BASE_URL": "",
"GROUP_TYPE": "GroupOfNamesType",
"SERVER_URI": "",
"USER_SEARCH": {
"scope": 2,
"base_dn": "",
"filterstr": "mail=%(user)s"
},
"GROUP_SEARCH": {
"scope": 2,
"base_dn": "",
"filterstr": "(objectClass=group)"
},
"BIND_PASSWORD": "",
"USER_ATTR_MAP": {
"name": "givenName",
"email": "mail",
"phone": "telephoneNumber",
"surname": "sn",
"username": "sAMAccountName",
"is_active": "enabled"
},
"USER_LOGIN_ATTR": "userPrincipalName",
"AUTH_SOURCE_LDAP_NAME": ""
}
docker network ls
docker network inspect praetorian
ping db
docker-compose exec web python -c "import socket; s = socket.socket(socket.AF_INET, socket.SOCK_STREAM); s.connect(('db', 5432)); print('Successfully connected'); s.close()"
open container using bash
docker-compose exec <container_name> bash
start python shell in container
docker-compose exec web python manage.py shell
then use python
from apps.core.models import User
print(User.objects.all())
Developed with 💙 and ☕️ by Adam Žúrek, Erik Belák with the support of BACKBONE s.r.o., 2024 (C)