<?xml version="1.0" encoding="utf-8"?><testsuites name="pytest tests"><testsuite name="pytest" errors="0" failures="3" skipped="1" tests="127" time="1194.288" timestamp="2026-04-17T17:42:22.099473+00:00" hostname="maas-group-test-pbz4h-e2e-maas-openshift-pod"><testcase classname="test.e2e.tests.test_api_keys.TestAPIKeyCRUD" name="test_create_api_key" time="0.126" /><testcase classname="test.e2e.tests.test_api_keys.TestAPIKeyCRUD" name="test_list_api_keys" time="0.144" /><testcase classname="test.e2e.tests.test_api_keys.TestAPIKeyCRUD" name="test_revoke_api_key" time="0.103" /><testcase classname="test.e2e.tests.test_api_keys.TestAPIKeyAuthorization" name="test_admin_manage_other_users_keys" time="0.135" /><testcase classname="test.e2e.tests.test_api_keys.TestAPIKeyAuthorization" name="test_non_admin_cannot_access_other_users_keys" time="0.105" /><testcase classname="test.e2e.tests.test_api_keys.TestAPIKeyBulkOperations" name="test_bulk_revoke_own_keys" time="0.260" /><testcase classname="test.e2e.tests.test_api_keys.TestAPIKeyBulkOperations" name="test_bulk_revoke_other_user_forbidden" time="0.033" /><testcase classname="test.e2e.tests.test_api_keys.TestAPIKeyBulkOperations" name="test_bulk_revoke_admin_can_revoke_any_user" time="0.096" /><testcase classname="test.e2e.tests.test_api_keys.TestAPIKeyExpiration" name="test_create_key_within_expiration_limit" time="0.031" /><testcase classname="test.e2e.tests.test_api_keys.TestAPIKeyExpiration" name="test_create_key_at_expiration_limit" time="0.033" /><testcase classname="test.e2e.tests.test_api_keys.TestAPIKeyExpiration" name="test_create_key_exceeds_expiration_limit" time="0.032" /><testcase classname="test.e2e.tests.test_api_keys.TestAPIKeyExpiration" name="test_create_key_without_expiration" time="0.032" /><testcase classname="test.e2e.tests.test_api_keys.TestAPIKeyExpiration" name="test_create_key_with_short_expiration" time="0.031" /><testcase classname="test.e2e.tests.test_api_keys.TestAPIKeyModelInference" name="test_api_key_model_access_success" time="0.111" /><testcase classname="test.e2e.tests.test_api_keys.TestAPIKeyModelInference" name="test_invalid_api_key_rejected" time="0.024" /><testcase classname="test.e2e.tests.test_api_keys.TestAPIKeyModelInference" name="test_no_auth_header_rejected" time="0.021" /><testcase classname="test.e2e.tests.test_api_keys.TestAPIKeyModelInference" name="test_revoked_api_key_rejected" time="2.120" /><testcase classname="test.e2e.tests.test_api_keys.TestAPIKeyModelInference" name="test_api_key_chat_completions" time="0.030" /><testcase classname="test.e2e.tests.test_api_keys.TestAPIKeyRevocationE2E" name="test_double_revoke_returns_404" time="0.099" /><testcase classname="test.e2e.tests.test_api_keys.TestAPIKeyRevocationE2E" name="test_revoke_nonexistent_key_returns_404" time="0.032" /><testcase classname="test.e2e.tests.test_api_keys.TestAPIKeyRevocationE2E" name="test_revoke_then_create_new_key_works" time="0.148" /><testcase classname="test.e2e.tests.test_api_keys.TestAPIKeyRevocationE2E" name="test_individual_revoke_multiple_keys" time="0.207" /><testcase classname="test.e2e.tests.test_api_keys.TestAPIKeyRevocationE2E" name="test_revoke_keys_rejected_at_gateway" time="0.292" /><testcase classname="test.e2e.tests.test_api_keys.TestEphemeralKeyCleanup" name="test_cronjob_exists_and_configured" time="0.109" /><testcase classname="test.e2e.tests.test_api_keys.TestEphemeralKeyCleanup" name="test_cleanup_networkpolicy_exists" time="0.103" /><testcase classname="test.e2e.tests.test_api_keys.TestEphemeralKeyCleanup" name="test_create_ephemeral_key" time="0.108" /><testcase classname="test.e2e.tests.test_api_keys.TestEphemeralKeyCleanup" name="test_trigger_cleanup_preserves_active_keys" time="0.587"><skipped type="pytest.skip" message="Cannot exec into maas-api pod to trigger cleanup (neither curl nor wget available): executable file `wget` not found in $PATH: No such file or directory&#10;command terminated with exit code 1">/workspace/source/test/e2e/tests/test_api_keys.py:1083: Cannot exec into maas-api pod to trigger cleanup (neither curl nor wget available): executable file `wget` not found in $PATH: No such file or directory
command terminated with exit code 1</skipped></testcase><testcase classname="test.e2e.tests.test_namespace_scoping.TestMaaSAPIWatchNamespace" name="test_subscription_in_subscription_namespace_visible_to_api" time="16.423" /><testcase classname="test.e2e.tests.test_namespace_scoping.TestMaaSAPIWatchNamespace" name="test_subscription_in_another_namespace_not_visible_to_api" time="22.774" /><testcase classname="test.e2e.tests.test_namespace_scoping.TestMaaSControllerWatchNamespace" name="test_authpolicy_and_subscription_in_maas_subscription_namespace" time="23.969" /><testcase classname="test.e2e.tests.test_namespace_scoping.TestMaaSControllerWatchNamespace" name="test_authpolicy_and_subscription_in_another_namespace" time="29.905" /><testcase classname="test.e2e.tests.test_namespace_scoping.TestModelRef" name="test_auth_policy_model_ref" time="31.042" /><testcase classname="test.e2e.tests.test_namespace_scoping.TestModelRef" name="test_subscription_model_ref" time="31.367" /><testcase classname="test.e2e.tests.test_negative_security.TestHeaderSpoofing" name="test_injected_identity_headers_ignored" time="0.085" /><testcase classname="test.e2e.tests.test_negative_security.TestHeaderSpoofing" name="test_duplicate_subscription_headers_ignored" time="0.065" /><testcase classname="test.e2e.tests.test_negative_security.TestExpiredKeyRejection" name="test_expired_key_rejected_at_gateway" time="5.073" /><testcase classname="test.e2e.tests.test_negative_security.TestCrossModelAccess" name="test_key_cannot_access_model_outside_subscription" time="0.058" /><testcase classname="test.e2e.tests.test_negative_security.TestAuthPolicyRemoval" name="test_authpolicy_deletion_revokes_access" time="5.045" /><testcase classname="test.e2e.tests.test_negative_security.TestMissingModelRef" name="test_subscription_with_nonexistent_model_ref" time="0.999" /><testcase classname="test.e2e.tests.test_negative_security.TestMissingModelRef" name="test_authpolicy_with_nonexistent_model_ref" time="0.666" /><testcase classname="test.e2e.tests.test_negative_security.TestHeaderAbuse" name="test_special_characters_in_subscription_header" time="0.156" /><testcase classname="test.e2e.tests.test_subscription.TestAuthEnforcement" name="test_authorized_user_gets_200" time="0.061" /><testcase classname="test.e2e.tests.test_subscription.TestAuthEnforcement" name="test_no_auth_gets_401" time="0.019" /><testcase classname="test.e2e.tests.test_subscription.TestAuthEnforcement" name="test_invalid_token_gets_403" time="0.022" /><testcase classname="test.e2e.tests.test_subscription.TestAuthEnforcement" name="test_wrong_group_gets_403" time="0.029" /><testcase classname="test.e2e.tests.test_subscription.TestAPIKeySubscriptionBinding" name="test_create_api_key_uses_highest_priority_subscription" time="0.290" /><testcase classname="test.e2e.tests.test_subscription.TestAPIKeySubscriptionBinding" name="test_create_api_key_with_explicit_simulator_subscription" time="0.069" /><testcase classname="test.e2e.tests.test_subscription.TestAPIKeySubscriptionBinding" name="test_create_api_key_nonexistent_subscription_errors" time="0.252" /><testcase classname="test.e2e.tests.test_subscription.TestSubscriptionEnforcement" name="test_subscribed_user_gets_200" time="0.029" /><testcase classname="test.e2e.tests.test_subscription.TestSubscriptionEnforcement" name="test_auth_pass_no_subscription_gets_403" time="16.406" /><testcase classname="test.e2e.tests.test_subscription.TestSubscriptionEnforcement" name="test_rate_limit_exhaustion_gets_429" time="25.576" /><testcase classname="test.e2e.tests.test_subscription.TestSubscriptionEnforcement" name="test_models_endpoint_exempt_from_rate_limiting" time="25.218" /><testcase classname="test.e2e.tests.test_subscription.TestMultipleSubscriptionsPerModel" name="test_user_in_one_of_two_subscriptions_gets_200" time="8.373" /><testcase classname="test.e2e.tests.test_subscription.TestMultipleAuthPoliciesPerModel" name="test_two_auth_policies_or_logic" time="16.778" /><testcase classname="test.e2e.tests.test_subscription.TestMultipleAuthPoliciesPerModel" name="test_delete_one_auth_policy_other_still_works" time="24.516" /><testcase classname="test.e2e.tests.test_subscription.TestCascadeDeletion" name="test_delete_subscription_rebuilds_trlp" time="8.507" /><testcase classname="test.e2e.tests.test_subscription.TestCascadeDeletion" name="test_trlp_persists_during_multi_subscription_deletion" time="33.294" /><testcase classname="test.e2e.tests.test_subscription.TestCascadeDeletion" name="test_delete_last_subscription_denies_access" time="8.492" /><testcase classname="test.e2e.tests.test_subscription.TestCascadeDeletion" name="test_unconfigured_model_denied_by_gateway_auth" time="0.481" /><testcase classname="test.e2e.tests.test_subscription.TestOrderingEdgeCases" name="test_subscription_before_auth_policy" time="18.949" /><testcase classname="test.e2e.tests.test_subscription.TestManagedAnnotation" name="test_authpolicy_managed_false_prevents_update" time="20.962" /><testcase classname="test.e2e.tests.test_subscription.TestManagedAnnotation" name="test_trlp_managed_false_prevents_update" time="17.518" /><testcase classname="test.e2e.tests.test_subscription.TestE2ESubscriptionFlow" name="test_e2e_with_both_access_and_subscription_gets_200" time="17.781" /><testcase classname="test.e2e.tests.test_subscription.TestE2ESubscriptionFlow" name="test_e2e_with_access_but_no_subscription_gets_403" time="17.203" /><testcase classname="test.e2e.tests.test_subscription.TestE2ESubscriptionFlow" name="test_e2e_with_subscription_but_no_access_gets_403" time="17.823" /><testcase classname="test.e2e.tests.test_subscription.TestE2ESubscriptionFlow" name="test_e2e_single_subscription_auto_selects" time="17.569" /><testcase classname="test.e2e.tests.test_subscription.TestE2ESubscriptionFlow" name="test_e2e_multiple_subscriptions_separate_keys_gets_200" time="17.482" /><testcase classname="test.e2e.tests.test_subscription.TestE2ESubscriptionFlow" name="test_e2e_mint_api_key_denied_for_inaccessible_subscription" time="17.706" /><testcase classname="test.e2e.tests.test_subscription.TestE2ESubscriptionFlow" name="test_e2e_group_based_access_gets_200" time="17.093" /><testcase classname="test.e2e.tests.test_subscription.TestE2ESubscriptionFlow" name="test_e2e_group_based_auth_but_no_subscription_gets_403" time="17.183" /><testcase classname="test.e2e.tests.test_subscription.TestE2ESubscriptionFlow" name="test_e2e_group_based_subscription_but_no_auth_gets_403" time="17.531" /><testcase classname="test.e2e.tests.test_subscription.TestStatusReporting" name="test_subscription_active_status_with_valid_model" time="9.197" /><testcase classname="test.e2e.tests.test_subscription.TestStatusReporting" name="test_subscription_failed_status_with_missing_model" time="8.741" /><testcase classname="test.e2e.tests.test_subscription.TestStatusReporting" name="test_authpolicy_active_status_with_valid_model" time="8.783" /><testcase classname="test.e2e.tests.test_subscription.TestStatusReporting" name="test_authpolicy_failed_status_with_missing_model" time="8.772" /><testcase classname="test.e2e.tests.test_subscription.TestStatusReporting" name="test_subscription_degraded_status_with_partial_models" time="9.085" /><testcase classname="test.e2e.tests.test_subscription.TestStatusReporting" name="test_authpolicy_degraded_status_with_partial_models" time="8.742" /><testcase classname="test.e2e.tests.test_subscription.TestStatusReporting" name="test_subscription_status_transitions_on_model_deletion" time="24.376" /><testcase classname="test.e2e.tests.test_models_endpoint.TestModelsEndpoint" name="test_single_subscription_auto_select" time="39.984" /><testcase classname="test.e2e.tests.test_models_endpoint.TestModelsEndpoint" name="test_explicit_subscription_header" time="16.748" /><testcase classname="test.e2e.tests.test_models_endpoint.TestModelsEndpoint" name="test_empty_subscription_header_value" time="8.408" /><testcase classname="test.e2e.tests.test_models_endpoint.TestModelsEndpoint" name="test_models_filtered_by_subscription" time="8.828" /><testcase classname="test.e2e.tests.test_models_endpoint.TestModelsEndpoint" name="test_deduplication_same_model_multiple_refs" time="17.116" /><testcase classname="test.e2e.tests.test_models_endpoint.TestModelsEndpoint" name="test_different_modelrefs_same_model_id" time="17.176" /><testcase classname="test.e2e.tests.test_models_endpoint.TestModelsEndpoint" name="test_multiple_distinct_models_in_subscription" time="17.105" /><testcase classname="test.e2e.tests.test_models_endpoint.TestModelsEndpoint" name="test_user_token_returns_all_models" time="14.426" /><testcase classname="test.e2e.tests.test_models_endpoint.TestModelsEndpoint" name="test_user_token_with_subscription_header_filters" time="17.079" /><testcase classname="test.e2e.tests.test_models_endpoint.TestModelsEndpoint" name="test_empty_model_list" time="8.735" /><testcase classname="test.e2e.tests.test_models_endpoint.TestModelsEndpoint" name="test_response_schema_matches_openapi" time="8.420" /><testcase classname="test.e2e.tests.test_models_endpoint.TestModelsEndpoint" name="test_model_metadata_preserved" time="8.410" /><testcase classname="test.e2e.tests.test_models_endpoint.TestModelsEndpoint" name="test_api_key_scoped_to_subscription" time="17.088" /><testcase classname="test.e2e.tests.test_models_endpoint.TestModelsEndpoint" name="test_api_key_with_deleted_subscription_403" time="25.099" /><testcase classname="test.e2e.tests.test_models_endpoint.TestModelsEndpoint" name="test_api_key_with_inaccessible_subscription_403" time="17.390" /><testcase classname="test.e2e.tests.test_models_endpoint.TestModelsEndpoint" name="test_invalid_subscription_header_403" time="17.042" /><testcase classname="test.e2e.tests.test_models_endpoint.TestModelsEndpoint" name="test_access_denied_to_subscription_403" time="17.686" /><testcase classname="test.e2e.tests.test_models_endpoint.TestModelsEndpoint" name="test_api_key_ignores_subscription_header" time="25.784" /><testcase classname="test.e2e.tests.test_models_endpoint.TestModelsEndpoint" name="test_multiple_api_keys_different_subscriptions" time="25.855" /><testcase classname="test.e2e.tests.test_models_endpoint.TestModelsEndpoint" name="test_service_account_token_multiple_subs_no_header" time="16.509" /><testcase classname="test.e2e.tests.test_models_endpoint.TestModelsEndpoint" name="test_service_account_token_multiple_subs_with_header" time="16.515" /><testcase classname="test.e2e.tests.test_models_endpoint.TestModelsEndpoint" name="test_unauthenticated_request_401" time="0.024" /><testcase classname="test.e2e.tests.test_models_endpoint.TestModelsEndpoint" name="test_central_models_endpoint_exempt_from_rate_limiting" time="25.238" /><testcase classname="test.e2e.tests.test_external_models.TestExternalModelDiscovery" name="test_maasmodelref_created" time="7.307" /><testcase classname="test.e2e.tests.test_external_models.TestExternalModelDiscovery" name="test_reconciler_created_httproute" time="0.110" /><testcase classname="test.e2e.tests.test_external_models.TestExternalModelDiscovery" name="test_reconciler_created_backend_service" time="0.109" /><testcase classname="test.e2e.tests.test_external_models.TestExternalModelAuth" name="test_invalid_key_returns_401" time="0.028" /><testcase classname="test.e2e.tests.test_external_models.TestExternalModelAuth" name="test_no_key_returns_401" time="0.021" /><testcase classname="test.e2e.tests.test_external_models.TestExternalModelEgress" name="test_request_forwarded_returns_200" time="0.248" /><testcase classname="test.e2e.tests.test_external_models.TestExternalModelCleanup" name="test_delete_removes_httproute" time="37.567" /><testcase classname="test.e2e.tests.test_external_oidc.TestOIDCTokenFlow" name="test_oidc_token_can_create_api_key" time="0.123" /><testcase classname="test.e2e.tests.test_external_oidc.TestOIDCTokenFlow" name="test_invalid_oidc_token_gets_401" time="0.131" /><testcase classname="test.e2e.tests.test_external_oidc.TestOIDCTokenFlow" name="test_empty_bearer_token_gets_401" time="0.023" /><testcase classname="test.e2e.tests.test_external_oidc.TestOIDCTokenFlow" name="test_no_auth_header_gets_401" time="0.019" /><testcase classname="test.e2e.tests.test_external_oidc.TestOIDCTokenClaims" name="test_token_contains_groups_claim" time="0.071" /><testcase classname="test.e2e.tests.test_external_oidc.TestOIDCTokenClaims" name="test_token_contains_preferred_username" time="0.065" /><testcase classname="test.e2e.tests.test_external_oidc.TestOIDCTokenClaims" name="test_different_users_have_different_groups" time="0.148" /><testcase classname="test.e2e.tests.test_external_oidc.TestOIDCMultiUser" name="test_bob_sre_can_mint_api_key" time="10.169" /><testcase classname="test.e2e.tests.test_external_oidc.TestOIDCMultiUser" name="test_wrong_password_gets_rejected" time="0.070" /><testcase classname="test.e2e.tests.test_external_oidc.TestOIDCMultiUser" name="test_nonexistent_user_gets_rejected" time="0.060" /><testcase classname="test.e2e.tests.test_external_oidc.TestOIDCModelAccess" name="test_minted_api_key_can_list_models_and_infer" time="20.314" /><testcase classname="test.e2e.tests.test_external_oidc.TestOIDCModelAccess" name="test_revoked_api_key_cannot_access_models" time="0.119"><failure message="AssertionError: API key revocation failed: 500 {&quot;error&quot;:&quot;Exception thrown while generating token&quot;,&quot;exceptionCode&quot;:&quot;AUTH_FAILURE&quot;,&quot;refId&quot;:&quot;003&quot;}&#10;assert 500 in (200, 204)&#10; +  where 500 = &lt;Response [500]&gt;.status_code">self = &lt;test_external_oidc.TestOIDCModelAccess object at 0x7f19a1990ca0&gt;
maas_api_base_url = 'https://maas.apps.e76ed338-6922-4902-af47-9cd9ac6dc741.prod.konfluxeaas.com/maas-api'

    def test_revoked_api_key_cannot_access_models(self, maas_api_base_url: str):
        """API key minted via OIDC can be revoked and then rejected."""
        token = _request_oidc_token()
        key_data = _create_oidc_api_key(maas_api_base_url, token)
        api_key = key_data["key"]
        key_id = key_data["id"]
    
        # Revoke the key using the OIDC token
        revoke_response = requests.delete(
            f"{maas_api_base_url}/v1/api-keys/{key_id}",
            headers={"Authorization": f"Bearer {token}", "Content-Type": "application/json"},
            timeout=30,
            verify=TLS_VERIFY,
        )
