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

Global secret for recording server backend should not be needed #9580

Closed
SystemKeeper opened this issue May 22, 2023 · 0 comments · Fixed by #10022
Closed

Global secret for recording server backend should not be needed #9580

SystemKeeper opened this issue May 22, 2023 · 0 comments · Fixed by #10022
Assignees
Labels

Comments

@SystemKeeper
Copy link
Contributor

SystemKeeper commented May 22, 2023

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Expected behaviour

A backend configuration like this should be valid:

[backend]
allowall = false
backends = backend-1

[backend-1]
url = https://<nextcloud-url>
secret = <recording-secret>

Actual behaviour

This results in the error

configparser.NoOptionError: No option 'secret' in section: 'backend'

Only after changing the config to

[backend]
allowall = false
secret = <recording-secret>
backends = backend-1

[backend-1]
url = https://<nextcloud-url>
secret = <recording-secret>

the recording server works correctly, although that should only be needed if allowall = true is set.

Full exception:


ERROR:nextcloud.talk.recording.Server:Exception on /api/v1/room/7dkgueec [POST]
Traceback (most recent call last):
  File "/usr/lib/python3.8/configparser.py", line 789, in get
    value = d[option]
  File "/usr/lib/python3.8/collections/__init__.py", line 898, in __getitem__
    return self.__missing__(key)            # support subclasses that define __missing__
  File "/usr/lib/python3.8/collections/__init__.py", line 890, in __missing__
    raise KeyError(key)
KeyError: 'secret'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2190, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1486, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/usr/local/lib/python3.8/dist-packages/nextcloud/talk/recording/Server.py", line 49, in handleBackendRequest
    backend, data = _validateRequest()
  File "/usr/local/lib/python3.8/dist-packages/nextcloud/talk/recording/Server.py", line 74, in _validateRequest
    secret = config.getBackendSecret(backend)
  File "/usr/local/lib/python3.8/dist-packages/nextcloud/talk/recording/Config.py", line 129, in getBackendSecret
    return self._configParser.get('backend', 'secret')
  File "/usr/lib/python3.8/configparser.py", line 792, in get
    raise NoOptionError(option, section)
configparser.NoOptionError: No option 'secret' in section: 'backend'
INFO:werkzeug:172.30.150.1 - - [22/May/2023 18:58:18] "POST /api/v1/room/7dkgueec HTTP/1.1" 500 -
ERROR:nextcloud.talk.recording.Server:Exception on /api/v1/room/7dkgueec [POST]
Traceback (most recent call last):
  File "/usr/lib/python3.8/configparser.py", line 789, in get
    value = d[option]
  File "/usr/lib/python3.8/collections/__init__.py", line 898, in __getitem__
    return self.__missing__(key)            # support subclasses that define __missing__
  File "/usr/lib/python3.8/collections/__init__.py", line 890, in __missing__
    raise KeyError(key)
KeyError: 'secret'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2190, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1486, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/usr/local/lib/python3.8/dist-packages/nextcloud/talk/recording/Server.py", line 49, in handleBackendRequest
    backend, data = _validateRequest()
  File "/usr/local/lib/python3.8/dist-packages/nextcloud/talk/recording/Server.py", line 74, in _validateRequest
    secret = config.getBackendSecret(backend)
  File "/usr/local/lib/python3.8/dist-packages/nextcloud/talk/recording/Config.py", line 129, in getBackendSecret
    return self._configParser.get('backend', 'secret')
  File "/usr/lib/python3.8/configparser.py", line 792, in get
    raise NoOptionError(option, section)
configparser.NoOptionError: No option 'secret' in section: 'backend'

Talk app

Tested on latest master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants