Merge branch 'master' into further-reading
All checks were successful
/ build (pull_request) Successful in 2m18s

This commit is contained in:
n0th1ng 2025-11-18 20:05:27 +01:00
commit 687590bb74
8 changed files with 170 additions and 72 deletions

View file

@ -0,0 +1,24 @@
on:
pull_request:
types:
- closed
jobs:
cleanup-staging:
runs-on: docker
container:
image: code.forgejo.org/oci/node:20-bookworm
steps:
- name: Pipeline info PR
run: |
echo "Run triggered by ${{ github.event_name }} (${{ github.event.action }}) on ref ${{ github.ref_name }}"
- name: Staging Deployment - Prepare keys
run: |
echo "${{ secrets.SSH_DEPLOY_KEY }}" > deploykey.priv
chmod 400 deploykey.priv
echo "${{ secrets.SSH_KNOWN_HOSTS_FILE }}" > ./known_hosts
- name: Staging Deployment - Remove PR from staging
run: |
ssh -i deploykey.priv -o 'UserKnownHostsFile ./known_hosts' cryptoparty-website-deploy@public-web-static-intern.hamburg.ccc.de -t "rm -r /var/www/staging.cryptoparty-hamburg.de/pr${{ github.event.pull_request.number }}/"

View file

@ -0,0 +1,82 @@
on:
push:
branches:
- master
pull_request:
env:
TZ: Europe/Berlin
jobs:
build:
runs-on: docker
container:
image: docker.io/hugomods/hugo:0.147.9
steps:
- name: Pipeline info
run: |
echo "Run triggered by ${{ github.event_name }} (${{ github.event.action }}) on ref ${{ github.ref_name }}"
- name: Install packages
run: |
apk update
# For CI actions.
apk add nodejs-current
# For website build.
apk add tzdata coreutils curl jq git
# For uploading.
apk add rsync openssh
- uses: actions/checkout@v4
with:
fetch-depth: 0 # pull full history for page lastmod by git commit date
submodules: recursive
- name: Patch baseURL (staging only)
if: github.ref_name != 'master'
run: |
sed -i 's#baseurl = "https://cryptoparty-hamburg.de"#baseurl = "https://staging.cryptoparty-hamburg.de/pr${{ github.event.pull_request.number }}/"#' config.toml
- name: Build website (prod)
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref_name == 'master'
run: |
hugo
- name: Build website (staging)
if: github.ref_name != 'master'
run: |
hugo --buildFuture --buildDrafts
- name: Deploy - Prepare keys
if: github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'schedule'
run: |
echo "${{ secrets.SSH_DEPLOY_KEY }}" > deploykey.priv
chmod 400 deploykey.priv
echo "${{ secrets.SSH_KNOWN_HOSTS_FILE }}" > ./known_hosts
- name: Deploy - Upload PR to staging
if: github.event_name == 'pull_request'
run: |
echo "Deploying to staging.cryptoparty-hamburg.de/pr${{ github.event.pull_request.number }}"
rsync -v -r --delete -e "ssh -i deploykey.priv -o 'UserKnownHostsFile ./known_hosts'" public/ cryptoparty-website-deploy@public-web-static-intern.hamburg.ccc.de:/var/www/staging.cryptoparty-hamburg.de/pr${{ github.event.pull_request.number }}/
- name: Deploy - Add comment to PR with staging URL
if: github.event_name == 'pull_request' && github.event.action == 'opened'
run: |
curl \
-X POST \
${{ github.event.pull_request.base.repo.url }}/issues/${{ github.event.pull_request.number }}/comments \
-H "Content-Type: application/json" \
-H "Authorization: token $GITHUB_TOKEN" \
--data '{ "body": "You can view your changes at https://staging.cryptoparty-hamburg.de/pr${{ github.event.pull_request.number }}/" }'
- name: Deploy - Upload to prod
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref_name == 'master'
run: |
rsync -v -r --delete -e "ssh -i deploykey.priv -o 'UserKnownHostsFile ./known_hosts'" public/ cryptoparty-website-deploy@public-web-static-intern.hamburg.ccc.de:/var/www/cryptoparty-hamburg.de/
- uses: actions/upload-artifact@v3
if: github.event_name == 'pull_request'
with:
name: website-build
path: public/

View file

