Repository navigation
feat(dovecot): accept OIDC access tokens - #311
Draft
DavidePrincipi wants to merge 1 commit into
Draft
DavidePrincipi wants to merge 1 commit into
DavidePrincipi wants to merge 1 commit into
Conversation
When the oidc.env file of the module state holds the issuer and the client credentials, Dovecot accepts the XOAUTH2 and OAUTHBEARER mechanisms, and validates the tokens with the introspection endpoint of the provider. Webmail applications can then log in to IMAP and SMTP with the SSO token of the user. The password backends are restricted to the password mechanisms, so a rejected token is not retried as an LDAP password, where failures could count toward an account lockout. The settings are written manually for now: provider discovery comes later. The file is part of the backup, because it holds the client secret. Assisted-by: Claude Code:claude-opus-5-5
This was referenced Oct 2, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Let webmail applications and mail clients log in to the mail server with single sign-on (SSO), sending an OpenID Connect (OIDC) access token instead of a password, as part of NethServer/dev#8080. Roundcube needs this to log in to IMAP and SMTP for an SSO user.
When OIDC is configured, Dovecot also accepts the XOAUTH2 and OAUTHBEARER login mechanisms, and asks the provider whether each token is valid. Password logins keep working as before. Without OIDC settings nothing changes. For now the settings are written by hand: discovery of the provider comes later.
reload-configadds the token mechanisms, and writes the token check settings with the provider address and the client credentialsstate/oidc.env(OIDC_ISSUER,OIDC_CLIENT_ID,OIDC_CLIENT_SECRET, optionalOIDC_INTROSPECTION_URL), mode 0600 and included in the backup, documented in the READMEHow to test
register-clientaction of the idp module, without redirect URIs, and write its credentials tostate/oidc.envas the README showsdoveconfaccepts the configurationSee also
Generated by Claude Code:claude-opus-5-5 with nethserver-pr