File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -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
@@ -907,7 +901,7 @@ export AIP_PREDICT_ROUTE="/predict"
907901export AIP_HEALTH_ROUTE=" /health"
908902
909903SERVER_LOG=" vertex_max_input_size_server.log"
910- SERVER_ARGS=" --allow-vertex-ai=true --model-repository=restricted_single_model --vertex-ai-default-model=identity_fp32 --http-max-input-size=256 "
904+ SERVER_ARGS=" --allow-vertex-ai=true --model-repository=restricted_single_model --vertex-ai-default-model=identity_fp32 --http-max-input-size=128 "
911905run_server_nowait
912906vertex_ai_wait_for_server_ready $SERVER_PID 10
913907if [ " $WAIT_RET " != " 0" ]; then
Original file line number Diff line number Diff line change @@ -201,8 +201,9 @@ VertexAiAPIServer::Handle(evhtp_request_t* req)
201201 HandleSystemSharedMemory (req, region, action);
202202 return ;
203203 }
204- // register/unregister are mutating operations that must not be
205- // reachable through the prediction endpoint.
204+ // Only read-only status queries are permitted through redirect.
205+ // Mutating operations (register/unregister) require the core
206+ // HTTP endpoint.
206207 LOG_VERBOSE (1 ) << " Vertex AI redirect blocked: " << redirect_endpoint;
207208 evhtp_send_reply (req, EVHTP_RES_FORBIDDEN );
208209 return ;
@@ -224,7 +225,8 @@ VertexAiAPIServer::Handle(evhtp_request_t* req)
224225 HandleRepositoryIndex (req, repo_name);
225226 return ;
226227 }
227- // Model load/unload must not be reachable through the prediction endpoint.
228+ // Only repository index queries are permitted through redirect.
229+ // Model load/unload requires the core HTTP endpoint.
228230 LOG_VERBOSE (1 ) << " Vertex AI redirect blocked: " << redirect_endpoint;
229231 evhtp_send_reply (req, EVHTP_RES_FORBIDDEN );
230232 return ;
You can’t perform that action at this time.
0 commit comments