메인 콘텐츠로 건너뛰기

개요

이 섹션에서는 어플리케이션을 Casdoor에 연결하는 방법을 보여드리겠습니다.

서비스 제공자(SP)로서, Casdoor는 두 가지 인증 프로토콜을 지원합니다:

  • OAuth 2.0 (OIDC)
  • SAML

아이덴티티 제공자(IdP)로서, Casdoor는 네 가지 인증 프로토콜을 지원합니다:

  • OAuth 2.0
  • OIDC
  • SAML
  • CAS 1.0, 2.0, 3.0

OAuth 2.0 (OIDC)

OAuth 2.0이란 무엇인가요?

OAuth 2는 Facebook, GitHub, Casdoor와 같은 애플리케이션들이 HTTP 서비스에서 사용자 계정에 제한적인 접근을 허용하는 인증 프레임워크입니다. It works by delegating user authentication to the service that hosts the user account and authorizing third-party applications to access that account. OAuth 2 provides authorization flows for web applications, desktop applications, and mobile devices.

Casdoor의 인증 과정은 OAuth 2.0 프로토콜을 기반으로 구축되었습니다. We recommend using OAuth 2.0 for the following reasons:

  1. The protocol is simple, easy to implement, and can address many authentication scenarios.
  2. 높은 성숙도 수준을 가지고 있으며, 광범위한 커뮤니티 지원이 있습니다.

따라서, 귀하의 애플리케이션은 OAuth 2.0 (OIDC)를 통해 Casdoor와 통신할 것입니다. Casdoor에 연결하는 세 가지 방법이 있습니다:

표준 OIDC 클라이언트

Standard OIDC client: Use a standard OIDC client implementation, which is widely available in any programming language or framework.

OIDC란 무엇인가요?

OpenID Connect (OIDC)는 OAuth 2.0 프레임워크 위에서 작동하는 오픈 인증 프로토콜입니다. Targeted toward consumers, OIDC allows individuals to use single sign-on (SSO) to access relying party sites using OpenID Providers (OPs), such as email providers or social networks, to authenticate their identities. It provides applications or services with information about the user, the context of their authentication, and access to their profile information.

Casdoor는 OIDC 프로토콜을 완벽하게 지원합니다. 만약 귀하의 애플리케이션이 이미 표준 OIDC 클라이언트 라이브러리를 통해 다른 OAuth 2.0 (OIDC) 아이덴티티 제공자를 사용하고 있고, Casdoor로 이전하려는 경우, OIDC discovery를 사용하면 Casdoor로 전환하는 것이 매우 쉬워집니다.

Casdoor SDKs

Casdoor SDKs: For most programming languages, Casdoor provides easy-to-use SDK libraries built on top of OIDC, with extended functionality that is only available in Casdoor.

Compared to the standard OIDC protocol, Casdoor's SDK provides additional functionality, such as user management and resource uploading. 표준 OIDC 클라이언트 라이브러리를 사용하는 것보다 Casdoor SDK를 통해 Casdoor에 연결하는 데 더 많은 시간이 필요하지만, 가장 유연성이 높고 가장 강력한 API를 제공합니다.

Casdoor 플러그인

Casdoor plugin: If your application is built on top of a popular platform (such as Spring Boot, WordPress, etc.) and Casdoor (or a third party) has already provided a plugin or middleware for it, you should use it. Using a plugin is much easier than manually invoking the Casdoor SDK because plugins are specifically designed for their target platform.

플러그인:

미들웨어:

SAML

SAML이란 무엇인가요?

보안 주장 마크업 언어(Security Assertion Markup Language, SAML)는 신원 제공자(IdP)가 서비스 제공자(SP)에게 인증 자격을 전달할 수 있게 하는 오픈 표준입니다. This means you can use one set of credentials to log into many different websites. It's much simpler to manage one login per user than to manage separate logins for email, customer relationship management (CRM) software, Active Directory, etc.

SAML 트랜잭션은 신원 제공자와 서비스 제공자 간의 표준화된 통신을 위해 확장 가능한 마크업 언어(XML)를 사용합니다. SAML은 사용자의 신원 인증과 서비스 사용 권한 부여 사이의 연결고리입니다.

Casdoor는 SAML IdP로 사용될 수 있습니다. 현재, Casdoor는 SAML 2.0의 주요 기능을 지원합니다. 자세한 내용은 SAML을 참조하십시오.

예시:

Keycloak에서의 Casdoor를 SAML IdP로 사용

제안:

  1. 프로토콜은 강력하며, 많은 시나리오를 커버하므로 가장 포괄적인 SSO 프로토콜 중 하나입니다.
  2. 프로토콜은 큽니다, 많은 선택적 매개변수가 있으므로 실제 구현에서 모든 애플리케이션 시나리오를 100% 커버하는 것은 어렵습니다.
  3. 애플리케이션이 새로 개발된 경우, 기술적 복잡성이 높기 때문에 SAML은 권장되지 않습니다.

CAS

CAS란 무엇인가요?

중앙 인증 서비스(Central Authentication Service, CAS)는 웹을 위한 단일 로그인 프로토콜입니다. 그 목적은 사용자가 자신의 자격 증명(예: 사용자 ID와 비밀번호)을 한 번만 제공하면서 여러 애플리케이션에 접근할 수 있게 하는 것입니다. 또한, 웹 애플리케이션은 사용자의 보안 자격 증명, 예를 들어 비밀번호에 접근하지 않고도 사용자를 인증할 수 있습니다.

Casdoor는 CAS 1.0, 2.0, 3.0 기능을 구현했습니다. 자세한 내용은 CAS를 참조하십시오.

제안:

  1. 프로토콜 자체는 상대적으로 가볍고 구현하기 쉽지만, 단일 시나리오만 해결할 수 있습니다.
  2. CAS 클라이언트와 CAS 서버 간의 상호 신뢰는 암호화나 서명 메커니즘 없이 인터페이스 호출을 통해 확립되어 추가적인 보안을 보장합니다.
  3. CAS 프로토콜은 다른 프로토콜에 비해 장점이 없습니다.

통합 테이블

일부 애플리케이션은 이미 Casdoor에 연결하는 예제를 가지고 있습니다. 문서를 따라 Casdoor에 빠르게 연결할 수 있습니다. 통합 테이블에서 모든 애플리케이션을 볼 수 있습니다.