How to configure Dovecot with Keycloak correctly

Gary Horchem gboy12.98 at gmail.com
Sat Dec 3 17:41:47 UTC 2022


Hello I’m trying to configure Dovecot with Keycloak I’m using the proxy with password grant method. 

Here’s my dovecot-oauth2.plain.conf.ext

grant_url = https://server-1.gary-springfield-mo.net/realms/sso/protocol/openid-connect/token
client_id = dovecot
client_secret = WtZ5uZsBi2QPfh1EWuMWjUVGNNT4HEGR
introspection_url = https://server-1.gary-springfield-mo.net/realms/sso/protocol/openid-connect/token/introspect
introspection_mode = post
use_grant_password = yes
debug = yes
username_attribute = username
pass_attrs = host=server-1:8181 proxy=y proxy_mech=xoauth2 pass=%{oauth2:access_token}

And my dovecot-oauth2.token.conf.ext

grant_url = https://server-1.gary-springfield-mo.net/realms/sso/protocol/openid-connect/token
client_id = dovecot
client_secret = WtZ5uZsBi2QPfh1EWuMWjUVGNNT4HEGR
tokeninfo_url = https://server-1.gary-springfield-mo.net/realms/sso/protocol/openid-connect/token
introspection_url = https://server-1.gary-springfield-mo.net/realms/sso/protocol/openid-connect/token/introspect
introspection_mode = post
use_grant_password = no
debug = yes
username_attribute = username
pass_attrs = pass=%{oauth2:access_token}

Do I also need to configure the dovecot-oauth2.conf.ext


Sent from my iPhone


More information about the dovecot mailing list