1. 20 Mar, 2024 2 commits
    • Jérome Perrin's avatar
      stack/erp5: serve balancer requests when client certificate is not verified · 8fa7ec94
      Jérome Perrin authored
      We configure haproxy with "verify optional", which makes haproxy request
      a client certificate, but accept the case where client does not present
      a certificate, but as described in [1], if client present a certificate
      and this certificate can not be verified, handshake is aborted. This is
      not what we want, we want to treat the case of a non verified
      certificate same as the case of the absence of certificate.
      
      This configures haproxy accordingly, using "crt-ignore-err all" to allow
      handshake anyway.
      
      Once this was fixed, there was a remaining problem with
      client_cert_verified acl, haproxy acl are OR, but this rule was supposed
      to be a AND (client present a certificate AND it is verified), this was
      rewritten to use inline condition which are AND.
      
      [1]: https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#5.1-verify
      
      Also adjust test_x_forwarded_for_stripped_when_no_certificate to assert
      that there is no X-Forwarded-For header at all when no client
      certificate.
      8fa7ec94
    • Levin Zimmermann's avatar
      software/erp5/test: Run tests with ZEO & NEO · 361c990b
      Levin Zimmermann authored
      Before this patch all ERP5 SlapOS Integration tests only run with ZEO
      storage. We should also run them against NEO, because we are using
      ERP5 with NEO in SlapOS.
      
      In order to do so we implemented parameterized test classes for our ERP5
      integration tests. Each test case can be configured via its __test_matrix__
      attribute. A test matrix is a dict which maps the flavoured class name suffix to
      a tuple of parameters. A parameter is a function which receives the
      instance_parameter_dict and modifies it in place. You can use the
      'matrix' helper function to construct a test matrix. If .__test_matrix__
      is 'None' the test case is ignored.
      
      /reviewed-by @kirr & @jerome
      /reviewed-on nexedi/slapos!1306
      361c990b
  2. 23 Jun, 2022 1 commit
  3. 21 Jun, 2022 2 commits
  4. 20 Jun, 2022 3 commits
  5. 17 Jun, 2022 7 commits
  6. 16 Jun, 2022 3 commits
  7. 15 Jun, 2022 7 commits
  8. 14 Jun, 2022 2 commits
  9. 13 Jun, 2022 5 commits
  10. 10 Jun, 2022 6 commits
    • Julien Muchembled's avatar
    • Jérome Perrin's avatar
    • Jérome Perrin's avatar
    • Jérome Perrin's avatar
      software/theia: fix typo in schemas · d1ae46a6
      Jérome Perrin authored
      d1ae46a6
    • Jérome Perrin's avatar
      software/{kvm,theia}: fix $ref in json schema · 0c3f66a0
      Jérome Perrin authored
      Fixes this warning when running test:
      
          UserWarning: Error validating request parameters against schema definition:
          RefResolutionError unknown url type: 'instance-input-schema.json'
      
      jsonschema (the python library) support this kind of refs when using
      version draft-06 but not when using draft-04.
      
      json-language-features (from theia text editor) does not understands
      file.json#/ references, it complains:
      
          $ref '/' in 'file://...' can not be resolved.(768)
      
      but not using the trailing / works fine
      0c3f66a0
    • Jérome Perrin's avatar
      software/theia: fix instance error when instance is not ASCII · faaebbf3
      Jérome Perrin authored
      b'💥' is a SyntaxError in python.
      
      Instead, switch to accessing options from option variable and apply
      this to other options from this part.
      
      This fixes this issue:
      
          While:
            Installing switch-softwaretype.
            Installing favicon.ico.
      
          An internal error occurred due to a bug in either zc.buildout or in a
          recipe being used:
          Traceback (most recent call last):
            File "zc.buildout-2.7.1+slapos019-py3.7.egg/zc/buildout/buildout.py", line 2360, in main
              getattr(buildout, command)(args)
            File "zc.buildout-2.7.1+slapos019-py3.7.egg/zc/buildout/buildout.py", line 640, in install
              self._install_parts(install_args)
            File "zc.buildout-2.7.1+slapos019-py3.7.egg/zc/buildout/buildout.py", line 820, in _install_parts
              installed_files = self[part]._call(recipe.install)
            File "zc.buildout-2.7.1+slapos019-py3.7.egg/zc/buildout/buildout.py", line 1668, in _call
              return f()
            File "slapos.cookbook-1.0.244-py3.7.egg/slapos/recipe/switch_softwaretype.py", line 108, in install
              sub_buildout.install([])
            File "zc.buildout-2.7.1+slapos019-py3.7.egg/zc/buildout/buildout.py", line 640, in install
              self._install_parts(install_args)
            File "zc.buildout-2.7.1+slapos019-py3.7.egg/zc/buildout/buildout.py", line 820, in _install_parts
              installed_files = self[part]._call(recipe.install)
            File "zc.buildout-2.7.1+slapos019-py3.7.egg/zc/buildout/buildout.py", line 1668, in _call
              return f()
            File "slapos.recipe.build-0.54-py3.7.egg/slapos/recipe/build/__init__.py", line 268, in install
              return self._shared.install(self.__install)
            File "slapos.recipe.build-0.54-py3.7.egg/slapos/recipe/__init__.py", line 150, in install
              install()
            File "slapos.recipe.build-0.54-py3.7.egg/slapos/recipe/build/__init__.py", line 278, in __install
              self._exec(self._install)
            File "slapos.recipe.build-0.54-py3.7.egg/slapos/recipe/build/__init__.py", line 261, in _exec
              code = compile(script, self.name, 'exec')
            File "favicon.ico", line 6
          SyntaxError: bytes can only contain ASCII literal characters.
      faaebbf3
  11. 09 Jun, 2022 1 commit
  12. 08 Jun, 2022 1 commit