metron-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From merrimanr <>
Subject [GitHub] metron pull request #684: DO NOT MERGE: METRON-1086: Create a Blockly-based ...
Date Fri, 04 Aug 2017 22:54:00 GMT
GitHub user merrimanr opened a pull request:

    DO NOT MERGE: METRON-1086: Create a Blockly-based user interface for Stellar

    ## Contributor Comments
    This PR is a first look at the Blockly/Stellar integration with a working example.  This
is POC quality code and has a long way to go.  This is just an initial preview to kick off
the discussion, gather requirements, and work out a design.
    To take it for a test drive, spin up full dev and bring up the Management UI.  Open the
threat triage panel on the bro (or any) sensor and add the rule `EXISTS(ip_src_addr)`:
    ![screen shot 2017-08-04 at 5 21 51 pm](
    Click the Save button and then click on the block icon for the newly created rule.  This
will open the Stellar Blockly editor:
    ![screen shot 2017-08-04 at 5 24 10 pm](
    You will notice the rule that was just created is now represented as a series of connected
blocks with the rule displayed in a text box just below.  You can edit the rule by dragging,
dropping and interacting with various blocks that represent Stellar operators and functions.
 Try changing the rule to `EXISTS(ip_src_addr) && IS_DOMAIN(host)` like this:
    ![screen shot 2017-08-04 at 5 33 57 pm](
    The `&&` operator is under the **Boolean** category in the toolbox to the left.
 The `IS_DOMAIN` function is under **Stellar -> Domain**.  The purple block with the value
set to `host` represents a list of fields parsed from the json in the **SAMPLE** widget at
the top.  This block is in the **Fields** category.  If the `host` field doesn't appear in
the dropdown try getting new samples (right arrow) until you get a message that contains that
    ![screen shot 2017-08-04 at 5 43 59 pm](
    Once you get the correct Stellar statement, save the sensor config:
    ![screen shot 2017-08-04 at 5 39 25 pm](
    Open that rule again with the Blockly editor and you should see the block statement you
just created:
    ![screen shot 2017-08-04 at 5 41 12 pm](
    This preview contains only a subset of Stellar features and is very much incomplete. 
There is much more work to do.  For this demo it is shown in context of the threat triage
editor but could be used anywhere Stellar is exposed.  For now I will leave you with this
and let you form your own opinions about what it should evolve to.  After people have had
a chance to see it, we can continue the discussion on where this should go next.
    ## Pull Request Checklist
    Thank you for submitting a contribution to Apache Metron.  
    Please refer to our [Development Guidelines](
for the complete guide to follow for contributions.  
    Please refer also to our [Build Verification Guidelines](
for complete smoke testing guides.  
    In order to streamline the review of the contribution we ask you follow these guidelines
and ask you to double check the following:
    ### For all changes:
    - [x] Is there a JIRA ticket associated with this PR? If not one needs to be created at
[Metron Jira](

    - [x] Does your PR title start with METRON-XXXX where XXXX is the JIRA number you are
trying to resolve? Pay particular attention to the hyphen "-" character.
    - [x] Has your PR been rebased against the latest commit within the target branch (typically
    ### For code changes:
    - [ ] Have you included steps to reproduce the behavior or problem that is being changed
or addressed?
    - [ ] Have you included steps or a guide to how the change may be verified and tested
    - [ ] Have you ensured that the full suite of tests and checks have been executed in the
root metron folder via:
      mvn -q clean integration-test install && build_utils/ 
    - [ ] Have you written or updated unit tests and or integration tests to verify your changes?
    - [ ] If adding new dependencies to the code, are these dependencies licensed in a way
that is compatible for inclusion under [ASF 2.0](

    - [ ] Have you verified the basic functionality of the build by building and running locally
with Vagrant full-dev environment or the equivalent?
    ### For documentation related changes:
    - [ ] Have you ensured that format looks appropriate for the output in which it is rendered
by building and verifying the site-book? If not then run the following commands and the verify
changes via `site-book/target/site/index.html`:
      cd site-book
      mvn site
    #### Note:
    Please ensure that once the PR is submitted, you check travis-ci for build issues and
submit an update to your PR as soon as possible.
    It is also recommended that [travis-ci]( is set up for your personal
repository such that your branches are built there before submitting a pull request.

You can merge this pull request into a Git repository by running:

    $ git pull blockly-editor

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #684
commit 58eff702b6e3f490d1110adcbbef087238aa3d91
Author: merrimanr <>
Date:   2017-08-01T20:10:10Z

    initial commit

commit 397a74178815ca0ffdc5ea3b5c8afe2da481f3d2
Author: merrimanr <>
Date:   2017-08-04T22:08:16Z

    fixed deployment bug


If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message