keycloak - Keycloak: Admin-cli Add SMTP server details?
问题描述
In our keycloak we have written admin-cli command to make things smooth after keycloak bought up .We will create some basic Realm/user/group and other details from the help of admin-cli .
Now we want to add the SMTP server details through admin-cli . How can be achieve this ?
解决方案
Ok at last too many hit and try i found the solution . Here is the details how to add the SMTP server details via admin-cli
First Step Enable HTTPS(As in our case keycloak running on HTTPS)
/opt/keycloak/bin/kcadm.sh config truststore --trustpass keycloak /opt/keycloak/security/ssl/keycloak.jks
Second Step Login with client admin-cli
/opt/keycloak/bin/kcadm.sh config credentials --server https://{{keycloak_server_IP}}:{{keycloak_port}}/auth --realm master --user admin --password admin --client admin-cli
If realm not created create it via this
/opt/keycloak/bin/kcadm.sh create realms -s realm=SURE -s enabled=true
and then run below command
/opt/keycloak/bin/kcadm.sh update realms/CRUE_Realm -x -s 'smtpServer.host=Your Host Name' -s 'smtpServer.from=email@somemail.com' -s 'smtpServer.fromDisplayName=Mail Support' -s 'smtpServer.auth=false' -s 'smtpServer.ssl=false'
推荐阅读
- erlang - 在 RHEL7 上安装最新版本的 Erlang
- rest - Cisco Spark:作为机器人检索消息时“无法获取活动”
- tomcat - 两个指向同一个 Tomcat 实例的 URL,一个重定向到另一个
- php - API 不返回任何 SQL 数据
- java - 通过 Java 注释处理器生成的 Maven 过滤资源
- ionic-framework - IONIC APK 构建错误
- javascript - iOS Safari 独立的网络应用内导航突然无法正常工作
- css - 扩展的可点击区域在 Firefox 中不起作用
- javascript - 如何调用数组中的变量
- javascript - Node.js 模块中的函数