[+] lab7
Grade 3 secure application acceptance / secure (pull_request) Canceled after 0s
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
Xabenskie
2026-11-30 09:09:57 +03:00
parent 20afc2c790
commit 4eca49fe3d
149 changed files with 68317 additions and 58 deletions
+17
View File
@@ -0,0 +1,17 @@
#!/bin/sh
set -eu
export MC_CONFIG_DIR=/tmp/mc
export SSL_CERT_FILE=/trust/ca.crt
root_user=$(cat /run/secrets/minio_root_user)
root_password=$(cat /run/secrets/minio_root_password)
mc alias set local https://minio:9000 "$root_user" "$root_password" >/dev/null
mc mb --ignore-existing local/messenger-attachments >/dev/null
mc anonymous set none local/messenger-attachments >/dev/null
for role in api worker relay test; do
access=$(cat "/run/secrets/s3_${role}_id")
password=$(cat "/run/secrets/s3_${role}_secret")
mc admin user add local "$access" "$password" >/dev/null
mc admin policy create local "lab7-$role" "/policies/$role.json" >/dev/null
mc admin policy attach local "lab7-$role" --user "$access" >/dev/null
done
printf '%s\n' 'Private S3 bootstrap and scoped identities ready.'