NY_GateKeeperPlugIn

A gatekeeper with rifle at the barrier, van Gogh

The gatekeeper is a service that filters messages intended for the node itself according to IDs, origin and/or destination. Messages that merely pass through the node on their way to other nodes are not filtered.

Which messages were able to pass the gatekeeper and which were rejected can be seen in the LOG.

The gatekeeper rules are expected in the preference node "network/gatekeeper". Each rule key consists of the word "rule" followed by some unique number. Each rule value consists of exactly 6 entries in one line, separated by commas. Some values may be missing.

Example:

This rule lets all messages pass. It is valuable in that you get logged all messages that pass the gatekeeper during operation.

rule001 = +,,,,,all

Rule columns

Position Example Meaning Mandatory
1 + or - + means allow messages, - means block messages yes
2 20022 The local TCP port number (random for outgoing connections) no
3 79e8304a-b6bb-4fc5-9acb-d8f930017ec0 A record ID no
4 SYSTEM receiver namespace id no
5 sun.ss sender node id no
6 Broadcast 1 a description yes

Example for a configuration file

# nyssr.net
preference.node.name = network/gatekeeper
preference.node.clear.first = true
preference.key.overwrite.existing = true

# payload
# allow all
rule001 = +,,,,,all
# allow Ping messages from everywhere
rule002 = +,,73265,,,Ping
# block 79e8304a-b6bb-4fc5-9acb-d8f930017ec0 (BroadcastTransportMsg) from port 20000
rule003 = -,20000,79e8304a-b6bb-4fc5-9acb-d8f930017ec0,,,Broadcasts
# block any message from the node "sun.ss"
rule003 = -,,,,sun.ss,all from sun

LOG output

The LOG output uses the logger "".

Here is an example of a LOG output.

+ Gate=51892, ID=79e8304a-b6bb-4fc5-9acb-d8f930017ec0 (BroadcastTransportMsg), sender=BROADCAST.TRANSPORT.sun.ss, receiver=.SYSTEM.ceres.ss
+ Gate=51892, ID=93df1c45-725d-4f57-83b8-41cc6dfdb93a, sender=12.MicroServiceReg-4.sun.ss, receiver=.SYSTEM.ceres.ss
+ Gate=51892, ID=be46c53e-e544-4e76-8c44-01f8c144254c, sender=12.MicroServiceReg-4.sun.ss, receiver=5.SYSTEM.ceres.ss
+ Gate=51892, ID=79e8304a-b6bb-4fc5-9acb-d8f930017ec0 (BroadcastTransportMsg), sender=BROADCAST.TRANSPORT.sun.ss, receiver=.SYSTEM.ceres.ss
+ Gate=51892, ID=986a7cf9-dcec-47a9-b2e8-77a2348ed384, sender=8.LinkCostCollector-3.sun.ss, receiver=4.TRANSPORT.ceres.ss
+ Gate=51892, ID=79e8304a-b6bb-4fc5-9acb-d8f930017ec0 (BroadcastTransportMsg), sender=BROADCAST.TRANSPORT.sun.ss, receiver=.SYSTEM.ceres.ss

Example for a LOG configuration

# nyssr.net
preference.node.name = logging/writer/file/levels
preference.node.clear.first = true
preference.key.overwrite.existing = true

# payload
startup = TRACE
network = INFO
de.sillysky.nyssr.impl.network.gatekeeper.CGateKeeper = DEBUG

nyssr.net - Innovative Distributed System