简体   繁体   English

Keycloak可以存储在postgres中加密的用户数据吗

[英]Can Keycloak store user data encryted in postgres

I want to use keycloak as openId Connect implementation via docker with a postgres db.我想通过 docker 和 postgres db 使用 keycloak 作为 openId Connect 实现。 I could not find a resource where it is documented whether keycloak stores user data encrypted.我找不到记录 keycloak 是否存储加密用户数据的资源。 Only passwords seem to be hashed.似乎只有密码是经过哈希处理的。 Postgres provides pgcrypto as a way to execute encryption and decryption at runtime. Postgres 提供 pgcrypto 作为在运行时执行加密和解密的一种方式。 Is there a way to enable crypto for user data with keycloak?有没有办法使用 keycloak 为用户数据启用加密?

Keycloak provides an option called User Storage SPI Keycloak 提供了一个名为 User Storage SPI 的选项
https://www.keycloak.org/docs/latest/server_development/#_user-storage-spi https://www.keycloak.org/docs/latest/server_development/#_user-storage-spi
With this, you can build a bridge between keycloak and your DB.有了这个,您可以在 keycloak 和您的数据库之间架起一座桥梁。
You will have the freedom to store your data in DB as per your convenience and when keycloak invokes the User storage SPI method you will have to return as per keycloak's specifications.您可以根据自己的方便自由将数据存储在 DB 中,并且当 keycloak 调用用户存储 SPI 方法时,您必须按照 keycloak 的规范返回。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM