Skip to content
Snippets Groups Projects
  1. Nov 22, 2024
  2. Nov 21, 2024
  3. Jul 17, 2024
    • Emanuele Aina's avatar
      README: Point out some subtleties around client auth methods · f572b8af
      Emanuele Aina authored and Pablo Vigo Mas's avatar Pablo Vigo Mas committed
      With commit ad28b94f "Validate client_id and client_secret values"
      the mediator started paying attention to client authentication.
      
      Since our integration test cargo-culted some configuration parameter
      straight from the GitLab configuration examples the mediator ended up
      implementing what the OpenID-Connect spec calls the `client_secret_post`
      authentication method, see
      https://openid.net/specs/openid-connect-core-1_0.html#ClientAuthentication
      
      
      
      Unfortunately, the spec also says that the actual default is
      `client_secret_basic`, so any real world usage is bound to fail unless
      some specific configuration is applied.
      
      To minimize confusion, let's drop the cargo-culted option from the
      example and add a note pointing to the spec and to the upstream
      GitLab documentation, while still keeping the `client_secret_post` usage
      in the GitLab integration test to exercise the codepath.
      
      Signed-off-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
      f572b8af
  4. Jul 16, 2024
  5. Jul 03, 2024
  6. Jun 20, 2024
    • Emanuele Aina's avatar
      Fix the integration test · c85699a1
      Emanuele Aina authored
      Pin the selenium version installed with pip since the integration tests
      are currently failing due to a change introduced in selenium 4.10.0
      (see https://github.com/SeleniumHQ/selenium/commit/9f5801c82fb3be3d585)
      which is being pulled via pip (for some reason the debian package is
      being ignored):
      
          ==================================== ERRORS ====================================
          _____________________ ERROR at setup of test_native_login ______________________
          request = <SubRequest 'driver' for <Function test_native_login>>
          driver_class = <class 'selenium.webdriver.remote.webdriver.WebDriver'>
          driver_kwargs = {'command_executor': 'http://docker:4444/wd/hub', 'desired_capabilities': {'browserName': 'firefox', 'moz:firefoxOptions': {}}}
              @pytest.fixture
              def driver(request, driver_class, driver_kwargs):
                  """Returns a WebDriver instance based on options and capabilities"""
      
                  retries = int(request.config.getini("max_driver_init_attempts"))
          >       for retry in Retrying(
                      stop=stop_after_attempt(retries), wait=wait_exponential(), reraise=True
                  ):
          /usr/local/lib/python3.9/dist-packages/pytest_selenium/pytest_selenium.py:201:
          _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
          /usr/local/lib/python3.9/dist-packages/tenacity/__init__.py:394: in __iter__
              do = self.iter(retry_state=retry_state)
          /usr/local/lib/python3.9/dist-packages/tenacity/__init__.py:372: in iter
              raise retry_exc.reraise()
          /usr/local/lib/python3.9/dist-packages/tenacity/__init__.py:189: in reraise
              raise self.last_attempt.result()
          /usr/lib/python3.9/concurrent/futures/_base.py:433: in result
              return self.__get_result()
          /usr/lib/python3.9/concurrent/futures/_base.py:389: in __get_result
              raise self._exception
          _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
          request = <SubRequest 'driver' for <Function test_native_login>>
          driver_class = <class 'selenium.webdriver.remote.webdriver.WebDriver'>
          driver_kwargs = {'command_executor': 'http://docker:4444/wd/hub
      
      ', 'desired_capabilities': {'browserName': 'firefox', 'moz:firefoxOptions': {}}}
              @pytest.fixture
              def driver(request, driver_class, driver_kwargs):
                  """Returns a WebDriver instance based on options and capabilities"""
      
                  retries = int(request.config.getini("max_driver_init_attempts"))
                  for retry in Retrying(
                      stop=stop_after_attempt(retries), wait=wait_exponential(), reraise=True
                  ):
                      with retry:
                          LOGGER.info(
                              f"Driver init, attempt {retry.retry_state.attempt_number}/{retries}"
                          )
          >               driver = driver_class(**driver_kwargs)
          E               TypeError: __init__() got an unexpected keyword argument 'desired_capabilities'
          /usr/local/lib/python3.9/dist-packages/pytest_selenium/pytest_selenium.py:208: TypeError
      
      Signed-off-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
      c85699a1
    • Emanuele Aina's avatar
      Fix building the testsuite by updating Go > 1.20 · b32f56d2
      Emanuele Aina authored
      
      The testsuite build currently fails with:
      
          $ ginkgo -r --randomize-all --randomize-suites --fail-on-pending --cover --trace --race --progress -v
          Failed to compile mediator:
          # github.com/onsi/gomega/internal
          /go/pkg/mod/github.com/onsi/gomega@v1.33.1/internal/async_assertion.go:556:19: undefined: context.Cause
          note: module requires Go 1.20
          # github.com/onsi/ginkgo/v2/internal
          /go/pkg/mod/github.com/onsi/ginkgo/v2@v2.19.0/internal/spec_context.go:20:17: undefined: context.CancelCauseFunc
          /go/pkg/mod/github.com/onsi/ginkgo/v2@v2.19.0/internal/spec_context.go:33:25: undefined: context.WithCancelCause
          note: module requires Go 1.20
      
      Update to the latest `golang` images to fix the issue.
      
      Signed-off-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
      b32f56d2
  7. Apr 28, 2023
  8. Apr 21, 2023
  9. Apr 20, 2023
  10. Apr 19, 2023
  11. Mar 24, 2023
  12. Mar 20, 2023
Loading