본문 바로가기
개발 자료/인증

OAuth2.0 vs OIDC 차이점 정리

by Jay Son 아기 냥이 해린 짱💖 2024. 5. 26.

주요내용

OAuth2.0과 OIDC 차이점 정리 (세부 내용 Skip)

OAuth2.0 인증 Flow 경우 차이점 비교를 위해 간략히 통합 Flow로 작성(세부 Flow는 하단 공식 문서 링크 확인)

OAuth 2.0

1. OAuth 2.0 사용 목적: 별도 회원가입 없이 기존 계정으로 서비스 이용가능, 사용자는 비밀번호를 서비스에 제공하지 않아도 됨

2. OAuth 2.0 인증 Flow

OAuth2.0 인증 Flow

    

OIDC

OAuth 2.0 프레임워크를 기반 OpenID Connect Protocol 제공공

출처: OIDC 공식 사이트(하단 링크 참고)

1. OAuth2.0 Flow vs OIDC 인증 Flow

차이점

1. OAuth2.0을 사용 할 경우 리소스 서버에서는 사용자 접근 권한만 확인 가능

2. OIDC 인증을 진행 할 경우 리소스 서버에서는 사용자 접근 권한 및 사용자 인증 가능

3. OIDC 인증 적용 할 경우 SSO 적용으로 개인 맞춤형 서비스 제공 가능.

출처: Gemini 1.5 Advanced

PlantUML 코드

OAuth2.0 인증 Flow

@startuml
autonumber
title OAuth2.0 인증 Flow

participant "클라이언트(앱)" as client
participant "인증 서버" as as
participant "리소스 서버" as rs

group "사용자 인증
client -> as: 인증 요청(ID/PW)
as -> client: 인증 코드 발급
end
group#lightblue "토큰 발급"
client -> as: Asscess Token 요청
as -> client: Asscess Token 발급
end

group "서비스 사용"
client -> rs: Asscess Token을 이용한 API 호출
rs -> client: 서비스 제공
end
@enduml

OIDC 인증 Flow

@startuml
autonumber
title OIDC 인증 Flow

participant "클라이언트(앱)" as client
participant "인증 서버" as as
participant "리소스 서버" as rs

group "사용자 인증
client -> as: 인증 요청(ID/PW)
as -> client: 인증 코드 발급
end
group#lightblue "토큰 발급"
client -> as: Asscess Token 요청
as -> client: Asscess Token +  <color:red>ID Token</color> 발급
end

group "서비스 사용"
client -> rs: Asscess Token을 이용한 API 호출
rs -> client: 서비스 제공
end
@enduml

참고 자료

1. OAuth2.0 공식 문서: https://datatracker.ietf.org/doc/html/rfc6749

 

RFC 6749: The OAuth 2.0 Authorization Framework

The OAuth 2.0 authorization framework enables a third-party application to obtain limited access to an HTTP service, either on behalf of a resource owner by orchestrating an approval interaction between the resource owner and the HTTP service, or by allowi

datatracker.ietf.org

2. OIDC 공식 문서: https://openid.net/specs/openid-connect-core-1_0.html

 

Final: OpenID Connect Core 1.0 incorporating errata set 2

 

openid.net

3. OIDC 공식 문서2: https://openid.net/developers/how-connect-works/

 

How OpenID Connect Works - OpenID Foundation

What is OpenID Connect OpenID Connect is an interoperable authentication protocol based on the OAuth 2.0 framework of specifications (IETF RFC 6749 and 6750). It simplifies the way to verify the identity of users based on the authentication performed by an

openid.net

4. 마이크로소프트웨어 인증 플랫폼 문서 : https://learn.microsoft.com/en-us/entra/identity-platform/

 

Microsoft identity platform documentation - Microsoft identity platform

Use Microsoft Entra with OAuth 2.0 and OpenID Connect (OIDC) to protect the apps and web APIs you build. Learn how to sign in users and manage their access through our quickstarts, tutorials, code samples, and API reference documentation.

learn.microsoft.com

 

반응형