File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 8080 run : ./tests/gh-actions/install_training_operator.sh
8181
8282 - name : Install Knative
83- run : ./tests/gh-actions/install_knative.sh
83+ run : ./tests/gh-actions/install_knative-cni .sh
8484
8585 - name : Install KServe
8686 run : ./tests/gh-actions/install_kserve.sh
@@ -197,6 +197,20 @@ jobs:
197197 "localhost:8080/model-registry/api/v1/model_registry?namespace=${KF_PROFILE}" \
198198 -H "Authorization: Bearer ${KF_TOKEN}"
199199
200+ - name : Test Model Registry API with Unauthorized Token
201+ run : |
202+ UNAUTHORIZED_TOKEN=$(kubectl -n test-unauthorized create token test-unauthorized || kubectl -n test-unauthorized create token default)
203+
204+ STATUS_CODE=$(curl -s \
205+ --output /dev/stderr --write-out "%{http_code}" \
206+ "localhost:8080/model-registry/api/v1/model_registry?namespace=${KF_PROFILE}" \
207+ -H "Authorization: Bearer ${UNAUTHORIZED_TOKEN}")
208+
209+ if test $STATUS_CODE -ne 403; then
210+ echo "Error: Unauthorized access was not correctly rejected. Got status code: ${STATUS_CODE}"
211+ exit 1
212+ fi
213+
200214 - name : Apply Pod Security Standards Baseline
201215 run : ./tests/gh-actions/enable_baseline_PSS.sh
202216
You can’t perform that action at this time.
0 commit comments