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

Current AIO talk recording docker container fails: No option 'secret' in section: 'backend' #3991

Closed
JoshuaPettus opened this issue Dec 21, 2023 · 11 comments · Fixed by #3992
Labels
2. developing Work in progress bug Something isn't working
Milestone

Comments

@JoshuaPettus
Copy link

This originally comes from here https://help.nextcloud.com/t/aio-current-talk-recording-docker-containers-fail/176746 but still seems to be happening

I am using the AIO's nextcloud/aio-talk-recording docker container standalone in my NC Talk software stack on a bare metal NC setup. When I first started using it, it was working well, but for the last month's docker container updates it apparently stopped working. NC would try to start the recording service and then fail. This is including the dev release branch.

The last version of the docker container that works for me was
nextcloud/aio-talk-recording:20231113_125854-latest

I invoke the container with:

sudo docker run --restart=always -d --name talk-recording -e ALLOW_ALL=true -e HPB_DOMAIN=signaling.ncdomain.com -e NC_DOMAIN=my.ncdomain.com -e TZ={timezone} -e RECORDING_SECRET={ncsecret} -e INTERNAL_SECRET={signalingsecret} -p 127.0.0.1:1234:1234 nextcloud/aio-talk-recording:latest

On the failed containers, here is the output from the log which looks to be the problem

ERROR:nextcloud.talk.recording.Server:Exception on /api/v1/room/o92sp42b [POST]                                                                                                                                  Traceback (most recent call last):                                                                                                                                                                                 File "/usr/local/lib/python3.12/configparser.py", line 767, in get                                                                                                                                                 value = d[option]
            ~^^^^^^^^                                                                                                                                                                                              File "/usr/local/lib/python3.12/collections/__init__.py", line 1014, in __getitem__                                                                                                                                return self.__missing__(key)            # support subclasses that define __missing__                                                                                                                                    ^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                   File "/usr/local/lib/python3.12/collections/__init__.py", line 1006, 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.12/site-packages/flask/app.py", line 1455, in wsgi_app                                                                                                                                response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 869, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 867, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 852, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/nextcloud/talk/recording/Server.py", line 49, in handleBackendRequest
    backend, data = _validateRequest()
                    ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/nextcloud/talk/recording/Server.py", line 74, in _validateRequest
    secret = config.getBackendSecret(backend)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/nextcloud/talk/recording/Config.py", line 130, in getBackendSecret
    return self._configParser.get('backend', 'secret')
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/configparser.py", line 770, in get
    raise NoOptionError(option, section)
configparser.NoOptionError: No option 'secret' in section: 'backend'

Looking at the /conf/recording.conf file in the nextcloud/aio-talk-recording:20231113_125854-latest container, I see

[backend]
allowall = true
# TODO: remove secret below when https://github.com/nextcloud/spreed/issues/9580 is fixed
secret = {secret}

And indeed the secret line has been removed in newer containers as per that issue, but there appears to still be some python script that is still expecting the line to be there.

@JoshuaPettus JoshuaPettus added 0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working labels Dec 21, 2023
@JoshuaPettus JoshuaPettus changed the title Curent AIO talk container fails when called Curent AIO talk recording docker container fails when called by NC Talk Dec 21, 2023
@JoshuaPettus JoshuaPettus changed the title Curent AIO talk recording docker container fails when called by NC Talk Curent AIO talk recording docker container fails: No option 'secret' in section: 'backend' Dec 21, 2023
@JoshuaPettus JoshuaPettus changed the title Curent AIO talk recording docker container fails: No option 'secret' in section: 'backend' Current AIO talk recording docker container fails: No option 'secret' in section: 'backend' Dec 21, 2023
@szaimen
Copy link
Collaborator

szaimen commented Jan 2, 2024

Hi @SystemKeeper wasn't this resolved with nextcloud/spreed#10022?

@szaimen szaimen transferred this issue from nextcloud/all-in-one Jan 2, 2024
@SystemKeeper
Copy link

Hi @SystemKeeper wasn't this resolved with nextcloud/spreed#10022?

Hey :-)
Yes it was, the problem is ALLOW_ALL=true and there it’s still needed, because then it’s independent of the backend. I honestly forgot the check after the latest changes. I had an idea a while back (#2880 (comment)), but never followed up 😅

@szaimen
Copy link
Collaborator

szaimen commented Jan 2, 2024

So where would this need to be fixed then? In talk-recording or in the container itself?

@SystemKeeper
Copy link

In the container/the config used. When allow all is set to true, we need to provide a global secret which is used

@SystemKeeper
Copy link

@JoshuaPettus Please make sure that you understand the impact of setting allow all to true! For a production deployment this is (or can be) a security issue!

@szaimen szaimen transferred this issue from nextcloud/nextcloud-talk-recording Jan 2, 2024
@szaimen szaimen added 2. developing Work in progress and removed 0. Needs triage Pending approval or rejection. This issue is pending approval. labels Jan 2, 2024
@szaimen
Copy link
Collaborator

szaimen commented Jan 2, 2024

PR in #3992

@szaimen szaimen added this to the next milestone Jan 2, 2024
@JoshuaPettus
Copy link
Author

JoshuaPettus commented Jan 2, 2024

@JoshuaPettus Please make sure that you understand the impact of setting allow all to true! For a production deployment this is (or can be) a security issue!

I understand that there can be an issue, but I have yet to find any documentation on a working alternative. The sparse amount of guides I can find on how to set it up are with it set to true. If you know of any please let me know!

@SystemKeeper
Copy link

@szaimen
Copy link
Collaborator

szaimen commented Jan 2, 2024

This is now released with v7.9.1 Beta. Testing and feedback is welcome! See https://github.com/nextcloud/all-in-one#how-to-switch-the-channel

@JoshuaPettus
Copy link
Author

If you know of any please let me know!

Its documented at https://github.com/nextcloud/nextcloud-talk-recording/blob/main/docs/installation.md#talk-configuration

Ah Thank you, I appreciate it!

This is now released with v7.9.1 Beta. Testing and feedback is welcome! See https://github.com/nextcloud/all-in-one#how-to-switch-the-channel

Awesome! I will give it a try and let you know if I have any issues

@JoshuaPettus
Copy link
Author

Oh wow, since I was using the secret anyway, I really did not need the allowall=true after all. Oh well, at least I stumbled on a bug for you!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
2. developing Work in progress bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants