Skip to content

Retrieval of the claim for config['oauth_password_claim'] #9631

Open
@restena-sw

Description

@restena-sw

Prerequisites

  • I have searched for duplicate or closed feature requests
  • I have searched for plugins that provide already provide the feature

Proposal

We are trying to use oauth_password_claim but consistently get the response Error: OAuth token request failed: Password claim (magicmushroom) not found. The word in parenthesis is the claim that contains the short-lived password.

A scope with the same name exists on the server, and is requested client-side with $config['oauth_scope'] = "email openid magicmushroom offline_access"

I first suggested a bug with the server software (simpleSAMLphp with module simplesamlphp-module-oidc) but the good people there walked me through the verification that the claims exist server-side and are returned just fine.

The catch here is: these scopes are returned in the "userinfo" endpoint; while Roundcube seems to look exclusively in the id_token (my reading of the source code, which may well be incorrect of course).

The folks at the server-side write:

"I assume the client uses authorization code flow in which Access Token is being released, so those claims will not be included in ID Token... It would be great if you could verify results from the userinfo endpoint.... You would need to get a hand on access token and use it in request to userinfo endpoint." - which I did, and I got the expected claims in userinfo. Source: simplesamlphp/simplesamlphp-module-oidc#246

Can you confirm that Roundcube is using the authorization code flow? If so, it appears like it needs to be possible to configure (or infer) at which endpoint to look for the claims.

Motivation and context

Using the new non-XOAUTH2 feature for IMAP backend is probably only functional under specific circumstances. Making it work in a wider set of settings would be beneficial.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions