-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add hierarchical path handling to static role endpoints (#102)
* adds poc with nested role listing * add make configure * update regex to honor previous contraints * refactor static role tests * add tests for static role read and list * enable hierarchical path for static-cred endpoint * enable hierarchical path for rotate-role endpoint * address review comments * update makefile and test checks --------- Co-authored-by: Austin Gebauer <agebauer@hashicorp.com>
- Loading branch information
1 parent
6a3ca72
commit 3273e17
Showing
8 changed files
with
370 additions
and
462 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
PLUGIN_DIR=$1 | ||
PLUGIN_NAME=$2 | ||
PLUGIN_PATH=$3 | ||
|
||
echo "==> PLUGIN_DIR: $PLUGIN_DIR" | ||
echo "==> PLUGIN_NAME: $PLUGIN_NAME" | ||
echo "==> PLUGIN_PATH: $PLUGIN_PATH" | ||
|
||
# Try to clean-up previous runs | ||
vault secrets disable "${PLUGIN_PATH}" | ||
vault plugin deregister secret "${PLUGIN_NAME}" | ||
killall "${PLUGIN_NAME}" | ||
|
||
# Copy the binary so text file is not busy when rebuilding & the plugin is registered | ||
cp ./bin/"$PLUGIN_NAME" "$PLUGIN_DIR" | ||
|
||
# Sets up the binary with local changes | ||
vault plugin register \ | ||
-sha256="$(shasum -a 256 "$PLUGIN_DIR"/"$PLUGIN_NAME" | awk '{print $1}')" \ | ||
-version="0.0.1" \ | ||
secret "${PLUGIN_NAME}" | ||
|
||
if [ -e scripts/custom.sh ] | ||
then | ||
. scripts/custom.sh | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.