Skip to content
Snippets Groups Projects
  1. Nov 29, 2023
  2. Nov 15, 2023
    • Franck Bret's avatar
      Rebase · 1696ded0
      Franck Bret authored
      v0.8.0
      1696ded0
    • Franck Bret's avatar
      Apply Antoine Lambert review patch · 5fa878e4
      Franck Bret authored
      Store authentication tokens in global configuration file with following
      structure:
      
      keycloak:
        client_id: swh-web
        realm_name: SoftwareHeritage
        server_url: https://auth.softwareheritage.org/auth/
      keycloak_tokens:
        SoftwareHeritage:
          swh-web: xxxtokenxxx
      5fa878e4
    • Franck Bret's avatar
      Use keycloak configuration mechanism and add a 'swh auth config' command · 59f3326f
      Franck Bret authored
      Add configuration file argument to auth command group
      
      Use keycloak default configuration and defaults method to load and merge
      configuration (env > params > user configuration file > default auth
      configuration > defaultvalues)
      
      Add swh auth config command which can generate a token by providing a
      username (password will be asked by a prompt), or verify a provided
      token. If the token is valid user can save the authentication
      configuration with token to authentication configuration file which
      default to auth.yml
      59f3326f
    • Franck Bret's avatar
      Add set-token command · e4f31567
      Franck Bret authored
      This is a follow up of D8909.
      The set-token command prompt the user to fill a token if not provided by
      args. It checks the token is valid and then write it to configuration
      file.
      
      Related T4590
      e4f31567
  3. Oct 24, 2023
  4. Jul 07, 2023
  5. Jul 06, 2023
  6. Mar 14, 2023
    • Antoine Lambert's avatar
      starlette: Allow to provide access token in authorization header · 99e3c9be
      Antoine Lambert authored
      Previously the OpenID Connect backend was only allowing to provide
      a refresh token in authorization header for convenient access token
      renewal when querying a GraphQL service outside of a browser.
      
      When one wants to query a GraphQL service inside a browser, the
      access tokens are usually created and renewed client-side so also
      allow to provide an access token in the authorization header.
      In that case, the backend will simply try to decode it in order
      to authenticate the user.
      
      Related to swh-graphql#4652
      v0.7.2
      99e3c9be
  7. Feb 23, 2023
  8. Feb 17, 2023
  9. Feb 16, 2023
  10. Feb 13, 2023
  11. Feb 02, 2023
  12. Dec 19, 2022
  13. Oct 18, 2022
  14. Sep 12, 2022
  15. Jul 15, 2022
    • Antoine Lambert's avatar
      keycloak: Fix issue in authorization_url since python-keycloak 1.8.1 · 6c85751c
      Antoine Lambert authored
      The scope and state query parameters in the authorization URL are now
      handled by the KeycloakOpenID.auth_url method since the release of
      python-keycloak 1.8.1.
      
      To keep backward compatibility with older python-keycloak versions, like
      the one used in production, while ensuring support for recent ones we need
      to ensure scope and state query parameters will be overridden if provided
      in extra_params dict.
      v0.6.6
      6c85751c
  16. Jul 12, 2022
  17. May 30, 2022
  18. May 20, 2022
  19. May 02, 2022
  20. Apr 26, 2022
  21. Apr 21, 2022
  22. Apr 14, 2022
    • Antoine Lambert's avatar
      backends: Report only relevant exceptions to sentry · 7fddad7e
      Antoine Lambert authored
      When catching KeycloakError exceptions, other exception types
      will be then raised like ValueError or AuthenticationFailed.
      
      Those will be processed by django applications using these auth
      middlewares so there is no need to duplicate error reports in
      sentry here.
      7fddad7e
  23. Apr 08, 2022
  24. Apr 06, 2022
  25. Apr 05, 2022
  26. Mar 22, 2022
  27. Feb 10, 2022
  28. Feb 07, 2022
  29. Dec 16, 2021
  30. Dec 01, 2021
  31. Aug 23, 2021
    • Antoine Lambert's avatar
      django/backends: Handle error when user session is no longer active · 508b476d
      Antoine Lambert authored
      When a user session has been terminated without using the logout view
      (for instance a user can logout from all its authenticated sessions
      using the Keycloak account UI), the expired OIDC profile is still
      in webapp cache which causes errors and prevent new user logins.
      
      So ensure to remove expired profile from cache when detecting Keycloak
      session is no longer active in django authentication backend.
      
      Related to T3496
      v0.6.1
      508b476d
Loading