crossbario / crossbar

Crossbar.io - WAMP application router
https://crossbar.io/
Other
2.05k stars 274 forks source link

auth handling in master/shell #1958

Closed oberstet closed 2 years ago

oberstet commented 2 years ago

needs https://github.com/crossbario/zlmdb/pull/46 and https://github.com/crossbario/cfxdb/pull/76

oberstet commented 2 years ago

alright, https://github.com/crossbario/crossbar/issues/1957 is now fixed:

master node:

2022-03-16T01:25:59+0100 [Container  105384] <crossbar.master.arealm.arealm.ApplicationRealmMonitor.check_and_apply> No application realm rlm_250d3293 currently running for router cluster worker group1_1: starting application realm ..
2022-03-16T01:25:59+0100 [Container  105384] <crossbar.master.cluster.webcluster.WebClusterMonitor.check_and_apply> Web service started on transport primary and path "autobahn" [{'transport_id': 'primary', 'path': 'autobahn', 'config': {'type': 'archive', 'archive': 'autobahn-v20.9.2.zip', 'origin': 'https://github.com/crossbario/autobahn-js-browser/archive/v20.9.2.zip', 'object_prefix': 'autobahn-js-browser-20.9.2', 'default_object': 'autobahn.min.js', 'download': True, 'cache': True, 'hashes': ['f63fb912ee13ba8ccd519be5d0a99e70b18c04ef6827c78b23a73cf328e733c4'], 'mime_types': {'.min.js': 'text/javascript', '.jgz': 'text/javascript'}}}]
2022-03-16T01:25:59+0100 [Container  105384] <crossbar.master.cluster.webcluster.WebClusterMonitor.check_and_apply> No Web service currently running on path "ws-ua-usr" for Web cluster worker cpw-c21a3142-0 web transport primary: starting web service ..
2022-03-16T01:25:59+0100 [Container  105384] <crossbar.master.arealm.arealm.ApplicationRealmMonitor.check_and_apply> Application realm rlm_250d3293 started on router cluster worker group1_1 [{'id': 'rlm_250d3293', 'config': {'name': 'realm1'}, 'created': '2022-03-16T00:25:59.476Z', 'roles': [], 'has_router': True, 'has_service_session': True, 'rlinks': [], 'interfaces': {}}]
2022-03-16T01:25:59+0100 [Container  105384] <crossbar.master.arealm.arealm.ApplicationRealmMonitor.check_and_apply> No role rle_46834e52 currently running for router cluster worker group1_1: starting role ..
2022-03-16T01:25:59+0100 [Container  105384] <crossbar.master.cluster.webcluster.WebClusterMonitor.check_and_apply> Web service started on transport primary and path "ws-ua-usr" [{'transport_id': 'primary', 'path': 'ws-ua-usr', 'config': {'type': 'websocket', 'auth': {'anonymous': {'type': 'static', 'role': 'anonymous'}, 'ticket': {'type': 'static', 'principals': {'system': {'ticket': 'systempwd234j#+SHJS!$', 'role': 'system'}}}, 'wampcra': {'type': 'dynamic', 'authenticator': 'reswarm.auth.authenticate_device'}}, 'serializers': ['cbor', 'msgpack', 'json'], 'options': {'allowed_origins': ['*'], 'allow_null_origin': True, 'enable_webstatus': True, 'max_frame_size': 1048576, 'max_message_size': 1048576, 'auto_fragment_size': 65536, 'fail_by_drop': True, 'open_handshake_timeout': 4000, 'close_handshake_timeout': 3000, 'auto_ping_interval': 10000, 'auto_ping_timeout': 5000, 'auto_ping_size': 12, 'compression': {'deflate': {'request_no_context_takeover': False, 'request_max_window_bits': 13, 'no_context_takeover': False, 'max_window_bits': 13, 'memory_level': 5}}}}}]
2022-03-16T01:25:59+0100 [Container  105384] <crossbar.master.cluster.webcluster.WebClusterMonitor.check_and_apply> No Web service currently running on path "/" for Web cluster worker cpw-c21a3142-0 web transport primary: starting web service ..
2022-03-16T01:25:59+0100 [Container  105384] <crossbar.master.arealm.arealm.ApplicationRealmMonitor.check_and_apply> Application realm role rle_46834e52 started on router cluster worker group1_1 [{'id': 'rle_46834e52', 'config': {'name': 'anonymous', 'permissions': []}}]
2022-03-16T01:25:59+0100 [Container  105384] <crossbar.master.arealm.arealm.ApplicationRealmMonitor.check_and_apply> No role rle_ad17f8ca currently running for router cluster worker group1_1: starting role ..
2022-03-16T01:25:59+0100 [Container  105384] <crossbar.master.cluster.webcluster.WebClusterMonitor.check_and_apply> Web service started on transport primary and path "/" [{'transport_id': 'primary', 'path': '/', 'config': {'type': 'static', 'directory': '.', 'options': {'enable_directory_listing': True}}}]
2022-03-16T01:25:59+0100 [Container  105384] <crossbar.master.cluster.webcluster.WebClusterMonitor.check_and_apply> No Web service currently running on path "info" for Web cluster worker cpw-c21a3142-0 web transport primary: starting web service ..
2022-03-16T01:25:59+0100 [Container  105384] <crossbar.master.arealm.arealm.ApplicationRealmMonitor.check_and_apply> Application realm role rle_ad17f8ca started on router cluster worker group1_1 [{'id': 'rle_ad17f8ca', 'config': {'name': 'swarm_user', 'permissions': []}}]
2022-03-16T01:25:59+0100 [Container  105384] <crossbar.master.arealm.arealm.ApplicationRealmMonitor.check_and_apply> No role rle_db14e58a currently running for router cluster worker group1_1: starting role ..
2022-03-16T01:25:59+0100 [Container  105384] <crossbar.master.cluster.webcluster.WebClusterMonitor.check_and_apply> Web service started on transport primary and path "info" [{'transport_id': 'primary', 'path': 'info', 'config': {'type': 'nodeinfo'}}]
2022-03-16T01:25:59+0100 [Container  105384] <crossbar.master.arealm.arealm.ApplicationRealmMonitor.check_and_apply> Application realm role rle_db14e58a started on router cluster worker group1_1 [{'id': 'rle_db14e58a', 'config': {'name': 'system', 'permissions': [{'uri': '', 'match': 'prefix', 'allow': {'call': True, 'register': True, 'publish': True, 'subscribe': True}, 'disclose': {'caller': True, 'publisher': True}, 'cache': False}]}}]
2022-03-16T01:25:59+0100 [Container  105384] No Web cluster worker cpw-c21a3142-1 currently running on node 03f94678-0258-44ba-a266-3f6e3334bf52: starting worker ..
2022-03-16T01:25:59+0100 [Container  105384] <crossbar.master.arealm.arealm.ApplicationRealmMonitor.check_and_apply> No role rle_ef3e1dff currently running for router cluster worker group1_1: starting role ..
2022-03-16T01:25:59+0100 [Container  105384] <crossbar.master.arealm.arealm.ApplicationRealmMonitor.check_and_apply> Application realm role rle_ef3e1dff started on router cluster worker group1_1 [{'id': 'rle_ef3e1dff', 'config': {'name': 'swarm_device', 'permissions': [{'uri': '', 'match': 'prefix', 'allow': {'call': True, 'register': True, 'publish': True, 'subscribe': True}, 'disclose': {'caller': True, 'publisher': True}, 'cache': False}]}}]
2022-03-16T01:25:59+0100 [Container  105384] <crossbar.master.arealm.arealm.ApplicationRealmMonitor.check_and_apply> No role rle_f92bc532 currently running for router cluster worker group1_1: starting role ..
2022-03-16T01:25:59+0100 [Container  105384] <crossbar.master.arealm.arealm.ApplicationRealmMonitor.check_and_apply> Application realm role rle_f92bc532 started on router cluster worker group1_1 [{'id': 'rle_f92bc532', 'config': {'name': 'repods_analytics', 'permissions': [{'uri': '', 'match': 'prefix', 'allow': {'call': False, 'register': False, 'publish': False, 'subscribe': True}, 'disclose': {'caller': True, 'publisher': True}, 'cache': False}]}}]

core node:

2022-03-16T01:25:59+0100 [Router     105430] Realm "rlm_250d3293" (name="realm1", authrole="trusted", authid="routerworker-group1_1-realm-rlm_250d3293-serviceagent") started
2022-03-16T01:25:59+0100 [Router     105430] Role rle_46834e52 named "anonymous" started on realm "realm1"
2022-03-16T01:25:59+0100 [Router     105430] Role rle_ad17f8ca named "swarm_user" started on realm "realm1"
2022-03-16T01:25:59+0100 [Router     105430] Role rle_db14e58a named "system" started on realm "realm1"
2022-03-16T01:25:59+0100 [Router     105430] Role rle_ef3e1dff named "swarm_device" started on realm "realm1"
2022-03-16T01:25:59+0100 [Router     105430] Role rle_f92bc532 named "repods_analytics" started on realm "realm1"