展示 HN:Kratos - 云原生 Auth0 开源替代方案(自托管)
Kratos - Cloud native Auth0 open-source alternative (self-hosted)

原始链接: https://github.com/ory/kratos

## Ory Kratos:云原生身份与用户管理 Ory Kratos 是一款 API 优先的系统,专为管理现代云原生应用程序中的身份和用户帐户而设计。它集中了登录、注册、帐户恢复和个人资料管理等基本功能,使开发者无需重复实现这些功能。 Kratos 在可扩展性方面表现出色,可与 Kubernetes 和其他云平台无缝集成。它可以作为托管服务部署在 Ory Network 上——提供多因素身份验证和 GDPR 友好的存储等功能——或者可以自行托管以获得完全控制权。商业企业许可证增加了 SCIM、SAML 和保证的安全更新等功能。 对于从 Auth0 或 Okta 等提供商迁移的用户,Ory Kratos 结合 Ory Hydra(用于 OAuth2/OpenID Connect),可以作为一种潜在的直接替换方案。它是一个功能强大的解决方案,拥有蓬勃发展的社区,目前每天保护数十亿个 API 请求。

## Kratos:一个自托管的Auth0替代方案 - 摘要 Ory Kratos是一个开源的身份提供商(IdP),旨在成为Auth0的自托管替代方案。用户报告称,在适度的Kubernetes资源使用下,成功部署处理了数百万用户和高查询量。虽然功能强大且灵活,具有功能齐全的API,但文档是一个常见的痛点,一些人甚至使用AI工具来解读它。 一些评论员讨论了替代方案。Keycloak是一个成熟的选择,但有些人觉得它很复杂。Authentik是另一个受欢迎的选择,但一些人也提到文档存在问题。Zitadel也被提及为一种可行的替代方案。 一个关键的讨论点围绕着Ory的许可。虽然核心是开源的,但SAML、SCIM和SSO等功能是商业企业许可的一部分,引发了关于其“开放性”的争论。Ory Polis提供SAML/SCIM支持,作为一个单独的开源项目。人们也对在传统关系数据库(如MySQL或Postgres)中存储身份验证数据安全性表示担忧,提倡更安全、分布式存储解决方案。
相关文章

原文

Ory Kratos is an API first identity and user management system for cloud native applications. It centralizes login, registration, recovery, verification, and profile management flows so your services consume them instead of reimplementing them.

Table of contents

Ory Kratos is an API first identity and user management system that follows cloud architecture best practices. It focuses on core identity workflows that almost every application needs:

  • Self service login and registration
  • Account verification and recovery
  • Multi factor authentication
  • Profile and account management
  • Identity schemas and traits
  • Admin APIs for lifecycle management

We recommend starting with the Ory Kratos introduction docs to learn more about its architecture, feature set, and how it compares to other systems.

Ory Kratos is designed to:

  • Remove identity logic from your application code and expose it over HTTP APIs
  • Work well with any UI framework through browser based and native app flows
  • Scale to large numbers of identities and devices
  • Integrate with the rest of the Ory stack for OAuth2, OpenID Connect, and access control
  • Fit into modern cloud native environments such as Kubernetes and managed platforms

Migrating from Auth0, Okta, and similar providers

If you are migrating from Auth0, Okta, or another identity provider that uses OAuth2 / OpenID Connect based login, consider using Ory Hydra + Ory Kratos together:

  • Ory Hydra acts as the OAuth2 and OpenID Connect provider and can replace most authorization server and token issuing capabilities of your existing IdP.
  • Ory Kratos provides identity, credentials, and user-facing flows (login, registration, recovery, verification, profile management).

This combination is often a drop-in replacement for OAuth2 and OpenID Connect capabilities at the protocol level. In practice, you update client configuration and endpoints to point to Hydra, migrate identities into Kratos, and keep your applications speaking the same OAuth2 / OIDC protocols they already use.

You can run Ory Kratos in two main ways:

  • As a managed service on the Ory Network
  • As a self hosted service under your own control, with or without the Ory Enterprise License

Use Ory Kratos on the Ory Network

The Ory Network is the fastest way to use Ory services in production. Ory Identities is powered by the open source Ory Kratos server and is API compatible.

The Ory Network provides:

  • Identity and credential management that scales to billions of users and devices
  • Registration, login, and account management flows for passkeys, biometrics, social login, SSO, and multi factor authentication
  • Prebuilt login, registration, and account management pages and components
  • OAuth2 and OpenID Connect for single sign on, API access, and machine to machine authorization
  • Low latency permission checks based on the Zanzibar model with the Ory Permission Language
  • GDPR friendly storage with data locality and compliance in mind
  • Web based Ory Console and Ory CLI for administration and operations
  • Cloud native APIs compatible with the open source servers
  • Fair, usage based pricing

Sign up for a free developer account to get started.

You can run Ory Kratos yourself for full control over infrastructure, deployment, and customization.

The install guide explains how to:

  • Install Kratos on Linux, macOS, Windows, and Docker
  • Configure databases such as PostgreSQL, MySQL, and CockroachDB
  • Deploy to Kubernetes and other orchestration systems
  • Build Kratos from source

This guide uses the open source distribution to get you started without license requirements. It is a great fit for individuals, researchers, hackers, and companies that want to experiment, prototype, or run unimportant workloads without SLAs. You get the full core engine, and you are free to inspect, extend, and build it from source.

If you run Kratos as part of a business-critical system, for example login and account recovery for all your users, you should use a commercial agreement to reduce operational and security risk. The Ory Enterprise License (OEL) layers on top of self-hosted Kratos and provides:

  • Additional enterprise features that are not available in the open source version such as SCIM, SAML, organization login ("SSO"), CAPTCHAs and more
  • Regular security releases, including CVE patches, with service level agreements
  • Support for advanced scaling, multi-tenancy, and complex deployments
  • Premium support options with SLAs, direct access to engineers, and onboarding help
  • Access to a private Docker registry with frequent and vetted, up-to-date enterprise builds

For guaranteed CVE fixes, current enterprise builds, advanced features, and support in production, you need a valid Ory Enterprise License and access to the Ory Enterprise Docker registry. To learn more, contact the Ory team.

Install the Ory CLI and create a new project to try Ory Identities.

# Install the Ory CLI if you do not have it yet:
bash <(curl https://raw.githubusercontent.com/ory/meta/master/install.sh) -b . ory
sudo mv ./ory /usr/local/bin/

# Sign in or sign up
ory auth

# Create a new project
ory create project --create-workspace "Ory Open Source" --name "GitHub Quickstart"  --use-project
ory open ax login

The Ory community stands on the shoulders of individuals, companies, and maintainers. The Ory team thanks everyone involved - from submitting bug reports and feature requests, to contributing patches and documentation. The Ory community counts more than 50.000 members and is growing. The Ory stack protects 7.000.000.000+ API requests every day across thousands of companies. None of this would have been possible without each and everyone of you!

The following list represents companies that have accompanied us along the way and that have made outstanding contributions to our ecosystem. If you think that your company deserves a spot here, reach out to [email protected] now!

Many thanks to all individual contributors

联系我们 contact @ memedata.com