18 Commits

Author SHA1 Message Date
430cef51e6 Merge branch 'develop' into dist/risotto/risotto-2.8.0/develop 2021-08-28 07:37:42 +02:00
99bd9b4fb5 regen certificate in lemur 2021-08-28 07:37:37 +02:00
3bdd357782 Merge branch 'develop' into dist/risotto/risotto-2.8.0/develop 2021-05-22 18:25:49 +02:00
e086e08d9a fix 2021-05-22 18:25:41 +02:00
6b0e72ac5b fix 2021-05-22 18:24:51 +02:00
c6c4526989 Merge branch 'develop' into dist/risotto/risotto-2.8.0/develop 2021-05-22 16:38:53 +02:00
2eb256a760 better lemur integration 2021-05-22 16:38:47 +02:00
da0bd64b16 installation du timer 2021-05-20 18:53:43 +02:00
b67ab90de6 Merge branch 'develop' into dist/risotto/risotto-2.8.0/develop 2021-05-08 12:22:30 +02:00
ba59a8aaeb mise à jour de pyjwt 2021-05-08 12:22:18 +02:00
40ea7d186b Merge branch 'develop' into dist/risotto/risotto-2.8.0/develop 2020-11-14 17:48:58 +01:00
3d0eadd954 add type 2020-11-14 17:48:49 +01:00
50f6890c3f Merge branch 'develop' into dist/risotto/risotto-2.8.0/develop 2020-11-14 10:39:14 +01:00
fc97ee1c63 update configuration 2020-11-14 10:27:57 +01:00
1304947542 update debian packaging 2020-11-14 09:59:22 +01:00
10df7f69cf Merge branch 'develop' into dist/risotto/risotto-2.8.0/develop 2020-11-09 07:48:49 +01:00
3b15634a55 add lemur service 2020-11-09 07:45:00 +01:00
356f2723f1 debian 2020-10-21 11:57:15 +02:00
15 changed files with 122 additions and 13 deletions

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
12

19
debian/control vendored Normal file
View File

@ -0,0 +1,19 @@
Source: eole-lemur
Section: admin
Priority: extra
Maintainer: Cadoles <contact@cadoles.com>
Build-depends: debhelper (>=11)
Standards-Version: 3.9.4
Homepage: https://forge.cadoles.com/Infra/lemur
Package: eole-lemur
Architecture: any
Depends: ${misc:Depends},
lemur,
lemur-static,
eole-postgresql,
# for PIP
python3-pip,
gcc,
python3-dev
Description: Lemur - eolisation

10
debian/copyright vendored Normal file
View File

@ -0,0 +1,10 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: lemur
Upstream-Contact: Cadoles <contact@cadoles.com>
Source: https://forge.cadoles.com/Infra/lemur
Files: *
Copyright: Lemur
License: Apache-2.0 License
License: Apache-2.0 License

7
debian/eole-lemur.install vendored Normal file
View File

