이 주제에서는 Apigee 또는 Apigee Hybrid에서 실행되는 API 프록시의 흐름 변수에서 TLS 연결 정보에 액세스하는 방법을 설명합니다.
TLS 연결 정보 캡처
Apigee는 API 프록시에 대한 요청 중에 TLS 연결 정보를 캡처할 수 있습니다. 그런 다음 API 프록시가 흐름 변수를 통해 해당 정보에 액세스하여 추가 분석과 유효성 검사를 수행할 수 있습니다.
Apigee에서 캡처한 TLS 정보 유형은 인그레스가 단방향 또는 양방향 TLS (Apigee Hybrid에서만 사용 가능)를 지원하도록 구성되었는지 여부에 따라 다릅니다. 예를 들어 단방향 TLS의 경우 Apigee는 TLS 연결에 사용되는 TLS 암호화나 TLS 프로토콜에 대한 정보를 캡처할 수 있습니다.
양방향 TLS의 경우 Apigee는 단방향 TLS에서 캡처한 정보와 동일한 정보를 모두 캡처하고 클라이언트 인증서에 대한 정보도 캡처할 수 있습니다. 예를 들어 Apigee는 클라이언트 인증서의 SHA1 지문과 PEM 형식의 클라이언트 인증서를 캡처할 수 있습니다.
단방향 및 양방향 TLS 모두에 대한 정보 캡처
다음 표에는 Apigee 및 Apigee Hybrid에서 캡처한 TLS 연결 정보가 포함되어 있고 API 프록시에서 액세스할 수 있는 흐름 변수가 나와 있습니다.
흐름 변수
설명
tls.cipher
TLS 연결에 사용되는 암호화입니다.
tls.protocol
TLS 연결에 사용되는 프로토콜입니다.
tls.server.name
요청된 SNI 서버 이름입니다.
tls.session.id
세션 식별자입니다.
양방향 TLS 중에 추가 TLS 정보 캡처
다음 표에는 Apigee Hybrid가 양방향 TLS에서 캡처한 클라이언트 인증서 세부정보가 포함된 흐름 변수가 나와 있습니다.
흐름 변수
설명
tls.client.s.dn
클라이언트 인증서의 주제 고유 이름(DN)입니다.
tls.client.i.dn
클라이언트 인증서의 발급기관 고유 이름(DN)입니다.
tls.client.raw.cert
PEM 형식의 클라이언트 인증서입니다.
tls.client.cert.serial
클라이언트 인증서의 일련번호입니다.
tls.client.cert.fingerprint
클라이언트 인증서의 SHA1 지문입니다.
tls.session.id
세션 식별자입니다.
양방향 TLS를 사용 설정하도록 Apigee Hybrid 구성
클라이언트 인증서를 요청하도록 인그레스를 구성하려면 재정의 파일에 다음 세부정보를 추가합니다.
[[["이해하기 쉬움","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-08-18(UTC)"],[[["\u003cp\u003eThis page outlines how Apigee and Apigee hybrid capture and provide access to TLS connection information through flow variables within an API proxy.\u003c/p\u003e\n"],["\u003cp\u003eApigee captures TLS details such as cipher, protocol, server name, and session ID for both one-way and two-way TLS connections.\u003c/p\u003e\n"],["\u003cp\u003eFor two-way TLS, Apigee hybrid additionally captures client certificate information, including the subject and issuer Distinguished Names, raw certificate data, serial number, and fingerprint.\u003c/p\u003e\n"],["\u003cp\u003eAPI proxies can access and utilize these TLS flow variables through policies like AssignMessage or JavaScript, or within flow conditions and routing rules.\u003c/p\u003e\n"],["\u003cp\u003eEnabling two-way TLS on Apigee hybrid requires configuring the ingress to request client certificates.\u003c/p\u003e\n"]]],[],null,["# Accessing TLS connection information in an API proxy\n\n*This page\napplies to **Apigee** and **Apigee hybrid**.*\n\n\n*View [Apigee Edge](https://docs.apigee.com/api-platform/get-started/what-apigee-edge) documentation.*\n\n\nThis topic explains how to access TLS connection information in flow variables for an API proxy\nrunning on Apigee or Apigee hybrid.\n\nCapturing TLS connection information\n------------------------------------\n\n\nDuring a request to an API proxy, Apigee can capture information about the TLS connection. Your\nAPI proxy can then access that information through flow variables to perform additional\nanalysis and validation.\n\n\nThe type of TLS information captured by Apigee depends on whether the Ingress is configured to\nsupport one-way or two-way TLS (only applicable with Apigee hybrid). For example, for one-way\nTLS, Apigee can capture information about the TLS cipher or TLS protocol used in the TLS connection.\n\n\nFor two-way TLS, Apigee can capture all of the same information as captured for one-way TLS,\nand also capture information about the client's cert. For example, Apigee can capture the\nSHA1 fingerprint of the client cert and the client cert in the PEM format.\n\n### Capturing information for both one-way and two-way TLS\n\n\nThe following table lists the flow variables that contain TLS connection information captured by\nApigee and Apigee hybrid, and available for access in the API proxy.\n\n### Capturing additional TLS information during two-way TLS\n\n| **Note:**Enabling mTLS only applies to Apigee hybrid.\n\n\nThe following table lists the flow variables that contain client cert details captured by\nApigee hybrid in two-way TLS:\n\nConfiguring Apigee hybrid to enable two-way TLS\n-----------------------------------------------\n\n\nTo configure the ingress to request a client certificate, add the following details to the\noverrides file: \n\n```text\nvirtualhosts:\n - name: internal\n minTLSProtocolVersion: \"1.2\" #optional\n maxTLSProtocolVersion: \"1.2\" #optional\n tlsMode: MUTUAL\n sslSecret: tls-certificates\n```\n\n\nSee also [Configuring TLS and mTLS on the Istio\ningress](/apigee/docs/hybrid/latest/ingress-tls).\n\nAccessing the flow variables in an API proxy\n--------------------------------------------\n\n\nFrom within your API proxy, you can access and inspect the TLS flow variables. For example, you can\nuse the [AssignMessage](/apigee/docs/api-platform/reference/policies/assign-message-policy) or\n[JavaScript](/apigee/docs/api-platform/reference/policies/javascript-policy) policy to access them.\n\n\nYou can also reference the flow variables in a `\u003cCondition\u003e` element of a proxy or\ntarget flow, or in a `\u003cStep\u003e` or `\u003cRouteRule\u003e`. For example, you could\nroute a request to different targets based on the SN of the client.\n\n\nFor more, see:\n\n- [Overview of flow variables](/apigee/docs/api-platform/fundamentals/introduction-flow-variables)\n- [Controlling how a proxy executes with flows](/apigee/docs/api-platform/fundamentals/what-are-flows)"]]