OAuth 보안이 설정된 Apigee에서 API 프록시를 호출할 때는 Apigee가 액세스 토큰 확인을 수행합니다. Apigee는 게이트키퍼 역할을 수행합니다. 확인 가능한 액세스 토큰이 없는 API 호출은 통과할 수 없습니다.
VerifyAccessToken 정책 추가
토큰 확인을 구성하려면 API 프록시 흐름의 시작 부분(ProxyEndpoint Preflow의 시작)에 VerifyAccessToken 작업이 포함된 OAuthV2 정책을 배치합니다. 여기에 배치하면 다른 토큰이 실행되기 전에 액세스 토큰이 확인됩니다. 토큰이 거부되면 Apigee가 처리를 중지하고 오류를 클라이언트에 다시 반환합니다.
탐색기에서 프록시 엔드포인트 아래에 나열된 엔드포인트의 PreFlow를 선택합니다. 일반적으로 원하는 엔드포인트를 '기본값'이라고 하지만 프록시 엔드포인트를 여러 개 만들 수 있습니다. 엔드포인트가 여러 개이면 다음 단계를 따라 엔드포인트마다 토큰 확인을 수행할 수 있습니다.
프록시 흐름 편집기에서 + 단계를 클릭합니다.
새 정책 인스턴스를 선택합니다.
정책 목록에서 OAuth v2.0을 선택합니다.
선택적으로 정책 이름 및 표시 이름을 변경합니다. 예를 들어 가독성을 높이기 위해 표시 이름 및 정책 이름을 모두 'VerifyAccessToken'으로 변경할 수 있습니다.
추가를 클릭합니다.
기본 정책이 VerifyAccessToken 작업으로 이미 구성되었으므로 추가 작업이 필요하지 않습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-03-12(UTC)"],[[["This content focuses on configuring OAuth 2.0 access token verification within Apigee and Apigee hybrid API proxies."],["Apigee acts as a gatekeeper, requiring and verifying access tokens for all API calls to ensure security."],["To verify access tokens, an OAuthV2 policy with the VerifyAccessToken operation must be placed at the beginning of the API proxy's flow, specifically the ProxyEndpoint Preflow."],["The default setting for the VerifyAccessToken policy expects the access token to be included in the Authorization header as a Bearer token, but it can be configured to support different types of tokens."],["If encountering an \"Invalid API call as no apiproduct match found\" error, an external community article is provided for troubleshooting steps."]]],[]]