From fc4e5a9c1bf19f099baf2a63f5d6d19de89495c4 Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Fri, 18 Oct 2024 17:38:24 -0400 Subject: [PATCH] Fix development scripts Signed-off-by: Alexander Scheel --- scripts/build.sh | 2 +- scripts/local_dev.sh | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index 9297091..cef6ab2 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -3,7 +3,7 @@ # SPDX-License-Identifier: MPL-2.0 -TOOL=vault-plugin-auth-jwt +TOOL=openbao-plugin-auth-jwt # # This script builds the application from source for a platformx. set -e diff --git a/scripts/local_dev.sh b/scripts/local_dev.sh index 6ff75c1..3a95f7c 100755 --- a/scripts/local_dev.sh +++ b/scripts/local_dev.sh @@ -5,12 +5,12 @@ set -e MNT_PATH="oidc" -PLUGIN_NAME="vault-plugin-auth-jwt" +PLUGIN_NAME="openbao-plugin-auth-jwt" PLUGIN_CATALOG_NAME="oidc" # # Helper script for local development. Automatically builds and registers the -# plugin. Requires `vault` is installed and available on $PATH. +# plugin. Requires `bao` is installed and available on $PATH. # # Get the right dir @@ -25,46 +25,46 @@ mkdir -p "$SCRATCH/plugins" echo "--> Vault server" echo " Writing config" -tee "$SCRATCH/vault.hcl" > /dev/null < /dev/null < Cleaning up" - kill -INT "$VAULT_PID" + kill -INT "$BAO_PID" rm -rf "$SCRATCH" } trap cleanup EXIT echo " Authing" -vault login root &>/dev/null +bao login root &>/dev/null echo "--> Building" go build -o "$SCRATCH/plugins/$PLUGIN_NAME" "./cmd/$PLUGIN_NAME" SHASUM=$(shasum -a 256 "$SCRATCH/plugins/$PLUGIN_NAME" | cut -d " " -f1) echo " Registering plugin" -vault write sys/plugins/catalog/$PLUGIN_CATALOG_NAME \ +bao write sys/plugins/catalog/$PLUGIN_CATALOG_NAME \ sha_256="$SHASUM" \ command="$PLUGIN_NAME" echo " Mounting plugin" -vault auth enable -path=$MNT_PATH -plugin-name=$PLUGIN_CATALOG_NAME -listing-visibility=unauth plugin +bao auth enable -path=$MNT_PATH -plugin-name=$PLUGIN_CATALOG_NAME -listing-visibility=unauth plugin if [ -e scripts/custom.sh ] then