@@ -699,20 +699,14 @@ else
699699fi
700700set -e
701701
702- # repository control (expect error)
702+ # repository control via redirect is blocked unconditionally
703703rm -f ./curl.out
704704set +e
705705code=` curl -s -w %{http_code} -o ./curl.out -X POST -H " X-Vertex-Ai-Triton-Redirect: v2/repository/models/subadd/unload" localhost:8080/predict`
706- if [ " $code " == " 200 " ]; then
706+ if [ " $code " != " 403 " ]; then
707707 cat ./curl.out
708- echo -e " \n***\n*** Test Failed\n***"
708+ echo -e " \n***\n*** Failed. Expected model unload via redirect to return 403 (got $code ) \n***"
709709 RET=1
710- else
711- grep " explicit model load / unload is not allowed" ./curl.out
712- if [ $? -ne 0 ]; then
713- echo -e " \n***\n*** Failed. Expected error on model control\n***"
714- RET=1
715- fi
716710fi
717711set -e
718712
@@ -813,8 +807,7 @@ if [ "$code" != "403" ]; then
813807 RET=1
814808fi
815809
816- # Model load redirect is unconditionally blocked through the prediction
817- # endpoint regardless of restricted header configuration (TRI-715 RCE vector)
810+ # Model load redirect is unconditionally blocked through the prediction endpoint
818811rm -f ./curl.out
819812code=` curl -s -w %{http_code} -o ./curl.out -X POST -H " X-Vertex-Ai-Triton-Redirect: v2/repository/models/identity_fp32/load" localhost:8080/predict`
820813if [ " $code " != " 403" ]; then
@@ -823,7 +816,7 @@ if [ "$code" != "403" ]; then
823816 RET=1
824817fi
825818
826- # Model unload redirect is unconditionally blocked (TRI-715 DoS vector)
819+ # Model unload redirect is unconditionally blocked through the prediction endpoint
827820rm -f ./curl.out
828821code=` curl -s -w %{http_code} -o ./curl.out -X POST -H " X-Vertex-Ai-Triton-Redirect: v2/repository/models/identity_fp32/unload" localhost:8080/predict`
829822if [ " $code " != " 403" ]; then
@@ -941,7 +934,7 @@ export AIP_PREDICT_ROUTE="/predict"
941934export AIP_HEALTH_ROUTE=" /health"
942935
943936SERVER_LOG=" vertex_max_input_size_server.log"
944- SERVER_ARGS=" --allow-vertex-ai=true --model-repository=restricted_single_model --vertex-ai-default-model=identity_fp32 --http-max-input-size=256 "
937+ SERVER_ARGS=" --allow-vertex-ai=true --model-repository=restricted_single_model --vertex-ai-default-model=identity_fp32 --http-max-input-size=128 "
945938run_server_nowait
946939vertex_ai_wait_for_server_ready $SERVER_PID 10
947940if [ " $WAIT_RET " != " 0" ]; then
0 commit comments