Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix security exposure #1698

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions hack/boskos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,24 @@ release_account(){
}

checkout_account(){
if [[ $- =~ x ]]; then
set +x
fi
resource_type=$1
url="http://${BOSKOS_HOST}/acquire?type=${resource_type}&state=free&dest=busy&owner=${USER}"
output=$(curl -X POST ${url})
curl -X POST ${url} -o output.json
[ $? = 0 ] && status_code=200

if [[ ${status_code} == 200 ]]; then
echo "export BOSKOS_RESOURCE_NAME=$(echo ${output} | jq -r '.name')"
echo "export IBMCLOUD_API_KEY=$(echo ${output} | jq -r '.userdata["api-key"]')"
echo "export BOSKOS_RESOURCE_GROUP=$(echo ${output} | jq -r '.userdata["resource-group"]')"
echo "export BOSKOS_REGION=$(echo ${output} | jq -r '.userdata["region"]')"
export BOSKOS_RESOURCE_NAME=$(jq -r '.name' < output.json)
export IBMCLOUD_API_KEY=$(jq -r '.userdata["api-key"]' < output.json)
export BOSKOS_RESOURCE_GROUP=$(jq -r '.userdata["resource-group"]' < output.json)
export BOSKOS_REGION=$(jq -r '.userdata["region"]' < output.json)
if [[ ${resource_type} == "powervs-service" ]]; then
echo "export BOSKOS_RESOURCE_ID=$(echo ${output} | jq -r '.userdata["service-instance-id"]')"
echo "export BOSKOS_ZONE=$(echo ${output} | jq -r '.userdata["zone"]')"
export BOSKOS_RESOURCE_ID=$(jq -r '.userdata["service-instance-id"]' < output.json)
export BOSKOS_ZONE=$(jq -r '.userdata["zone"]' < output.json)
fi
rm -rf output.json
else
echo "Got invalid response- ${status_code}"
exit 1
Expand Down
2 changes: 0 additions & 2 deletions hack/kind-network-fix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ set -o errexit
set -o nounset
set -o pipefail

set -x

docker network create \
--ipv6 \
--subnet=fc00:f853:ccd:e793::/64 \
Expand Down