@ -1,32 +0,0 @@
image: debian:buster-slim
before_script:
- apt update -qq
stages:
- build
- deploy
build_job:
stage: build
script:
- DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends -y -qq -o=Dpkg::Use-Pty=0 make hugo
- make
artifacts:
paths:
- public
variables:
GIT_SUBMODULE_STRATEGY: normal
deploy_job:
stage: deploy
script:
- DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends -y -qq -o=Dpkg::Use-Pty=0 openssh-client rsync
- umask 0077
- mkdir $HOME/.ssh
- eval $(ssh-agent -s)
- echo "$RSYNC_TARGET_SECRET_KEY" | ssh-add -
- echo "[$RSYNC_TARGET_HOST]:$RSYNC_TARGET_PORT $RSYNC_TARGET_HOST_KEY" > $HOME/.ssh/known_hosts
- rsync -av --delete -e "ssh -p $RSYNC_TARGET_PORT" public/* "$RSYNC_TARGET_USER@$RSYNC_TARGET_HOST:/"
only:
- master
- hugo

View file

@ -11,12 +11,12 @@ Linux Distributions, install them like this:
Now you can clone the repository:
$ git clone ssh://git@gitlab.hamburg.ccc.de:4242/cryptoparty/website-content.git
$ git clone ssh://forgejo@git.hamburg.ccc.de/Cryptoparty/cryptoparty-website.git
If this doesn't work, you may need to add a ssh authentication key to
your gitlab profile on [this page]:
your Forgejo profile on [this page]:
[this page]: https://gitlab.hamburg.ccc.de/profile/keys
[this page]: https://git.hamburg.ccc.de/user/settings/keys
Furthermore, you need to checkout the submodules:
@ -64,44 +64,24 @@ If you are satisfied, add it to the branch, and push it to the server:
$ git commit -m 'Added new post.'
$ git push
Then, [create a merge request] on gitlab. Press the blue button
labeled `Create merge request`. On the following site, press the
green `Submit merge request` button, then press the blue button
labeled `Merge once pipeline succeeds`. Your change will be published
once the continuous integration setup confirmed the validity of the
change.
Then, [create a pull request] on Forgejo. Press the button labeled
`New pull request`. On the following site, select the branch you want to merge
(`my-new-post`) in the `pull from:` dropdown, press the `New pull request`
button and then finally the `Create pull request` button. The CI will now build
a website with your changes. Once that's done and you verified everything looks
alright, you can then merge the pull request to publish the change.
[create a merge request]: https://gitlab.hamburg.ccc.de/cryptoparty/website-content/merge_requests
[create a pull request]: https://git.hamburg.ccc.de/Cryptoparty/cryptoparty-website/pulls
How this is set up on the server
================================
On the server, the website is built using gitlab's ci runner, see
`.gitlab-ci.yml`. To deploy the site, the ci job rsyncs it to the
host. For this purpose, a restricted user is created:
The website gets built and deployed using Forgejo Actions, see
`.forgejo/workflows/deploy.yaml`. It's using the same mechanism for hosting and
deployment as the [CCCHH Website] and is therefore using the CCCHH
infrastructure, see [ansible-infra] and [nix-infra].
# adduser --system --home /var/www/www-data-rsync --shell /bin/sh --disabled-password --ingroup www-data www-data-rsync
[CCCHH Website]: https://git.hamburg.ccc.de/CCCHH/ccchh-website
Create a key and restrict it to invoke the restricted-rsync script:
# mkdir /var/www/www-data-rsync/.ssh
# chmod 700 /var/www/www-data-rsync/.ssh
# ssh-keygen -t ed25519 -C 'Used for website deployment.' -f www-data-rsync-id_ed25519
# echo 'command="/usr/local/bin/rrsync /var/www/html --safe-links",no-agent-forwarding,no-port-forwarding,no-pty,no-user-rc,no-X11-forwarding ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOBBpthbSQ3HgOkhoBwsrZCA9VMX7hRftB5t6LePqtr3 Used for website deployment.' > /var/www/www-data-rsync/.ssh/authorized_keys
# chmod 400 /var/www/www-data-rsync/.ssh/authorized_keys
# chown -R www-data-rsync:www-data /var/www/www-data-rsync/.ssh
Copy the restricted-rsync script from the docs and make it executable:
# cp /usr/share/doc/rsync/scripts/rrsync /usr/local/bin/
# chmod +x /usr/local/bin/rrsync
Finally, allow www-data-rsync to write to the document root:
# chown root:www-data /var/www/html
# chmod g+w /var/www/html
The last bit is to supply the generated secret to gitlab's ci runner
via RSYNC_TARGET_SECRET_KEY. Other information that needs to be
provided are RSYNC_TARGET_HOST, RSYNC_TARGET_PORT,
RSYNC_TARGET_HOST_KEY, and RSYNC_TARGET_USER.
[ansible-infra]: https://git.hamburg.ccc.de/CCCHH/ansible-infra
[nix-infra]: https://git.hamburg.ccc.de/CCCHH/nix-infra

View file

@ -2,7 +2,7 @@
title: "Wie mache ich Smartphone backups?"
author: "w1ntermute"
type: "blog"
date: 2024-03-09
date: 2024-03-12
subtitle: ""
image: ""
tags: [backups,blog]

View file

@ -2,7 +2,7 @@
title: "Warum Software vor der benutzung verifiziert werden muss"
author: "w1ntermute"
type: "blog"
date: 2024-09-21
date: 2024-04-01
subtitle: ""
image: ""
tags: [verification,blog]
@ -50,4 +50,27 @@ Andere bieten torrent dateien an. Hier kann gar nicht gesteuert werden woher die
## Wie davor schützen?
Die vorher genannten Appstore schützen uns nur solange, wie unser Angriffszenario keinen Geheimdienst beinhaltet. Denn diese können ja per dekret änderungen vornehmen. Deswegen gibt es für Software wie z.B. tails andere möglichkeiten.
Die fertige Software wird hierbei unterzeichnet. Das heißt, wir können überprüfen wer diese Software ausgestellt hat und ob diese seit der Unterzeichnung nicht mehr verändert wurde. Dies passiert über ein sogenannten asynchrones verschlüsselungsverfahren. Hierbei wird mithilfe von RSA oder Edwardskurven eine Signaturdatei erstellt vom hashwert der Software. Das heißt, sollte auf dem weg die Software verändert worden sein, sollte sich auch der hashwert ändern.
Ein Hashwert ist hierbei ein Wert, der von einer Funktion errechnet wird. Wir geben also unsere Software in diese Funktion und es entsteht dabei ein Wert. Dieser wert kann nur duch diese Software erstellt werden. Jede kleine änderung an der Software sorgt für einen erheblichen unterschied dieses Hashwerts.
```
w1ntermute@w1ntermute ~/Downloads> sha1sum firefox/firefox-bin
f269a997b730a7abf454c457f1b279887322002f firefox/firefox-bin
```
So sieht das z.B. für meine firefox version aus.
Asynchrone verschlüsselung bedeutet hierbei, dass wir mit einem privaten Schlüssel einen Wert errechnen von diesem Hash, denn jede Person mit dem öffentlichen Schlüssel überprüfen kann. Und nur dieser eine private Schlüssel kann diesen Wert erstellen. Eigentlich verschlüsseln wir hier den vorher erstellten hash mit diesem privaten Schlüssel. Und mit dem öffentlichen entschlüsseln wir diesen und können dadurch die unversehrtheit überprüfen.
Damit können wir sicherstellen, wer die Software ausgestellt hat und das diese auf den Weg zu uns nicht verändert wurde.
Aber woher wissen wir wirklich wer die Software erstellt hat? Jede Person kann diese Schlüssel erstellen.
## Web of Trust
Diese Schlüssel kommen in ein Schlüsselverzeichnnis welches öffentlich einsehbar ist. Dadurch können alle Personen auf der Welt diese einsehen. Also auch wie viele Schlüssel es gibt und wie viele davon erstellt wurden. Zusätzlich haben diese Schlüssel informationen wie z.B. den Namen und welche E-Mailadresse zu diesem Schlüssel gehören. So ist ersichtlich, ob z.B. eine Person gerade konkuriende Schlüssel besitzt. Damit nun sichergestellt werden kann, dass dieser Schlüssel wirklich zu der dort beschriebenen Person passt, können andere Personen mit Schlüssel nun unterzeichnen, ob sie diesem Schlüssel trauen und diesen Analog in der Welt überprüft haben. Dadurch steigt das vertrauen in diesen Schlüssel. Das heißt, dass Software von Sclüsseln unterzeichnet werden sollte, die ein hohes vertrauen unter Personen haben.
Dadurch, kann selbst wenn der Server der die Software ausliefert im falle eines hacks keine Software ausliefern. Denn diese verfügt nicht über den Schlüssel mit dem hohen vertrauen. Auch der wechsel des Schlüssels würde auffallen.
Deswegen ist es wichtig, immer beides zu überprüfen. Den Hashwert also die checksum und die Signatur.

View file

@ -0,0 +1,21 @@
---
title: "Aufmerksam sein und gegen Chatkontrolle sein"
author: "w1ntermute"
type: ""
date: 2024-06-18T18:10:57+02:00
subtitle: ""
image: ""
tags: [information]
---
Wir möchten einmal darauf aufmerksam machen, dass diese Woche
im EU-Rat die Chatkontrolle besprochen wird. Das heißt, die Länder
besprechen in welcher Form dieses Vorhaben zur Absprache gebracht werden soll.
Diese Chatkontrolle würde einen totalen verlust der Privatsphäre bei allen Nachrichten die wir senden
bedeuten.
Dies muss verhindert werden.
Wie ihr das könnt und mehr Informationen zur Chatkontrolle unter der Website von [Patrick Breyer](https://www.patrick-breyer.de/beitraege/chatkontrolle/) und
dem [Bündnis Chatkontrolle Stoppen](https://chat-kontrolle.eu/).

@ -1 +1 @@
Subproject commit 08cfb448c8fdc63425dea4c8eeee69c21c45b614
Subproject commit e69e25d4ca0d3c737f0677995d2bf9541ffb4926