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

Have a config option to add the debug API commands #278

Open
johannaengland opened this issue Jun 26, 2024 · 2 comments
Open

Have a config option to add the debug API commands #278

johannaengland opened this issue Jun 26, 2024 · 2 comments
Labels
api post-zino2.0 These are features Zino1 does not have, but might be desired later

Comments

@johannaengland
Copy link
Contributor

After a little discussion with @runborg we decided it might be good to have a config option to disable the debug API commands (anything part of ZinoTestProtocol). That way an API user does not suddenly have more power using the API than before.

We can have a decorator similar to require_authentication that marks an API command as new/debug, which then will not be returned by _get_all_responders.

@johannaengland johannaengland added api post-zino2.0 These are features Zino1 does not have, but might be desired later labels Jun 26, 2024
@lunkwill42
Copy link
Member

lunkwill42 commented Jun 26, 2024

Well, in reality, the ZinoTestProtocol should not be used by default at all, it's just there during initial development of the API. Its instantiation should be permanently replaced by Zino1ServerProtocol. The question is whether this issue serves to remind us to do this before the Zino 2.0 release, or if it should be a separate issue (now that this is labeled as post-zino-2.0)

What we could consider, however, is a config option to selectively replace the default protocol implementation with something more experimental (like ZinoTestProtocol, if you like)

@lunkwill42
Copy link
Member

This is the line that needs to be changed before Zino 2.0:

https://github.com/Uninett/zino/blob/4343bacf96518f769ea4e1a804a23bcfa5b20935/src/zino/api/server.py#L33-L32

@johannaengland johannaengland changed the title Have a config option to disable the debug API commands Have a config option to add the debug API commands Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api post-zino2.0 These are features Zino1 does not have, but might be desired later
Projects
None yet
Development

No branches or pull requests

2 participants