add easy certificate revocation #1

Open
opened 2023-07-21 20:47:22 +02:00 by dede · 0 comments
Owner

the idea is to extend the step-ca container to be able to revoke certificates easily.
not that i think this is needed 0:-)

to do so i thought of watching a directory's files where the certs to revoke would be saved.
further thinking and investigation needed.

here comes an example for watching file changes:

#!/bin/bash

watched_files=$@  # pass watched files as cmd line arguments

if [ -z "$watched_files" ]; then
  echo "Nothing to watch, abort"
  exit
else
  echo "watching: $watched_files"
fi

previous_checksum="dummy"
while [ 1 ]; do
  checksum=$(md5sum $watched_files | md5sum)
  if [ "$checksum" != "$previous_checksum" ]; then
    echo "None shall pass!"  # do your stuff here
  fi
  previous_checksum="$checksum"
  sleep 1
done
the idea is to extend the step-ca container to be able to revoke certificates easily. not that i think this is needed 0:-) to do so i thought of watching a directory's files where the certs to revoke would be saved. further thinking and investigation needed. here comes an example for watching file changes: ```bash #!/bin/bash watched_files=$@ # pass watched files as cmd line arguments if [ -z "$watched_files" ]; then echo "Nothing to watch, abort" exit else echo "watching: $watched_files" fi previous_checksum="dummy" while [ 1 ]; do checksum=$(md5sum $watched_files | md5sum) if [ "$checksum" != "$previous_checksum" ]; then echo "None shall pass!" # do your stuff here fi previous_checksum="$checksum" sleep 1 done ```
dede added the enhancement label 2023-07-21 20:47:22 +02:00
Sign in to join this conversation.