reaktivity / k3po-nukleus-ext.java

K3PO Nukleus Extension
Apache License 2.0
0 stars 9 forks source link

Added nukleus:authorization connect and accept options #19

Closed cmebarrow closed 7 years ago

cmebarrow commented 7 years ago

Syntax is like:

connect "nukleus://server/streams/client"
        option nukleus:route ${newRouteRef}
        option nukleus:authorization [0x01 0x00 0xc0] 
        option nukleus:transmission "duplex"
        option nukleus:window 8192
connected

accept "nukleus://server/streams/client"
       option nukleus:route ${newRouteRef}
       option nukleus:authorization [0x01 0x00 0xc0]
       option nukleus:transmission "half-duplex"
       option nukleus:window 8192
accepted

In this case the bits are set to indicate security nukleus identifier of 1 and the first two role bits are set. The option value can be any number of hex bytes up to 8. A longer value results in IllegalArgumentException. The accept option requires all incoming frames to have those exact authorization bits (exact matching is needed for rigorous tests, to verify for example that the correct authorization bits have been set by a security nukleus, or passed through by any nukleus). The connect option causes the specified authorization bits to be put on all outgoing frames.

This PR requires https://github.com/reaktivity/nukleus.spec/pull/15

cmebarrow commented 7 years ago

@jfallows John, I realized that for testing purposes I need an exact match for the accept option, so I have make changes to enforce that.

cmebarrow commented 7 years ago

@jfallows Feedback applied