From ee840ed1a637b21112177c71229be0528707b070 Mon Sep 17 00:00:00 2001 From: Bruce Schultz Date: Fri, 15 Mar 2024 13:56:16 +0100 Subject: [PATCH] chore(kong): reactivate IDP security for kong eps --- gateway/routers/kong.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gateway/routers/kong.py b/gateway/routers/kong.py index f24be8e..958d7f7 100644 --- a/gateway/routers/kong.py +++ b/gateway/routers/kong.py @@ -3,18 +3,19 @@ from typing import Annotated import kong_admin_client -from fastapi import APIRouter, HTTPException, Body, Path +from fastapi import APIRouter, HTTPException, Body, Path, Security from kong_admin_client import CreateServiceRequest, Service, CreateRouteRequest, CreatePluginForConsumerRequest, \ ListRoute200Response, CreateConsumerRequest, CreateAclForConsumerRequest, CreateKeyAuthForConsumerRequest from kong_admin_client.rest import ApiException from starlette import status +from gateway.auth import idp_oauth2_scheme from gateway.conf import gateway_settings from gateway.models.kong import ServiceRequest, HttpMethodCode, ProtocolCode, LinkDataStoreProject, \ Disconnect, LinkProjectAnalysis kong_router = APIRouter( - # dependencies=[Security(idp_oauth2_scheme)], + dependencies=[Security(idp_oauth2_scheme)], tags=["Kong"], responses={404: {"description": "Not found"}}, )