Florian Ludwig
4faf762292
update broker script to new module name
2021-08-17 17:01:58 +02:00
Florian Ludwig
992786735e
hbmqtt folder does not exist anymore
2021-08-17 17:01:58 +02:00
Florian Ludwig
1cbad5bc3a
update docs to reflect new name
2021-08-17 17:01:58 +02:00
Florian Ludwig
86cec6d2a5
remove hbmqtt plugin namespace compatibility
2021-08-17 17:01:58 +02:00
Florian Ludwig
b958b6b29c
change name in CLI docs
2021-08-17 17:01:58 +02:00
Florian Ludwig
635ab039e7
remove hbmqtt* CLI scripts
2021-08-17 17:01:58 +02:00
Florian Ludwig
8c8c28d47f
remove hbmqtt files
2021-08-17 17:01:58 +02:00
Stuart Longland
5315e2d865
broker tests: Fix reference to TimeoutError.
...
Seems Python 3.8+ moved it, and I took the reference from there.
2021-08-17 16:20:27 +02:00
Stuart Longland
3b793a706b
broker tests: Clean up flake8 warnings
2021-08-17 16:20:27 +02:00
Stuart Longland
fed6d2c31c
plugins.topic_checking tests: Fix issues identified by flake8
2021-08-17 16:20:27 +02:00
Stuart Longland
bf5279911b
Pass code through `black` formatter
2021-08-17 16:20:27 +02:00
Stuart Longland
29854264e3
broker tests: Change passwords for user[1…3]
...
As pointed out, it's possible to accidentally mix them up if the
passwords are the same. Obviously, the passwords used for these tests
should _NOT_ be used in production.
2021-08-17 16:20:27 +02:00
Stuart Longland
744a6868fe
plugins.topic_checking: De-indent logging checks
...
As pointed out, the `logdog` docs do the checks outside of the context
manager scope, so we should do so as well.
2021-08-17 16:20:27 +02:00
Stuart Longland
1f31e1668a
broker: Pass through enum values not strings.
2021-08-17 16:20:27 +02:00
Stuart Longland
2e52b22c2c
plugins.topic_checking tests: Run code formatting tool.
2021-08-17 16:20:27 +02:00
Stuart Longland
0760bd7613
plugins.topic_checking tests: Replace DummyLogger with `logdog` plug-in.
2021-08-17 16:20:27 +02:00
Stuart Longland
5ad48d9129
test config: Enable `pytest_logdog` plug-in
2021-08-17 16:20:27 +02:00
Stuart Longland
fc69d203db
poetry/pyproject: Pull in pytest-logdog
...
This is a `py.test` plug-in that allows us to test logging in test
cases. Seems like an ideal candidate for a logger fixture.
2021-08-17 16:20:27 +02:00
Stuart Longland
73db6a3536
plugins.topic_checking tests: Fix tests broken by Enum change.
2021-08-17 16:20:27 +02:00
Stuart Longland
e80f4f27e0
amqtt.broker: Use Enum for topic checking action
2021-08-17 16:20:27 +02:00
Stuart Longland
100ca6e67a
plugins.topic_checking tests: Clean up `assert`/`await` calls
2021-08-17 16:20:27 +02:00
Stuart Longland
b33fb05991
plugins.topic_checking tests: Add tests for enabled=False
2021-08-17 16:20:27 +02:00
Stuart Longland
db5e886c7e
broker tests: Add system test for publish authorisation
2021-08-17 16:20:27 +02:00
Stuart Longland
653b6cd89c
plugins.topic_checking tests: Drop copyright header
2021-08-17 16:20:27 +02:00
Stuart Longland
9efd152c1b
plugins.topic_checking tests: Fix comment statement
2021-08-17 16:20:27 +02:00
Stuart Longland
0d0108638e
plugins.topic_checking: Clean up brackets.
...
As per review comments.
2021-08-17 16:20:27 +02:00
Stuart Longland
33531c2f23
test cases: Add fixture for ACL-enabled test server
...
This uses the real plug-ins to test the broker correctly responds to the
return values when publishing and subscribing.
The plug-ins themselves are tested elsewhere.
2021-08-17 16:20:27 +02:00
Stuart Longland
f30aa9245d
test password file: Add some more users
2021-08-17 16:20:27 +02:00
Stuart Longland
66568122c5
plugin.topic_checking tests: Fix code formatting.
...
Yes, too lazy to hold down shift when hitting the `'` key.
2021-08-17 16:20:27 +02:00
Stuart Longland
18cf5cdd1e
plugins.topic_checking: Add remaining tests.
2021-08-17 16:20:27 +02:00
Stuart Longland
4e16c5de5a
plugins.topic_checking: Return False if superclass refuses.
...
If `BaseTopicPlugin` returns `False`, we should propagate that failed
response in `TopicAccessControlListPlugin`.
2021-08-17 16:20:27 +02:00
Stuart Longland
8daf173a75
plugins.topic_checking: Test topic_ac static method
2021-08-17 16:20:27 +02:00
Stuart Longland
480a944282
plugins.topic_checking tests: Throw test suite at `black`.
...
Clean up the coding style a bit.
2021-08-17 16:20:27 +02:00
Stuart Longland
0cfce9fd84
plugins.test_topic tests: Add tests for TopicTabooPlugin.
...
This is more of a "demo" plug-in, but let's test it anyway.
2021-08-17 16:20:27 +02:00
Stuart Longland
75b8c33263
plugins.topic_checking tests: Test BaseTopicPlugin.
2021-08-17 16:20:27 +02:00
Stuart Longland
81646ef024
plugins.topic_checking: Initialise topic_config to None if not present.
...
If the user forgets to provide a `topic-check` key, we need to
initialise `topic_config` to some value or else `topic_filtering` will
fail with an `AttributeError`.
2021-08-17 16:20:27 +02:00
Stuart Longland
ed11f7cb9c
plugins.topic_checking: Check the `action` in `topic_acl`.
...
We maintain backward compatibility with older configurations by assuming
all `PUBLISH` actions are permitted if no ACL is present. Otherwise, we
follow the same rules as for `SUBSCRIBE`, with the exception that we
read the ACL from the `publish-acl` property instead of `acl`.
2021-08-17 16:20:27 +02:00
Stuart Longland
3e18828f49
broker: Check ACL on publish for permissions
2021-08-17 16:20:27 +02:00
Stuart Longland
90c31901cd
broker: Pass action=subscribe when checking topics
2021-08-17 16:20:27 +02:00
Stuart Longland
75257cb69a
broker: Pass current action to topic filter.
...
This will allow a topic filter to act on both subscription requests and
publishing.
2021-08-17 16:20:27 +02:00
Florian Ludwig
c2e7fcf2cb
Merge pull request #71 from Yakifo/release-0.10.0
...
release 0.10.0
2021-08-04 11:13:09 +02:00
Florian Ludwig
b58432cf98
Merge branch 'master' into release-0.10.0
2021-08-04 11:12:48 +02:00
Florian Ludwig
1fbdaf0ca5
release 0.10.0
2021-07-31 19:36:48 +02:00
Florian Ludwig
a69ef81aeb
Do not disregard KeyError exceptions inside plugins
2021-07-08 00:51:55 +02:00
Florian Ludwig
3db7c9a350
Bump to 0.10.0-alpha.4
2021-06-05 21:50:55 +02:00
Marius Kriegerowski
9515a00701
bump version of websockets dependency
2021-05-14 10:42:20 +02:00
Marius Kriegerowski
cd41907fa7
remove python3.6 from ci-pipeline
2021-05-04 11:54:21 +02:00
Marius Kriegerowski
f1ac274457
add test_utils
2021-05-03 21:42:19 +02:00
Florian Ludwig
308a399a38
Bump to 0.10.0-alpha.3
2021-04-05 19:14:02 +02:00
Florian Ludwig
de9679625a
add amqtt CLI
2021-04-05 19:11:00 +02:00