&gt;       assert revoke_response.status_code in (200, 204), (
            f"API key revocation failed: {revoke_response.status_code} {revoke_response.text}"
        )
E       AssertionError: API key revocation failed: 500 {"error":"Exception thrown while generating token","exceptionCode":"AUTH_FAILURE","refId":"003"}
E       assert 500 in (200, 204)
E        +  where 500 = &lt;Response [500]&gt;.status_code

test/e2e/tests/test_external_oidc.py:414: AssertionError</failure></testcase><testcase classname="test.e2e.tests.test_external_oidc.TestOIDCMultiTenant" name="test_tenant_b_token_rejected_by_maas" time="0.151" /><testcase classname="test.e2e.tests.test_external_oidc.TestOIDCMultiTenant" name="test_tenant_a_users_are_isolated" time="40.459" /><testcase classname="test.e2e.tests.test_external_oidc.TestOIDCAPIKeyLifecycle" name="test_create_and_revoke_api_key" time="10.193"><failure message="AssertionError: API key revocation failed: 500 {&quot;error&quot;:&quot;Exception thrown while generating token&quot;,&quot;exceptionCode&quot;:&quot;AUTH_FAILURE&quot;,&quot;refId&quot;:&quot;003&quot;}&#10;assert 500 in (200, 204)&#10; +  where 500 = &lt;Response [500]&gt;.status_code">self = &lt;test_external_oidc.TestOIDCAPIKeyLifecycle object at 0x7f19a19909d0&gt;
maas_api_base_url = 'https://maas.apps.e76ed338-6922-4902-af47-9cd9ac6dc741.prod.konfluxeaas.com/maas-api'

    def test_create_and_revoke_api_key(self, maas_api_base_url: str):
        """Full create → revoke lifecycle with OIDC token."""
        token = _request_oidc_token()
    
        # Create
        key_data = _create_oidc_api_key(maas_api_base_url, token, name=f"e2e-revoke-{uuid.uuid4().hex[:8]}")
        key_id = key_data["id"]
    
        # Revoke
        response = requests.delete(
            f"{maas_api_base_url}/v1/api-keys/{key_id}",
            headers={"Authorization": f"Bearer {token}", "Content-Type": "application/json"},
            timeout=30,
            verify=TLS_VERIFY,
        )
