Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f571995ff9 | |||
| 3ea509b13a | |||
| 70f4d298ff | |||
| 7dd32b1fd4 | |||
| 1f9ea03ca6 | |||
| 466d3cb8e7 | |||
| bd0948f7a5 | |||
| ba6e3bc9ee | |||
| 02ab25e39e |
+16
-1
@@ -47,11 +47,26 @@ read -rs -p "Hasło do aplikacji (APP_PASSWORD): " APP_PASSWORD; echo
|
||||
|
||||
kubectl -n astrololo create secret generic astrololo-auth \
|
||||
--from-literal=APP_PASSWORD="$APP_PASSWORD" \
|
||||
--from-literal=INTERNAL_TOKEN="$(openssl rand -hex 32)"
|
||||
--from-literal=INTERNAL_TOKEN="$(openssl rand -hex 32)" \
|
||||
--from-literal=SESSION_SECRET="$(openssl rand -hex 32)"
|
||||
|
||||
unset APP_PASSWORD
|
||||
```
|
||||
|
||||
`SESSION_SECRET` podpisuje ciasteczka sesji (LOG-34). **Pod bez niego celowo nie
|
||||
wstanie**: usługa z kontami, ale bez klucza, nie odróżniłaby ważnej sesji od
|
||||
podrobionej. Nikt go nigdy nie musi oglądać.
|
||||
|
||||
> **Rotacja tego klucza wylogowuje WSZYSTKICH.** To nie usterka, tylko awaryjny
|
||||
> wyłącznik: gdy podejrzewasz, że ktoś przechwycił cudzą sesję, podmiana klucza
|
||||
> unieważnia je wszystkie naraz.
|
||||
>
|
||||
> ```bash
|
||||
> kubectl -n astrololo patch secret astrololo-auth --type=json \
|
||||
> -p="[{\"op\":\"replace\",\"path\":\"/data/SESSION_SECRET\",\"value\":\"$(openssl rand -hex 32 | base64 | tr -d '\n')\"}]"
|
||||
> kubectl -n astrololo rollout restart deploy/presentation
|
||||
> ```
|
||||
|
||||
`INTERNAL_TOKEN` jest losowany i **nikt go nigdy nie musi oglądać** — służy tylko
|
||||
usługom do rozmowy między sobą. `APP_PASSWORD` wpisujesz w przeglądarce
|
||||
(użytkownik: `astrololo`, zmienny przez `APP_USER` w `presentation.yaml`).
|
||||
|
||||
@@ -11,10 +11,10 @@ resources:
|
||||
- ingress.yaml # wejście po https + przekierowanie z http
|
||||
images:
|
||||
- name: gitea.czernobog.pl/gitea/astrololo-data
|
||||
newTag: baf4e0e3
|
||||
newTag: ee3c515d
|
||||
- name: gitea.czernobog.pl/gitea/astrololo-logic
|
||||
newTag: baf4e0e3
|
||||
newTag: ee3c515d
|
||||
- name: gitea.czernobog.pl/gitea/astrololo-render
|
||||
newTag: latest
|
||||
- name: gitea.czernobog.pl/gitea/astrololo-presentation
|
||||
newTag: a8339659
|
||||
newTag: ee3c515d
|
||||
|
||||
@@ -32,6 +32,13 @@ spec:
|
||||
secretKeyRef: { name: astrololo-auth, key: INTERNAL_TOKEN }
|
||||
- name: APP_USER
|
||||
value: "astrololo"
|
||||
# Klucz podpisu ciasteczek sesji (LOG-34). WYMAGANY — pod bez niego
|
||||
# celowo nie wstaje: usługa z kontami, ale bez klucza, nie umiałaby
|
||||
# odróżnić ważnej sesji od podrobionej. Rotacja tego klucza WYLOGOWUJE
|
||||
# WSZYSTKICH, i tak ma być — to jest awaryjny wyłącznik.
|
||||
- name: SESSION_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef: { name: astrololo-auth, key: SESSION_SECRET }
|
||||
- name: RATE_LIMIT_PER_MIN
|
||||
value: "120" # 0 = bez limitu
|
||||
# Aplikacja stoi za Ingressem, więc bezpośrednim rozmówcą jest zawsze
|
||||
|
||||
@@ -8,9 +8,9 @@ resources:
|
||||
- deploy-bot-backup.yaml
|
||||
images:
|
||||
- name: gitea.czernobog.pl/gitea/conjurer-librarian
|
||||
newTag: ae1bd677
|
||||
newTag: d0c7ab61
|
||||
- name: gitea.czernobog.pl/gitea/conjurer-bot
|
||||
newTag: fbd1ec9f
|
||||
newTag: d0c7ab61
|
||||
# Production bot channel - only bumped when a [deploy]-tagged build appears.
|
||||
# Bootstrapped to fbd1ec9f: that's the image the first [deploy] build (merge
|
||||
# of conjurer#20) promoted to conjurer-bot-deploy. From here the image-updater
|
||||
|
||||
Reference in New Issue
Block a user