Localize client authentication with d.o infrastructure

Created on 20 October 2023, 9 months ago

Localize client (l10n_client module) has been the way to translate Drupal websites in the frontend for a long time and to submit new translations on the fly to localize.drupal.org while translating.
The submission part is currently not functional anymore, because the previously used xmlrpc endpoint with an api key based authentication has been disabled for security reasons.

We aim to renew the functionality with a more modern approach using a REST / JSONAPI based endpoint with OAuth authentication.

Using simple_oauth and oauth_client module, we were able to implement a working prototype already.

With d.o transitioning to a new authentication system based on Keycloak (OpenID Connect, OAuth), we would like to integrate with that instead of using another OAuth provider in the localize server setup.

__________________

@hestenet - I am going to work with @sanduhrs and @fmb to set up access to our development system on cloud-iam so that they can get this ready. Both have already signed contributor agreement and NDA.

I will coordinate this with @heddn who is doing primary development

πŸ“Œ Task
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany sanduhrs πŸ‡ͺπŸ‡Ί Heidelberg, Germany, Europe

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @sanduhrs
  • πŸ‡ΊπŸ‡ΈUnited States hestenet Portland, OR πŸ‡ΊπŸ‡Έ
  • πŸ‡©πŸ‡ͺGermany sanduhrs πŸ‡ͺπŸ‡Ί Heidelberg, Germany, Europe
  • πŸ‡©πŸ‡ͺGermany sanduhrs πŸ‡ͺπŸ‡Ί Heidelberg, Germany, Europe
  • πŸ‡ΊπŸ‡ΈUnited States hestenet Portland, OR πŸ‡ΊπŸ‡Έ

    @hestenet - I am going to work with @sanduhrs and @fgm to set up access to our development system on cloud-iam so that they can get this ready. Both have already signed contributor agreement and NDA.

    I will coordinate this with @heddn who is doing primary development

  • πŸ‡ΊπŸ‡ΈUnited States hestenet Portland, OR πŸ‡ΊπŸ‡Έ
  • πŸ‡ΊπŸ‡ΈUnited States hestenet Portland, OR πŸ‡ΊπŸ‡Έ
  • πŸ‡©πŸ‡ͺGermany sanduhrs πŸ‡ͺπŸ‡Ί Heidelberg, Germany, Europe
  • heddn Nicaragua

    Ah, I think understand what we're doing here. We're wanting to authenticate from random drupal sites to submit (as authenticated d.o users) translations. In the case, the ability to authenticate using keycloak is very much a possibility. Feel free to reach out on slack (heddn) and I can orient you guys on the sandbox environment we have setup.

  • heddn Nicaragua

    While we are working on the actual migration of d.o users to keycloak, might I suggest spinning up a playground: https://www.keycloak.org/getting-started/getting-started-docker? Then wire up l10n_client to this generic keycloak instance, figure out what is needed and propose that solution to all of us. Our setup of keycloak is very traditional. Not much special (yet) added to the out of the box setup. Developing with a localdev is going to be way more efficient then using any server or cloud hosted solution too. Just document the setup steps proposed here.

  • πŸ‡ΊπŸ‡ΈUnited States drumm NY, US

    Keycloak may or may not be the solution here. I’m interpreting this as needing something to manage API keys that can be used for authenticating write access only this localization service.

    Full access to the localize site as the user might be okay, it is a bit of extra access, but there is not a lot more going on in the site. Full access as a user who can approve/etc translations might not be intended.

    We certainly don’t want to be using keys which have access to authenticate as the user everywhere else on *.drupal.org. That would be unnecessary risk.

  • πŸ‡©πŸ‡ͺGermany Harlor Berlin

    Ah, I think understand what we're doing here. We're wanting to authenticate from random drupal sites to submit (as authenticated d.o users) translations.

    Yes - That's the idea.

    We certainly don’t want to be using keys which have access to authenticate as the user everywhere else on *.drupal.org. That would be unnecessary risk.

    Yes - I hope we find a solution with have access-tokens/api-keys that can be used for the contribution endpoints authentication only.

    Btw. we started working on the server endpoints: https://www.drupal.org/project/l10n_server/issues/3395508 πŸ“Œ New endpoints for l10n_client_contributor Needs review
    And the corresponding adjustments in the l10n_client: https://www.drupal.org/project/l10n_client/issues/3395327 πŸ“Œ Replace xmlrpc for new localize.drupal.org Needs work

Production build 0.69.0 2024