&gt;       assert response.status_code in (200, 204), (
            f"API key revocation failed: {response.status_code} {response.text}"
        )
E       AssertionError: API key revocation failed: 500 {"error":"Exception thrown while generating token","exceptionCode":"AUTH_FAILURE","refId":"003"}
E       assert 500 in (200, 204)
E        +  where 500 = &lt;Response [500]&gt;.status_code

test/e2e/tests/test_external_oidc.py:521: AssertionError</failure></testcase><testcase classname="test.e2e.tests.test_external_oidc.TestOIDCHeaderInjection" name="test_injected_username_header_ignored" time="10.228" /><testcase classname="test.e2e.tests.test_external_oidc.TestOIDCHeaderInjection" name="test_injected_group_header_does_not_escalate" time="5.196" /><testcase classname="test.e2e.tests.test_external_oidc.TestOIDCHeaderInjection" name="test_injected_subscription_header_ignored" time="5.207" /><testcase classname="test.e2e.tests.test_external_oidc.TestOIDCHeaderInjection" name="test_injected_username_on_oidc_token_ignored" time="25.268"><failure message="AssertionError: API key mint with injected username header failed: 500 {&quot;error&quot;:&quot;Exception thrown while generating token&quot;,&quot;exceptionCode&quot;:&quot;AUTH_FAILURE&quot;,&quot;refId&quot;:&quot;003&quot;}&#10;assert 500 in (200, 201)&#10; +  where 500 = &lt;Response [500]&gt;.status_code">self = &lt;test_external_oidc.TestOIDCHeaderInjection object at 0x7f19a1990fd0&gt;
maas_api_base_url = 'https://maas.apps.e76ed338-6922-4902-af47-9cd9ac6dc741.prod.konfluxeaas.com/maas-api'

    def test_injected_username_on_oidc_token_ignored(self, maas_api_base_url: str):
        """Client-supplied X-MaaS-Username with a raw OIDC token (not API key) is ignored.
    
        Use a raw OIDC bearer token (not an API key) and inject a spoofed
        username. The minted API key should still reflect the real OIDC
        identity, not the injected header.
        """
        token = _request_oidc_token(username="alice_lead", password="letmein")
    
        # Mint an API key while injecting a spoofed username header.
        # Retry on empty 403 (gateway propagation) and 401 (Authorino JWKS loading).
        url = f"{maas_api_base_url}/v1/api-keys"
        retries, delay = 6, 5
        for attempt in range(1, retries + 1):
            response = requests.post(
                url,
                headers={
                    "Authorization": f"Bearer {token}",
                    "Content-Type": "application/json",
                    "X-MaaS-Username": "bob_sre",
                },
                json={"name": f"e2e-oidc-inject-{uuid.uuid4().hex[:8]}"},
                timeout=30,
                verify=TLS_VERIFY,
            )
            if (response.status_code == 403 and not response.text.strip()) \
                    or response.status_code == 401 \
                    or (response.status_code == 500 and "AUTH_FAILURE" in response.text):
                if attempt &lt; retries:
                    log.info("OIDC inject test got %d (attempt %d/%d), retrying in %ds...",
                             response.status_code, attempt, retries, delay)
                    time.sleep(delay)
                    continue
            break
&gt;       assert response.status_code in (200, 201), (
            f"API key mint with injected username header failed: "
            f"{response.status_code} {response.text}"
        )
E       AssertionError: API key mint with injected username header failed: 500 {"error":"Exception thrown while generating token","exceptionCode":"AUTH_FAILURE","refId":"003"}
E       assert 500 in (200, 201)
E        +  where 500 = &lt;Response [500]&gt;.status_code

test/e2e/tests/test_external_oidc.py:724: AssertionError</failure></testcase></testsuite></testsuites>