Skip to content

Commit f819dfb

Browse files
committed
Numerous fixes due to the comments
1 parent 2bbfe2c commit f819dfb

File tree

2 files changed

+43
-50
lines changed

2 files changed

+43
-50
lines changed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ While with Docker you should have rather something like:
272272
```sh
273273
POSTGRES_USER="hyperion"
274274
POSTGRES_PASSWORD=""
275+
# POSTGRES_HOST Should be set to the name of the postgres container
275276
POSTGRES_HOST="hyperion-db"
276277
POSTGRES_DB="hyperion"
277278
```
@@ -282,17 +283,17 @@ POSTGRES_DB="hyperion"
282283

283284
The `config.yaml` contains environment variables that are internal to the Python runtime _because_ they are only used in the Python code.
284285

285-
1. `ACCESS_TOKEN_SECRET_KEY`: You can generate your own if you want, or just change a couple characters, or leave it as it is.
286-
2. `RSA_PRIVATE_PEM_STRING`: You can generate your own if you want, or just change a couple characters, or leave it as it is.
287-
3. `SQLITE_DB`: **tells Hyperion whether to use SQLite or PostgreSQL**.
286+
1. `ACCESS_TOKEN_SECRET_KEY` and `RSA_PRIVATE_PEM_STRING`: An example of each is provided.
287+
You can generate your own if you want, or just change a couple characters in the examples, or deliberately leave it as it is.
288+
2. `SQLITE_DB`: **tells Hyperion whether to use SQLite or PostgreSQL**.
288289
- If you use **SQLite**: this field should be a (relative) filename, by default we named it `app.db`, you can change this name.
289290
Hyperion will create this file for you and use it as the database.
290291
Any PostgreSQL-related configuration will be ignored.
291292
- If you use **PostgreSQL**: empty this field.
292293
Hyperion will fallback to PostgreSQL settings.
293-
4. `USE_FACTORIES`: `True` by default, factories seed your database, if empty, with mocked data.
294+
3. `USE_FACTORIES`: `True` by default, factories seed your database, if empty, with mocked data.
294295
This is useful on SQLite to repopulate your new database after dropping the previous one, of to create automatically your own user with admin privileges (see `FACTORIES_DEMO_USERS` below).
295-
5. `FACTORIES_DEMO_USERS`: **Replace the first user's data with yours**.
296+
4. `FACTORIES_DEMO_USERS`: **Replace the first user's data with yours**.
296297
These future users will be created automatically when launching Hyperion with an empty database.
297298
Plus, your user will be there with your password and be admin out of the box.
298299

config.template.yaml

Lines changed: 37 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,40 @@
33
###############################################
44

55
# ACCESS_TOKEN_SECRET_KEY should contain a random string with enough entropy (at least 32 bytes long) to securely sign all access_tokens for OAuth and Openid connect
6-
# If you want to generate a 2048-bit long PEM certificate and save it in a file, the following command may be used:
7-
# openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out certificate.pem
8-
ACCESS_TOKEN_SECRET_KEY: YWZOHliiI53lJMJc5BI_WbGbA4GF2T7Wbt1airIhOXEa3c021c4-1c55-4182-b141-7778bcc8fac4
6+
ACCESS_TOKEN_SECRET_KEY: #YWZOHliiI53lJMJc5BI_WbGbA4GF2T7Wbt1airIhOXEa3c021c4-1c55-4182-b141-7778bcc8fac4
97

108
# RSA_PRIVATE_PEM_STRING should be a string containing the PEM certificate of a private RSA key. It will be used to sign id_tokens for Openid connect authentication
11-
# The example below was generated using a 2048-bit RSA key generator
9+
# The 2048-bit-long PEM certificate example below was generated using a 2048-bit RSA key generator online.
10+
# If you want to generate a PEM certificate and save in a file, the following openssl command may be used:
11+
# openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out certificate.pem
1212
RSA_PRIVATE_PEM_STRING: |
13-
-----BEGIN RSA PRIVATE KEY-----
14-
MIIEpQIBAAKCAQEA1tpj3TZDkJakp2RygsM392pQbcmNBOGFT8FlETcRG/JVFT7k
15-
iClJu+CVOJSVD0epfpYp93cYepfw74SezYnBCyuoLJ2yg5Qh4KlCrWmvwM7vhFIN
16-
x0xddIQi+Gm0T3dxGtv4Ga50TYX4SV4FE3ctJG9m3pyNF6POODp5tMJvShQWYTto
17-
W9qNhltZ8Z+14bq2INV/efpT47WuMT+VD/fa9/WwopAtgBcQOvq57fv5+DaPOIVR
18-
9BiP7F+pv+v6wQ373hI22QzCMsA4Whl+BmWFKcFoBDOBR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psuhnMerZCQ9rDWwbDF86RnyA
35-
0MuCr7/kxJQ6XQcY/GnTIydu7F5bOlM0gzqKcW2f6m4fUohczf+0N0QmbDsQAJOi
36-
1lwadgkCgYEA3tkCBJIPTQecfjWiLqSocS6SrwXU+r3Jw6kI3/IB6ban/nsFdHSb
37-
nADST7f2zZatN6XALwsLU7f2R09R39ub0AJPyfToxo7MngR1rvaUYooF3rLlaU32
38-
8DqGvGpLkZkwbtcDmcX1zQoHjUo7RvoShZoapr59ihfrkiiEsXOkuGw=
39-
-----END RSA PRIVATE KEY-----
13+
# -----BEGIN RSA PRIVATE KEY-----
14+
# MIIEpQIBAAKCAQEA1tpj3TZDkJakp2RygsM392pQbcmNBOGFT8FlETcRG/JVFT7k
15+
# iClJu+CVOJSVD0epfpYp93cYepfw74SezYnBCyuoLJ2yg5Qh4KlCrWmvwM7vhFIN
16+
# x0xddIQi+Gm0T3dxGtv4Ga50TYX4SV4FE3ctJG9m3pyNF6POODp5tMJvShQWYTto
17+
# W9qNhltZ8Z+14bq2INV/efpT47WuMT+VD/fa9/WwopAtgBcQOvq57fv5+DaPOIVR
18+
# 9BiP7F+pv+v6wQ373hI22QzCMsA4Whl+BmWFKcFoBDOBRjlW5VqhJWJkWZIRP0q+
19+
# VAZHk2xJK+0YFc9jmaC+ExMtuyHYK0RnQK/8LQIDAQABAoIBABxJ8v4sZ+cAvrs/
20+
# kYhAFf1gpShfck7jNr9SknEa1Aje9m7usf5vmULAhkVF4v55DAsb0HjB2JpDqTiQ
21+
# OKyNZ7qFzAXb2aZTecZv4tScZsS3OngsqZ3FI0T1JPmaSWBxNJY5wkf3XV7btd5L
22+
# H9X5ShtTA7Np33XuXneu01mGhEq3boLro+vfXMHV5QHyle1F4LUFWEqtP0UmZ5wA
23+
# rro0Y7pA8R88tu5X4iWEjQPnAsbRixwFQ9LNMD8+40e1UIguobRySnP5umErHaIh
24+
# Kui7ZijLjbZh/dPS0IfpgahL1K6s9XhT3mD9WMvAvMkNtLewHIZZukG45mOQBrjF
25+
# vvyYxoECgYEA+EY6YimGw0IKnUuf+5uZRXST7kDMENz1Flkcj8oZvo47hdX8/lDN
26+
# i0y7gm3VNfHAK2R2KZPmSbtXA0DvS7kmx1/CFcmwkaakhuU5dyCHldWwSaTME3IE
27+
# xjSZfTvlAiq9i6nUflgfkKo3Bdsiq8TYOUAv25S2SwYDH9Tx0fQwwGECgYEA3Ynt
28+
# CHc8e4YRlGT65UQmEZ8cptmqVRyY4ClMU1xht7Pn0G1JwKRraiEL5/LndwscWf3h
29+
# DygQuArJ28pp4d22FEW1LeXozXYUjJoz3anIA45IZ1OihS7Cx7tJB51/QNJeFdF4
30+
# EX/XHaVukHyYSsAxkwCUYOw3cSgZOSEddL5Wf00CgYEA7JlIlDmMwtFR+jqSmJ3c
31+
# //Kr8zZvAnb/Xa/IZ0MrK4yyLsYR1m48o06Ztx9iO4lKIFAZx1+563QL5P7hzOEC
32+
# kqev90GA8hzD2AXksKEgdOrymAvjq3hSEm0YBN+qS1ldzxYmec0TL7L2wq7lqJnr
33+
# kQuZUAG1g2OUYKZ3WSUDvKECgYEAv24NSkFuG/avfiD7w9xtYNCye2KekskROLG2
34+
# 6FltfsWQTEQDdNkekChaF2WHqRAKwaBlNymRuNZpsuhnMerZCQ9rDWwbDF86RnyA
35+
# 0MuCr7/kxJQ6XQcY/GnTIydu7F5bOlM0gzqKcW2f6m4fUohczf+0N0QmbDsQAJOi
36+
# 1lwadgkCgYEA3tkCBJIPTQecfjWiLqSocS6SrwXU+r3Jw6kI3/IB6ban/nsFdHSb
37+
# nADST7f2zZatN6XALwsLU7f2R09R39ub0AJPyfToxo7MngR1rvaUYooF3rLlaU32
38+
# 8DqGvGpLkZkwbtcDmcX1zQoHjUo7RvoShZoapr59ihfrkiiEsXOkuGw=
39+
# -----END RSA PRIVATE KEY-----
4040
4141
# Host or URL of the instance of Hyperion
4242
# This url will be especially used for OIDC/OAuth2 discovery endpoint and links send by email
@@ -122,24 +122,16 @@ USE_FACTORIES: True # if True and the database is empty, it will be seeded with
122122
# ```
123123
# Group UUIDs should be values of the GroupType enum from `app.core.groups.groupe_type.GroupType`
124124
FACTORIES_DEMO_USERS:
125-
- firstname: Your Firstname
126-
name: Your Name
127-
nickname: Your Nickname
128-
email: your-firstname.your-name@etu.ec-lyon.fr
129-
password: Your_P@$$w0rd
125+
- firstname: #Foucauld
126+
name: #Bellanger
127+
nickname: #Ñool
128+
email: #foucauld.bellanger@etu.ec-lyon.fr
129+
password: #azerty
130130
groups:
131131
- 0a25cb76-4b63-4fd3-b939-da6d9feabf28 # admin
132132
- 45649735-866a-49df-b04b-a13c74fd5886 # AE
133133
- 1f841bd9-00be-41a7-96e1-860a18a46105 # eclair
134-
- firstname: Foucauld
135-
name: Bellanger
136-
nickname: Ñool
137-
138-
password: azerty
139-
groups:
140-
- 1f841bd9-00be-41a7-96e1-860a18a46105
141-
- 45649735-866a-49df-b04b-a13c74fd5886
142-
- 4ec5ae77-f955-4309-96a5-19cc3c8be71c
134+
# - firstname: ...
143135

144136
#####################################
145137
# SMTP configuration using starttls #

0 commit comments

Comments
 (0)