@ -0,0 +1,7 @@
dicos usr/share/eole/creole/
tmpl/* usr/share/eole/creole/distrib/
posttemplate/* usr/share/eole/posttemplate/
funcs/* usr/share/creole/funcs
db/* usr/share/eole/db/lemur/gen/
lemur_cron.timer lib/systemd/system
lemur_cron.service lib/systemd/system

12
debian/eole-lemur.postinst vendored Normal file
View File

@ -0,0 +1,12 @@
#!/bin/sh
set -e
if [ "$1" = configure ]; then
# Make sure the administrative user exists
if ! getent passwd lemur > /dev/null; then
adduser --system --home /usr/share/lemur --no-create-home --group --gecos "User for lemur" lemur --quiet
fi
fi
exit 0

1
debian/lemur.service vendored Symbolic link
View File

@ -0,0 +1 @@
../lemur.service

11
debian/rules vendored Normal file
View File

@ -0,0 +1,11 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
%:
dh $@
override_dh_installsystemd:
dh_installsystemd --name=lemur --no-enable --no-start --no-stop-on-upgrade

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (quilt)

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<creole>
<files>
<!--service>lemur</service-->
<file name='/etc/lemur/lemur.conf.py' mkdir='True'/>
<file name='/etc/eole/eole-db.d/lemur.yml'/>
<file name='/etc/nginx/web.d/lemur.conf' source='nginx-lemur.conf'/>
<service>lemur</service>
<file name='/etc/lemur/lemur.conf.py' mkdir='True'/>
<file name='/etc/eole/eole-db.d/lemur.yml'/>
<file name='/etc/nginx/web.d/lemur.conf' source='nginx-lemur.conf'/>
</files>
<variables>
<family name='lemur'>
@ -18,6 +18,18 @@
<value>lemur</value>
</variable>
<variable name='lemur_admin_password' type='password' description="Mot de passe de l'utilisateur admin de Lemur" auto_save="True"/>
<variable name='lemur_admin_email' type='mail' description="Adresse courriel d'administration de Lemur" mandatory="True"/>
<variable name='lemur_default_country' type='string' description="" mandatory="True">
<value>FR</value>
</variable>
<variable name='lemur_default_state' type='string' description="" mandatory="True">
<value>Bourgogne</value>
</variable>
<variable name='lemur_default_location' type='string' description="" mandatory="True">
<value>Dijon</value>
</variable>
<variable name='lemur_default_organization' type='string' description="" mandatory="True"/>
<variable name='lemur_default_organization_unit' type='string' description="" mandatory="True"/>
</family>
</variables>
<constraints>

View File

@ -3,7 +3,7 @@ Description=Lemur
After=postgresql.service
[Service]
ExecStart=/usr/bin/lemur start -b 127.0.0.1:8002 -c /etc/lemur/lemur.conf.py
ExecStart=/usr/bin/lemur -c /etc/lemur/lemur.conf.py start -b 127.0.0.1:8002
User=lemur
Group=lemur

12
lemur_cron.service Normal file
View File

@ -0,0 +1,12 @@
[Unit]
Description=Lemur
After=lemur.service
[Service]
Environment="LEMUR_CONF=/etc/lemur/lemur.conf.py"
ExecStart=/usr/bin/lemur certificate reissue --commit
User=lemur
Group=lemur
[Install]
WantedBy=basic.target

9
lemur_cron.timer Normal file
View File

@ -0,0 +1,9 @@
[Unit]
Description=Crontab for Lemur
[Timer]
OnCalendar=daily
Unit=lemur_cron.service
[Install]
WantedBy=timers.target

View File

@ -3,7 +3,7 @@
set -e
# install unrelease python modules
pip3 install alembic-autogenerate-enums==0.0.2 asyncpool==1.0 certsrv==2.1.1 cryptography==3.1.1 dnspython3==1.15.0 dyn==1.8.1 flask-replicated==1.4 javaobj-py3==0.4.0.1 jsonlines==1.2.0 logmatic-python==0.1.7 marshmallow==2.20.4 pycryptodomex==3.9.7 pyjks==20.0.0 raven[flask]==6.10.0 twofish==0.3.0
pip3 install alembic-autogenerate-enums==0.0.2 asyncpool==1.0 certsrv==2.1.1 cryptography==3.1.1 dnspython3==1.15.0 dyn==1.8.1 flask-replicated==1.4 javaobj-py3==0.4.0.1 jsonlines==1.2.0 logmatic-python==0.1.7 marshmallow==2.20.4 pycryptodomex==3.9.7 pyjks==20.0.0 raven[flask]==6.10.0 twofish==0.3.0 pyjwt==2.1.0
mkdir -p /var/log/lemur/
chown lemur: /var/log/lemur/
@ -12,8 +12,12 @@ chown lemur: /var/log/lemur/
chmod 640 /etc/lemur/*
chgrp lemur /etc/lemur/*
systemctl start postgresql.service
psql -Upostgres -c "grant all on all tables in schema public to lemur" lemur
psql -Upostgres -c "grant all on all sequences in schema public to lemur" lemur
psql -Upostgres -c "grant all on all functions in schema public to lemur" lemur
su - lemur -s /bin/bash -c "lemur --config=/etc/lemur/lemur.conf.py init --password $(CreoleGet lemur_admin_password)"
systemctl stop postgresql.service
rm -f *.log
systemctl enable --now lemur_cron.timer
exit 0

View File

@ -24,16 +24,21 @@ LEMUR_ALLOWED_DOMAINS = []
# Mail Server
LEMUR_EMAIL = ''
LEMUR_EMAIL = '%%lemur_admin_email'
LEMUR_SECURITY_TEAM_EMAIL = []
LEMUR_EMAIL_SENDER = 'smtp'
# Certificate Defaults
LEMUR_DEFAULT_COUNTRY = ''
LEMUR_DEFAULT_STATE = ''
LEMUR_DEFAULT_LOCATION = ''
LEMUR_DEFAULT_ORGANIZATION = ''
LEMUR_DEFAULT_ORGANIZATIONAL_UNIT = ''
LEMUR_DEFAULT_COUNTRY = '%%lemur_default_country'
LEMUR_DEFAULT_STATE = '%%lemur_default_state'
LEMUR_DEFAULT_LOCATION = '%%lemur_default_location'
LEMUR_DEFAULT_ORGANIZATION = '%%lemur_default_organization'
LEMUR_DEFAULT_ORGANIZATIONAL_UNIT = '%%lemur_default_organization_unit'
# Default issuer
LEMUR_DEFAULT_ISSUER_PLUGIN = 'cryptography-issuer'
# Authentication Providers
ACTIVE_PROVIDERS = []
@ -45,6 +50,7 @@ METRIC_PROVIDERS = []
LOG_LEVEL = "DEBUG"
LOG_FILE = "/var/log/lemur/lemur.log"
LOG_UPGRADE_FILE = '/var/log/lemur/db_upgrade.log'
# Database

View File

@ -16,3 +16,7 @@ sqlscripts:
- /usr/share/eole/db/lemur/gen/lemur.sql
pwd_files:
- {'file': '/etc/lemur/lemur.conf.py', 'pattern': "SQLALCHEMY_DATABASE_PASSWORD = '"}
%set %%var = %%getVar('risotto_main_dbname', None)
%if not %%is_empty(%%var)
- {'file': '/etc/risotto/risotto.conf', 'pattern': "LEMUR_DB_PASSWORD='"}
%end if