Keycloak需要数据库吗
Does Keycloak need a database
我已将 Keycloak 设置为 SAML 代理,身份验证由当局提供的外部 IdP 完成。使用此 IdP 登录的用户都被接受,我们只需要从 Keycloak 获得一个 OAuth 令牌即可访问我们的系统。
我已经尝试使用 H2 和 运行 外部 MariaDB 的默认设置。
外部 IdP 为我们提供了用户的全名和个人 ID。这两种数据都受 GDPR 保护,我真的不喜欢将这些数据存储在 DMZ 中的数据库 运行ning 中的声音。在后台开放Keycloak访问数据库也不是一个好的解决方案,尤其是当我不需要存储用户的时候。
运行数据库的好处是我有一个更简单的 DMZ 设置,因为我真的不需要存储任何关于用户的信息,而是在后端。
我需要数据库吗?如果不需要,我如何 运行 没有它的 Keycloak?
Do I need a database, and if not how do I run Keycloak without it?
是的,但是,开箱即用的 Keycloak 运行s 无需部署任何外部数据库。从 Keycloak 官方文档部分 Relational Database Setup 可以阅读:
Keycloak comes with its own embedded Java-based relational database
called H2. This is the default database that Keycloak will use to
persist data and really only exists so that you can run the
authentication server out of the box.
所以开箱即用,你不能 运行 Keycloak 没有数据库。
从同一文档中可以看到:
We highly recommend that you replace it with a more production ready external database. The H2 database is not very viable in high concurrency situations and should not be used in a cluster either.
所以关于这个:
The benefit running without a database is that I have a simpler DMZ
setup as I really do not need to store anything about the users but
on the backend.
您最好还是部署另一个数据库,因为 Keycloak 在数据库中存储的不仅仅是用户信息(例如, 领域信息、组、角色等)。
The external IdP provides us with a full name of the user and a
personal ID. Both data are covered by GDPR and I really do not like
the sound of storing that data in a database running in the DMZ.
Opening up for Keycloak to access a database in the backend is also
not a good solution, especially when I do not need users to be stored.
您可以配置 IDP 和 Keycloak,只要用户进行身份验证,用户就不会导入到 Keycloak。
我已将 Keycloak 设置为 SAML 代理,身份验证由当局提供的外部 IdP 完成。使用此 IdP 登录的用户都被接受,我们只需要从 Keycloak 获得一个 OAuth 令牌即可访问我们的系统。 我已经尝试使用 H2 和 运行 外部 MariaDB 的默认设置。
外部 IdP 为我们提供了用户的全名和个人 ID。这两种数据都受 GDPR 保护,我真的不喜欢将这些数据存储在 DMZ 中的数据库 运行ning 中的声音。在后台开放Keycloak访问数据库也不是一个好的解决方案,尤其是当我不需要存储用户的时候。
运行数据库的好处是我有一个更简单的 DMZ 设置,因为我真的不需要存储任何关于用户的信息,而是在后端。
我需要数据库吗?如果不需要,我如何 运行 没有它的 Keycloak?
Do I need a database, and if not how do I run Keycloak without it?
是的,但是,开箱即用的 Keycloak 运行s 无需部署任何外部数据库。从 Keycloak 官方文档部分 Relational Database Setup 可以阅读:
Keycloak comes with its own embedded Java-based relational database called H2. This is the default database that Keycloak will use to persist data and really only exists so that you can run the authentication server out of the box.
所以开箱即用,你不能 运行 Keycloak 没有数据库。
从同一文档中可以看到:
We highly recommend that you replace it with a more production ready external database. The H2 database is not very viable in high concurrency situations and should not be used in a cluster either.
所以关于这个:
The benefit running without a database is that I have a simpler DMZ setup as I really do not need to store anything about the users but on the backend.
您最好还是部署另一个数据库,因为 Keycloak 在数据库中存储的不仅仅是用户信息(例如, 领域信息、组、角色等)。
The external IdP provides us with a full name of the user and a personal ID. Both data are covered by GDPR and I really do not like the sound of storing that data in a database running in the DMZ. Opening up for Keycloak to access a database in the backend is also not a good solution, especially when I do not need users to be stored.
您可以配置 IDP 和 Keycloak,只要用户进行身份验证,用户就不会导入到 Keycloak。