Skip to content

Instantly share code, notes, and snippets.

View JuergenReppSIT's full-sized avatar

Jürgen Repp JuergenReppSIT

  • Darmstadt Germany
View GitHub Profile
@JuergenReppSIT
JuergenReppSIT / authorize_policy.sh
Last active June 4, 2024 12:09
Bash script to create an authorized FAPI policy (with a PEM key, jq has to be installed)
#!/bin/bash
: << 'COMMENT'
Example: authorize /policy/pcr with a certain policy ref:
policy_ref="f0f1f2f3f4f5f6f7f8f9"
authorize-policy.sh /policy/pcr $policy_ref key_pub.pem key.pem > authorized_policy.json
The policy for the object to be protected can be created as follows:
cat > policy_authorize.json <<EOF