mTLS를 활용한 발신자 제약 토큰
상호 TLS 클라이언트 인증서 바인딩이 전달자 토큰을 발신자 제약 토큰으로 바꾸어 도난당한 토큰을 공격자가 재생하지 못하도록 하는 방법을 학습합니다.
mTLS를 활용한 발신자 제약 토큰은(는) CoddyKit의 무료 OAuth2 & OpenID Connect Deep Dive 강의입니다. 이것은 4개 중 4번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 OAuth2 & OpenID Connect Deep Dive 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. OAuth2 & OpenID Connect Deep Dive 강의에는 총 4개의 강의가 포함되어 있습니다.
이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.
The Bearer Token Weakness
A plain bearer token works for anyone who holds it. If it leaks via logs, a proxy, or an XSS bug, the thief can use it freely. Sender-constrained tokens fix this by binding the token to the legitimate client.
What Is mTLS?
Mutual TLS means both sides present certificates: the server proves its identity (as usual) and the client also presents a certificate. The authorization server can then bind issued tokens to that client certificate.
RFC 8705
This is standardized in RFC 8705 (OAuth 2.0 Mutual-TLS Client Authentication and Certificate-Bound Access Tokens). It covers both client authentication via mTLS and certificate binding of access tokens.
The cnf Claim
When the AS issues a certificate-bound token, it records a confirmation (cnf) claim containing the SHA-256 thumbprint of the client certificate under the key x5t#S256.
{
"sub": "client-app",
"cnf": {
"x5t#S256": "bwcK0esc3ACC3DB2Y5_lESsXE8o9ltc05O89jdN-dg2"
}
}Resource Server Check
When the client calls an API over mTLS, the resource server computes the thumbprint of the presented certificate and compares it to the token's cnf.x5t#S256. If they differ, the token is rejected.
thumb = sha256(der_of_client_cert)
if base64url(thumb) != token.cnf['x5t#S256']:
reject('certificate binding mismatch')Why a Stolen Token Is Useless
Even with the token, an attacker cannot present the client's private key, so they cannot complete the mTLS handshake with the matching certificate. The thumbprint will not match, and the API rejects them.
mTLS Client Authentication
RFC 8705 also lets clients authenticate at the token endpoint with their certificate instead of a shared secret, using methods tls_client_auth (PKI) or self_signed_tls_client_auth.
mTLS Endpoint Aliases
Because mTLS needs a separate TLS configuration, providers publish mtls_endpoint_aliases in discovery so clients hit the certificate-bound versions of the token and other endpoints.
{
"mtls_endpoint_aliases": {
"token_endpoint": "https://mtls.op.example.com/token"
}
}mTLS vs DPoP
Both achieve sender-constraint:
- mTLS — relies on TLS-layer certificates, great for server-to-server and infrastructure with PKI.
- DPoP — application-layer proof JWTs, better for browser/public clients that cannot manage client certs.
Operational Considerations
mTLS requires certificate provisioning, rotation, and a TLS terminator that forwards the client cert to your app. Plan for cert lifecycle and ensure your reverse proxy passes the verified certificate to the resource server.
When to Adopt It
Choose mTLS-bound tokens for high-assurance, regulated, or financial-grade APIs and trusted backend services where certificate management is feasible. It dramatically raises the cost of token theft.
Quick Check
Test your mTLS binding knowledge.
Recap
mTLS sender-constrained tokens (RFC 8705) bind a token to the client's certificate.
- The token carries a
cnf.x5t#S256certificate thumbprint. - Resource servers match the presented cert's thumbprint; a stolen token without the private key fails.
- mTLS also enables certificate-based client authentication and uses mtls endpoint aliases.
- Compare with DPoP for public clients.
자주 묻는 질문
“mTLS를 활용한 발신자 제약 토큰” 강의는 무료인가요?
네 — “mTLS를 활용한 발신자 제약 토큰” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 OAuth2 & OpenID Connect Deep Dive 강의 전체를 잠금 해제할 수 있습니다. OAuth2 & OpenID Connect Deep Dive 강의에는 총 4개의 강의가 포함되어 있습니다.
“mTLS를 활용한 발신자 제약 토큰”에서 뭘 배우나요?
상호 TLS 클라이언트 인증서 바인딩이 전달자 토큰을 발신자 제약 토큰으로 바꾸어 도난당한 토큰을 공격자가 재생하지 못하도록 하는 방법을 학습합니다. 브라우저에서 직접 실행하는 실습 코드로 OAuth2 & OpenID Connect Deep Dive을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.
OAuth2 & OpenID Connect Deep Dive을(를) 시작하는 데 경험이 필요한가요?
사전 경험은 필요하지 않습니다. CoddyKit의 OAuth2 & OpenID Connect Deep Dive은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 4번째 강의입니다.
“mTLS를 활용한 발신자 제약 토큰” 강의는 얼마나 걸리나요?
대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.
이 OAuth2 & OpenID Connect Deep Dive 강의에서 코드를 작성하고 실행할 수 있나요?
네. 모든 OAuth2 & OpenID Connect Deep Dive 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.
이 강의의 모든 강의
- 동의 및 사용자 경험
- 교차 출처 리소스 공유(CORS)
- 프런트 채널과 백 채널 로그아웃 비교
- mTLS를 활용한 발신자 제약 토큰