Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add support for webhook listeners #45475

Merged
merged 32 commits into from
Jun 11, 2024
Merged

Commits on Jun 11, 2024

  1. feat: Add support for webhook listeners

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    8d18607 View commit details
    Browse the repository at this point in the history
  2. feat: Serialize event data and author userid to webhook

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    d835d23 View commit details
    Browse the repository at this point in the history
  3. feat: Add webhooks application

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    aa974a4 View commit details
    Browse the repository at this point in the history
  4. Revert "feat: Serialize event data and author userid to webhook"

    This reverts commit 45d3bd6.
    
    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    cf26559 View commit details
    Browse the repository at this point in the history
  5. Revert "feat: Add support for webhook listeners"

    This reverts commit 3b790df.
    
    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    c3d4d2a View commit details
    Browse the repository at this point in the history
  6. feat: Make node events serializable

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    734aad8 View commit details
    Browse the repository at this point in the history
  7. feat: Add command to list registered webhooks

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    3b64e52 View commit details
    Browse the repository at this point in the history
  8. feat: Add admin delegation for webhooks

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    5dd9c2f View commit details
    Browse the repository at this point in the history
  9. feat: Add event filtering to webhooks

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    144bdd7 View commit details
    Browse the repository at this point in the history
  10. fix: Add event filter to openapi

    Somehow this does not work in the ocs_api_viewer app, so we should look
     into better specifying format for eventFilter.
    Ideally it should also be set as in body, not query.
    
    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    7fe3f1c View commit details
    Browse the repository at this point in the history
  11. chore: Add tests for the PHPMongoQuery class

    It appears that it does not match Mongo current documentation exactly so
     we should look into adapting it. Having equality autodetect regex is a
     bit weird.
    
    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    75b2ed4 View commit details
    Browse the repository at this point in the history
  12. feat: Add app_api app id to saved information about webhook

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    261f08e View commit details
    Browse the repository at this point in the history
  13. feat: Add support for headers and authentication headers in webhooks

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    85e0407 View commit details
    Browse the repository at this point in the history
  14. fix: Fix TODOs about authentication data, list possible auth methods

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    8aae03c View commit details
    Browse the repository at this point in the history
  15. fix: Fix eventFilter definition in ResponseDefinitions

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    d3c06d5 View commit details
    Browse the repository at this point in the history
  16. fix: Fix errors spotted by reviewers, fix @throws annotations

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    cccda66 View commit details
    Browse the repository at this point in the history
  17. chore: rename Index.php to ListWebhooks.php

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    35d5d90 View commit details
    Browse the repository at this point in the history
  18. fix: Make webhook event serialization opt-in with a new interface

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    e111d2e View commit details
    Browse the repository at this point in the history
  19. fix: Cache webhooks listened events for 5min

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    98f3ea6 View commit details
    Browse the repository at this point in the history
  20. fix: Move caching to the mapper instead

    Application class cannot use DI, and having the cache in the mapper
     allows for invalidating it when inserting or updating a webhook
     registration.
    
    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    3bc43b2 View commit details
    Browse the repository at this point in the history
  21. fix: Remove superfluous antislash from event name to avoid problems

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    bb2cb45 View commit details
    Browse the repository at this point in the history
  22. fix(webhooks): fix crash when headers is null with header auth method

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    621c068 View commit details
    Browse the repository at this point in the history
  23. fix(webhooks): Refuse webhooks registration if auth header is used wi…

    …thout auth data
    
    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    74e5812 View commit details
    Browse the repository at this point in the history
  24. fix(webhooks): Add Nextcloud certificate bundle to client options

    This way importing a certificate with occ security:certificate:import
     will allow to use it for webhooks.
    
    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    6c7931b View commit details
    Browse the repository at this point in the history
  25. fix(webhooks): Fix migration uri length

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    c940ba0 View commit details
    Browse the repository at this point in the history
  26. feat(webhooks): Add \SensitiveValue attribute to authData parameter i…

    …n all classes
    
    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    6e38b48 View commit details
    Browse the repository at this point in the history
  27. fix(webhooks): Fix tests

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    9449f64 View commit details
    Browse the repository at this point in the history
  28. chore(webhooks): Rename webhooks application to webhook_listeners

    There is already a webhooks application in the appstore
    
    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    19bc3ed View commit details
    Browse the repository at this point in the history
  29. fix(webhooks): Fix a few of psalm errors

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    f09c781 View commit details
    Browse the repository at this point in the history
  30. fix(webhooks): Fix openapi reponse definition

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    d5b53be View commit details
    Browse the repository at this point in the history
  31. fix(webhooks): Fix last psalm and openapi problems with the API

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    bff7d3c View commit details
    Browse the repository at this point in the history
  32. fix(webhooks): Fix a few more psalm notices

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    e0b9ff4 View commit details
    Browse the repository at this point in the history