Giter Club home page Giter Club logo

artemis's People

Contributors

albertodainotti avatar alistairking avatar andrewyager avatar coredump17 avatar curiouzk0d3r avatar dependabot-preview[bot] avatar dependabot-support avatar georgeepta avatar jajeffries avatar kruisdraad avatar leopoul avatar pgigis avatar pputerla avatar rvandepu avatar slowr avatar tobpip avatar vkotronis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

artemis's Issues

Failed DB query

Describe the bug
Something causes a query to fail when updating a hijack. Exception suggests that the values are empty but I think this should never happen.

Affected Component(s)

  • Back-End (Database, Microservices, Containers, etc)
  • Front-End (Flask, API, etc)
  • Docs
  • Build System

To Reproduce
Unknown behavior. Observed when monitorint /0 prefix.

Expected behavior
No exception and normal handling of the update/hijack.

Screenshots
image

System (please complete the following information):
N/A

Additional context
N/A

Sort BGP hijacks based on their last updated time field

Is your feature request related to a problem? Please describe.
Right now hijacks are sorted based on their detection timestamp (time_detected).

Describe the solution you'd like
Hijacks should be sorted based on their time_last field. The time selection (24h, etc.) should also be based on this field from now on. The appropriate index should also be added to the db (migration required).

Describe alternatives you've considered
N/A

Additional context
N/A

Nicer lists and AS-tooltips for peers seen hijack Updates/Withdrawals and distinct values

Is your feature request related to a problem? Please describe.
In Hijack view, the lists of the peers seen hijack updates and withdrawals are not beautified, and the tooltip is missing.

Describe the solution you'd like
When someone presses on the button(s) to show the list(s), show the list as follows:

  • AS1
  • ...
  • ASN
    (make them scrollable, to fit in the page). Also:
  • keep the lists sorted (ascending order)
  • add tooltips for the ASNs involved.
    Minor: also please change the name from "Seen Hijack BGP update" --> "Seen Hijack BGP Announcement".
    Witthdrawals are also updates.

Follow the same principle for distinct value lists in BGP updates and hijacks.

Describe alternatives you've considered
N/A

Additional context
N/A

Function to translate an (ongoing) hijack event into an ARTEMIS-compatible dictionary

Is your feature request related to a problem? Please describe.
We need a function that translates a hijack event (accompanied by its relevant update entries) into an ARTEMIS rule (plus prefixes and ASNs), assuming that the event is marked as ignored, and should thus be learned in the configuration. Note that to have the info on (origin, neighbors) for this event, the event needs to be ongoing.

Describe the solution you'd like
The function should receive a hijack event information (together with its BGP updates) as an input (in the configuration module, consuming from rabbitmq) and generate a dict as follows (the dict will be translated to yaml primitives in issue #23):

[E|S]|0|*|* hijack
-->

{ 
  prefix: <hijacked_prefix>,
  origin_asns: [
    <hijacker_asn>
  ]
  neighbors: [
    <neighbor_seen_in_update_1>,
    ...,
    <neighbor_seen_in_update_N>
  ]
}

[E|S]|1|*|* hijack
-->

{ 
  prefix: <hijacked_prefix>,
  origin_asns: [
    <origin_seen_in_update_1>,
    ...,
    <origin_seen_in_update_N>
  ],
  neighbors: [
    <hijacker_asn>
  ]
}

[E|S]|-|*|* hijack
-->

{ 
  prefix: <hijacked_prefix>,
  origin_asns: [
    <origin_seen_in_update_1>,
    ...,
    <origin_seen_in_update_N>
  ],
  neighbors: [
    <neighbor_seen_in_update_1>,
    ...,
   <neighbor_seen_in_update_N>
  ]
}

Q|0|*|* hijack
-->

{ 
  prefix: <hijacked_prefix>,
  origin_asns: [
    <origin_seen_in_update_1>,
    ...,
    <origin_seen_in_update_N>
  ],
  neighbors: [
    <neighbor_seen_in_update_1>,
    ...,
   <neighbor_seen_in_update_N>
  ]
}

Describe alternatives you've considered
N/A

Additional context
N/A

Documentation fix on enabling additional services

Describe the bug
Documentation - https://github.com/FORTH-ICS-INSPIRE/artemis/wiki#starting-artemis - mentions:
...
or if you want additional services:
docker-compose -f docker.compose.yaml -f docker_compose.<extra_service>.yaml up -d
...
It should be:
or if you want additional services:
docker-compose -f docker-compose.yaml -f docker-compose.<extra_service>.yaml up -d

  • docker.compose.yaml => docker-compose.yaml
  • docker_compose.<extra_service>.yaml => docker-compose.<extra_service>.yaml

Affected Component(s)

  • Back-End (Database, Microservices, Containers, etc)
  • Front-End (Flask, API, etc)
  • Docs
  • Build System

To Reproduce
Steps to reproduce the behavior:

  1. Try to enable grafana: docker-compose -f docker.compose.yaml -f docker_compose.grafana.yaml up -d
  2. Error: ERROR: .FileNotFoundError: [Errno 2] No such file or directory: './docker.compose.yaml'
  3. Fix docker.compose.yaml to : docker-compose -f docker-compose.yaml -f docker_compose.grafana.yaml up -d
  4. Error: ERROR: .FileNotFoundError: [Errno 2] No such file or directory: './docker_compose.grafana.yaml'
  5. Fix: docker-compose -f docker-compose.yaml -f docker-compose.grafana.yaml up -d

Expected behavior
No error when running command for additional services

Screenshots
N/A

System (please complete the following information):

  • OS: Centos 7
  • Version: Artemis 1.0.0

Additional context
N/A

Expand/Collapse field in overview for same multiple modules

Is your feature request related to a problem? Please describe.
When we run many instances of the same module the status overview gets really difficult to read.

Describe the solution you'd like
We need to group the same instances and expand/collapse them when we want to check their status.

Describe alternatives you've considered
N/A

Additional context
N/A

Generate hijack types in 3 dimensions and migrate DB

Is your feature request related to a problem? Please describe.
Currently we conflate hijacks in different dimensions with one single character

Describe the solution you'd like
Use three dimensions: 1) Exact (E) or Sub (S) prefix, 2) Path manipulation (Q|0|1|-),
3) Data plane (-). So the format will consist of 3 characters: ||
So, current types: 0 --> E|0|-, 1 --> E|1|-, S --> S|-|-, Q - -> E|Q|-
Also update detection code to correctly mark these hijacks (especially sub-prefix ones).
And make sure that the frontend deals with the new types (and explain properly in tooltip)

Describe alternatives you've considered
N/A

Additional context
https://arxiv.org/pdf/1801.01085.pdf
Section 2, Table 1

Tooltip for ASes does not work in BGP updates and hijacks

Describe the bug
Tooltip for ASes does not work in BGP updates and hijacks

Affected Component(s)

  • Back-End (Database, Microservices, Containers, etc)
  • Front-End (Flask, API, etc)
  • Docs
  • Build System

To Reproduce
Steps to reproduce the behavior:

  1. Go to BGP updates or hijacks tables (or updates in hijacks)
  2. Hover over fields that involve ASNs.
    3.Nothing is shown (not normal behavior)

Expected behavior
Showing tooltip information.

Screenshots
N/A

System (please complete the following information):

  • OS: Linux
  • Browse: Firefox

Additional context
N/A

Unable to change default rabbitmq credentials

Describe the bug
If you update the rabbitmq default username/password in the .env file with a custom username/password the backend process will be unable to connect to rabbitmq.

Affected Component(s)

  • Back-End (Database, Microservices, Containers, etc)
  • Front-End (Flask, API, etc)
  • Docs
  • Build System

To Reproduce
Steps to reproduce the behavior:
Change username or password in the .env file and try to docker-compose -up. You will end up with a 502 if you try to load the site as it cannot properly connect to rabbitmq.

Expected behavior
Updating the default password in the .env file should pass the credentials to the docker containers so we can use custom passwords.

Screenshots
If applicable, add screenshots to help explain your problem.

System (please complete the following information):

  • OS: [e.g. iOS] RHEL7.6
  • Browser [e.g. chrome, safari] Chrome
  • Version [e.g. 22] 1.1.0

Additional context
@slowr : yes we need to change the URLs in the modules because they don't use these credentials

Implement sample frontend ARTEMIS testing workflow

Is your feature request related to a problem? Please describe.
Currently we do not have a formal workflow to test ARTEMIS functionality in the frontend

Describe the solution you'd like
Use automated browser tools (such as Selenium https://www.seleniumhq.org/ ) to test the interaction between a -simulated- user and the frontend. Check how this can be combined with backend testing (#36)

Describe alternatives you've considered
N/A

Additional context
https://www.pluralsight.com/guides/testing-user-interfaces-with-browser-automation

Pre-commit hooks

Is your feature request related to a problem? Please describe.
We can use pre-commit hooks to avoid having style or other similar related issues when pushing new code.

Describe the solution you'd like
We can follow the guides in: https://pre-commit.com/

Describe alternatives you've considered
N/A

Additional context
N/A

Changes in default config should not affect production configs

Is your feature request related to a problem? Please describe.
When we (developers) change sth in default ARTEMIS config.yaml (backend), this change
should not cause any hurdle when deployers download the latest master and have their system versions updated

Describe the solution you'd like
No hurdles, or at least a documented workflow when upgrading and downloading the latest master branch (emphasis in config.yaml and compose.yaml)

Describe alternatives you've considered
N/A

Additional context
N/A

Unable to docker-compose up

Describe the bug
I get the following error when running docker-compose up.

Pulling backend (inspiregroup/artemis-backend:release-1.0.0)...
release-1.0.0: Pulling from inspiregroup/artemis-backend
54f7e8ac135a: Pull complete
d6341e30912f: Pull complete
087a57faf949: Pull complete
5d71636fb824: Pull complete
0c1db9598990: Pull complete
2eeb5ce9b924: Pull complete
a8c530378055: Pull complete
687ed2fb2a0d: Pull complete
620aea26e853: Pull complete
d1f69edf51b4: Pull complete
d521975a68ff: Pull complete
d6bfccd2c905: Pull complete
4ae245b6935d: Pull complete
58a72a140d62: Pull complete
7490874e1599: Pull complete
60c0048962c3: Extracting [==================================================>] 767.5kB/767.5kB
64bea18216f5: Download complete
2c8b54a5a101: Download complete
de349e122938: Download complete
04968a44e8f8: Download complete
c7f9972b77fa: Download complete
78c5c5662f4a: Download complete
c62301620d19: Download complete
b57b1a7f21cd: Download complete
9ea41fa60b16: Download complete
5ab8a96196e4: Download complete
960687b25614: Download complete
edf4a9369020: Download complete
ERROR: failed to register layer: ApplyLayer exit status 1 stdout: stderr: lchown /root/src/wandio-1.0.4: invalid argument

Affected Component(s)

  • Back-End (Database, Microservices, Containers, etc)
  • Front-End (Flask, API, etc)
  • Docs
  • Build System

To Reproduce
Steps to reproduce the behavior:

  1. run docker-compose up -d

Expected behavior
I expect the images to build.

Screenshots
If applicable, add screenshots to help explain your problem.

System (please complete the following information):

  • OS: ubuntu 18.04

docker-compose --version

docker-compose version 1.20.0, build ca8d3c6

docker -v

Docker version 18.09.0, build 4d60db4

Additional context
Add any other context about the problem here.

Translate ARTEMIS-compatible dictionary into YAML primitives

Is your feature request related to a problem? Please describe.
We need to be able to translate the dictionary generated by #22 into proper YAML.

Describe the solution you'd like
The function should receive the translated dictionary from #22 as a input, and an existing YAML ARTEMIS config file, and add the following to the file:

The following are just examples. Think about the translation!

E|0|-|- hijack
-->

prefixes:
    ...: &...
        ...
    ignored_<dict['prefix']>: &ignored_<dict['prefix']>
       <dict['prefix']>
...
asns:
    ...: &...
        ...
    ignored_<dict['origin_asns'][0]>: &ignored_<dict['origin_asns'][0]>
        <dict['origin_asns'][0]>
    ignored_<dict['neighbors'][0]>: &ignored_<dict['neighbors'][0]>
        <dict['neighbors'][0]>
    ...
...
rules:
...
- prefixes:
  - * ignored_<dict['prefix']>
  origin_asns:
  -  *ignored_<dict['origin_asns'][0]>
  neighbors:
  - *ignored_<dict['neighbors'][0]>
  - ...

E|1|-|- hijack
-->

prefixes:
    ...: &...
        ...
    ignored_<dict['prefix']>: &ignored_<dict['prefix']>
       <dict['prefix']>
...
asns:
    ...: &...
        ...
    ignored_<dict['origin_asns'][0]>: &ignored_<dict['origin_asns'][0]>
        <dict['origin_asns'][0]>
    ...
    ignored_<dict['neighbors'][0]>: &ignored_<dict['neighbors'][0]>
        <dict['neighbors'][0]>
...
rules:
...
- prefixes:
  - * ignored_<dict['prefix']>
  origin_asns:
  -  *ignored_<dict['origin_asns'][0]>
  - ...
  neighbors:
  - *ignored_<dict['neighbors'][0]>

S|*|-|- hijack
-->

prefixes:
    ...: &...
        ...
    ignored_<dict['prefix']>: &ignored_<dict['prefix']>
       <dict['prefix']>
...
asns:
    ...: &...
        ...
    ignored_<dict['origin_asns'][0]>: &ignored_<dict['origin_asns'][0]>
        <dict['origin_asns'][0]>
    ...
    ignored_<dict['neighbors'][0]>: &ignored_<dict['neighbors'][0]>
        <dict['neighbors'][0]>
    ...
...
rules:
...
- prefixes:
  - * ignored_<dict['prefix']>
  origin_asns:
  -  *ignored_<dict['origin_asns'][0]>
  - ...
  neighbors:
  - *ignored_<dict['neighbors'][0]>
  - ...

Q|0|-|- hijack
-->

prefixes:
    ...: &...
        ...
    ignored_<dict['prefix']>: &ignored_<dict['prefix']>
       <dict['prefix']>
...
asns:
    ...: &...
        ...
    ignored_<dict['origin_asns'][0]>: &ignored_<dict['origin_asns'][0]>
        <dict['origin_asns'][0]>
    ...
    ignored_<dict['neighbors'][0]>: &ignored_<dict['neighbors'][0]>
        <dict['neighbors'][0]>
    ...
...
rules:
...
- prefixes:
  - * ignored_<dict['prefix']>
  origin_asns:
  -  *ignored_<dict['origin_asns'][0]>
  - ...
  neighbors:
  - *ignored_<dict['neighbors'][0]>
  - ...

||-|L hijack:
same as previous, remove the no-export policy (talk with @vkotronis if you reach this stage).

Describe alternatives you've considered
N/A

Additional context
N/A

Check if .env can get out of version control for security reasons

Is your feature request related to a problem? Please describe.
Currently .env is version-controlled, but it contains secrets; accidentally overwriting it by a fresh install vs. accidently pushing to git are risks. Therefore, we need to check how to handle this properly, e.g., pushing this too in local_configs.

Describe the solution you'd like
Check a possible solution to the location problem and the writing of secrets on disk.

Describe alternatives you've considered
N/A

Additional context
docker/compose#6170

Enable config format from rfc2622 for prefixes

Is your feature request related to a problem? Please describe.
We have a lot of very large subnets, /10s and such, so having to list them as /24s is rough and makes for a huge config file.

Describe the solution you'd like
It would be nice to allow the config format to use some operators like what we use with our IRRs (RADB) route-sets. They follow rfc2622 which has a few operators, although I'm personally only interested in ^n.

^n where n is an integer, stands for all the length n specifics of
the address prefix. For example, 30.0.0.0/8^16 contains all the
more specifics of 30.0.0.0/8 which are of length 16 such as
30.9.0.0/16.

Describe alternatives you've considered
none, except leaving as is.

Additional context
Example:

10.0.0.0/8^24 would match all the /24s in the /8, but only require a tiny config, instead of hundreds of /24s.

Allow wildcard in origins to prevent squatting alerts

Is your feature request related to a problem? Please describe.
Currently, if a configured prefix (or group of prefixes) is associated with no origins/neighbors in a rule,
any announcement is considered as a squatting attack. We need to enable the user to "wildcard" origins.

Describe the solution you'd like
origin_asns: '*' (star as a wildcard --> needs to be translated to an integer if we have a conf check probably).
Neighbors can be omitted (this works already now, with valid origins --> no alert).
Please also check if automated tests could be added for this case.

Describe alternatives you've considered
NA

Additional context
NA

Explicit user-controlled deletion of multiple hijacks

Is your feature request related to a problem? Please describe.
The user currently cannot delete hijacks using the UI

Describe the solution you'd like
This should be done after #34 is solved (will require hasura for "IN"-like searching in key lists).

UI button and backend db functionality to delete multiple hijacks and their related BGP updates.
Make sure that there is an "Are you sure?" banner before confirming final deletion.
This issue needs frontend support (UI) via graphql (delete hijacks and updates from db).
Delete only updates that belong to a single hijack, remove the key from the ones that belong to multiple (like withdrawals). Make sure that the UI is usable during the transition (e.g., you can delete first the hijack events and then the updates for safety).
We need a "delete" button within a hijack, and "delete" in the hijack table for multiple hijacks.

Describe alternatives you've considered
N/A

Additional context
N/A

Discard non-hijack BGP updates older than a certain age

Is your feature request related to a problem? Please describe.
Benign BGP updates that are older than a certain age are not currently deleted.

Describe the solution you'd like
ENV variable (e.g., DEL_NON_HIJ_UPDATES_AFTER) to specify maximum age for benign BGP updates, and functionality (backend) that deletes
the old BGP updates (only those not related to a hijack). Default value = None, which means no deletion.
Updates can be cleared periodically from the db using a clock signal (e.g., every hour)

Describe alternatives you've considered
N/A

Additional context
N/A

Restoring from database backup fails

Describe the bug
Trying to follow the wiki for restoring the database but its failing on import as it thinks all of the tables already exist

Affected Component(s)

  • Back-End (Database, Microservices, Containers, etc)
  • Front-End (Flask, API, etc)
  • Docs
  • Build System

To Reproduce
Steps to reproduce the behavior:

  1. Install a fresh release or git clone
  2. Try to follow wiki

Expected behavior
It should just fill all of the data from the old db into the new one.

Screenshots
If applicable, add screenshots to help explain your problem.

System (please complete the following information):

  • OS: [e.g. iOS] RHEL7.6
  • Browser [e.g. chrome, safari] n/a
  • Version [e.g. 22] 1.1.0

Additional context
postgres_errors.txt

Detach monitor functionality to other container with separate supervisor

Is your feature request related to a problem? Please describe.
The taps on the backend compete for resources with the detection and database. We need to check if we can separate them in a different container for scalability reasons.

Describe the solution you'd like
Without changing anything in the configuration logic and control mechanisms (e.g., UI monitor on/off), need to check if we can detach and monitor.py taps from backend
and clone listener.py and supervisor in a new "taps" container

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Firefox < 64 throws Syntax Error on Token Parsing

Describe the bug
Old Firefox versions returns different Content-Type that throws a Syntax Error and disables all the communication with GraphQL.
https://stackoverflow.com/questions/34624099/json-syntax-error-in-firefox-only

Affected Component(s)

  • Back-End (Database, Microservices, Containers, etc)
  • Front-End (Flask, API, etc)
  • Docs
  • Build System

To Reproduce
Open tool with Firefox and JWT tokens will not be retrievable.

Expected behavior
parseJSON should work on all browsers.

Screenshots
image

System (please complete the following information):

  • Firefox 60.0

Additional context
N/A

Hijack view needs additional tooltips

Is your feature request related to a problem? Please describe.
On hijack view, the tooltip for the hijacker AS on the hijack table and for the route collectors on the bgp update table are not activated.

Describe the solution you'd like
Add/activate the tooltips, as done in other tables (e.g., BGP update).
Also check that the route collector tooltip works in "More" view within a BGP update entry of the hijack view.

Describe alternatives you've considered
N/A

Additional context
N/A

User to supply yes-export (no-export exceptions) ASNs in configuration

Is your feature request related to a problem? Please describe.
When no export is supported, the user needs to specify no-export exceptions, so that we also catch violations with path lengths = 2 (currently we assume that the last hops are monitors, and all of them have export rights).

Describe the solution you'd like
User-supplied list of no-export exceptions (ASNs)

Describe alternatives you've considered
N/A

Additional context
#101

Add gif with full ARTEMIS workflow to README

Is your feature request related to a problem? Please describe.
Currently, besides this wiki page, we do not have a gif for a full ARTEMIS workflow on README.

Describe the solution you'd like
Gif showing a lifecycle of ARTEMIS use:

  1. Log-in as admin to ARTEMIS (no need to focus on registration; minor)
  2. Update the configuration (make it on purpose wrong to trigger a hijack alert)
  3. Initiate detection and monitoring
  4. check BGP updates
  5. check ovevriew; new incoming hijack
  6. view the hijack
  7. acknowledge the hijack
  8. comment and resolve
  9. check hijacks table

Describe alternatives you've considered
Think of other things that could go in the gif.

Additional context
Need low-size gif that can be rendered in a .md file.

No-export support in configuration rules

Is your feature request related to a problem? Please describe.
Support no-export prefixes

Describe the solution you'd like
Add an additional field on the configuration rules to enable no-export functionality

Describe alternatives you've considered
N/A

Additional context
N/A

Front End improvements

Is your feature request related to a problem? Please describe.
Nope. Its only improvements.

Describe the solution you'd like

  1. Add filter by type on hijacks.
  2. View hijack by its key.
  3. Sort Hijacks using # Peer Seen and # ASes infected.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Implement sample backend ARTEMIS testing workflow

Is your feature request related to a problem? Please describe.
Currently we do not have a formal workflow to test ARTEMIS functionality in the backend

Describe the solution you'd like

  1. Generate test BGP updates

  2. Feed them into the monitor module

  3. Make sure that rabbitmq handles updates correctly

  4. Make sure the updates make it to the db properly

  5. If related to hijacks, make sure the correct hijacks are created (detection module) and handled by watching rabbitmq

  6. Make sure that the hijacks make it to the db properly

  7. Make sure that consequent updates for the same hijack, update the hijack

  8. Other possible steps

Describe alternatives you've considered
N/A

Additional context
N/A

Optimize multiline string formation in display_info.js

Describe the bug
The current formation is not optimal.

Affected Component(s)

  • Back-End (Database, Microservices, Containers, etc)
  • Front-End (Flask, API, etc)
  • Docs
  • Build System

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
N/A

Screenshots
N/A

System (please complete the following information):
N/A

Additional context
N/A

UI issues

Describe the bug

  • Change Hijack AS to Hijacker AS
  • Fix indentation on hijacks table
  • Make more clear the buttons of navbar
  • Change Timewindow phrase on BGP Updates, Hijacks tables and fix bug with custom window.
  • Change Hijack tags.

Affected Component(s)

  • Back-End (Database, Microservices, Containers, etc)
  • Front-End (Flask, API, etc)
  • Docs
  • Build System

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

System (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Upon pressing "hijack ignore" prompt the user about adding the event as a rule in config

Is your feature request related to a problem? Please describe.
Trigger workflow of ignored hijack learning upon user request.

Describe the solution you'd like
When a user presses "hijack ignore", a UI prompt should ask: "Add this event to ARTEMIS configuration?". If yes, then the workflow of issue #25 should be followed. If no, nothing should happen (like in the current implementation). A positive answer should result to a message with the hijack information (including the related BGP updates, queried via graqhql) being sent to the configuration module.

Describe alternatives you've considered
N/A

Additional context
N/A

Investigate how to properly test micro-services

Is your feature request related to a problem? Please describe.
Currently, backend testing is not automated

Describe the solution you'd like
Check and integrate framework to automate the testing of micro-services

Describe alternatives you've considered
N/A

Additional context
N/A

Dormant flag and tag for hijack alerts that are not updated in a time window

Is your feature request related to a problem? Please describe.
When a hijack alert has not seen any updates for a user-defined time window (e.g., 24 hours), it should
be considered still active (ongoing), but also have an extra tag called "dormant". There is no need to change existing DB constraints for this, except add a constraint that active and dormant flags cannot be set as (false, true), but need to be within [(true, true), (true, false), (false, false)].

Describe the solution you'd like
An extra "dormant" field in the db (defaulting to false), that is automatically set if the alert has not seen sth for at least X hours (defined by the user in .env). This can be dealt with with a cron job in postgres, that does sth like this in pseudocode:

SELECT all hijack alerts with time_last < NOW - interval, which have the active flag set to True and the dormant flag to False, and set the dormant flag to True.

This will also require support from the frontend, since a new tag is added. Note that whenever the active flag is set to false, the dormant flag should also change too (see proposed constraints).

Whenever the time_last is updated (see database.py actions), the dormant flag should be directly set to False again!

DB migration will also be required to add the new field in the hijacks table.

This change will require changes in the wiki too.

Describe alternatives you've considered
N/A

Additional context
N/A

Plot BGP updates/sec in grafana

Is your feature request related to a problem? Please describe.
Plotting BGP updates per second.

Describe the solution you'd like
A plot in grafana.

Describe alternatives you've considered
Grafana applies DB polling (we can set it every 10 seconds or so, depending on an .env variable). The user selects if he/she will start grafana or not in the compose file. Connection to the db cna be implemented by accessing the .env variables.

Additional context
http://docs.grafana.org/reference/sharing/#embed-panel

Adjust ripe ris taps to use the new RIS service

Is your feature request related to a problem? Please describe.
Need to adjust to the RIPE RIS prod service for live BGP feeds.

Describe the solution you'd like
Example:

"""
Subscribe to a RIS Live stream and output every message to stdout.

IMPORTANT: this example requires 'websocket-client' for Python 2 or 3.

If you use the 'websockets' package instead (Python 3 only) you will need to change the code because it has a somewhat different API.
"""
import json
import websocket

ws = websocket.WebSocket()
ws.connect("wss://ris-live.ripe.net/v1/ws/?client=py-example-1")
params = {
    "moreSpecific": True,
    "host": "rrc21",
    "socketOptions": {
        "includeRaw": True
    }
}
ws.send(json.dumps({
	"type": "ris_subscribe",
	"data": params
}))
for data in ws:
    parsed = json.loads(data)
    print(parsed["type"], parsed["data"])

For iding the message, please add support for an ENV signaling e.g., the AS that requests this information, prefixed by "artemis", e.g.,

ws.connect("wss://ris-live.ripe.net/v1/ws/?client=artemis-AS<ASN>")

Describe alternatives you've considered
Javascript implementation

Additional context
https://ris-live.ripe.net/

Auto-Detect Migration

Is your feature request related to a problem? Please describe.
Need to implement an alert that will inform users when to run the database migration process.

Describe the solution you'd like
On container's entrypoint there will be a compare of database's DB_VERSION and current's source code DB_VERSION.

Describe alternatives you've considered
N/A

Additional context
N/A

Treat internal "seen" field as indicator for hijack True/False Pos ack

Is your feature request related to a problem? Please describe.
Right now we treat ignore as an implicit FP and resolve as an implicit TP.

Describe the solution you'd like
Use the already available field (orthogonal to the tagging mechanism), to help the user signal this explicitly. Ignore would still trigger a non-ack, while resolved and mitigate an ack.

Describe alternatives you've considered
New field, but since we already have an internal one (and we can do without migrating the DB again), this is quite cost-effective.

Additional context
N/A

Investigate how we can automatically mark implicit withdrawals on hijacks with corrected paths

Is your feature request related to a problem? Please describe.
Currently we mark a hijack as withdrawn only upon receiving explicit withdrawals. However,
hijacked paths can be implicitly withdrawn (e.g., by being changed to a legal path).

Describe the solution you'd like
Investigate how we can treat path changes as implicit withdrawals (we can use the currently available fields, no need for db changes). For example, if a new benign BGP update comes, and it includes a path to a prefix P and is learned from monitor X, and P and X are the prefix and one of the monitors of an ongoing hijack, then we can mark X as having seen a withdrawal.

Optional, to discuss: Note that if the benign update is for a sub-prefix of a currently hijacked prefix, then we need to see all sub-prefixes that build the hijacked super-prefix being corrected. to consider a monitor withdrawal.

Describe alternatives you've considered
N/A

Additional context
N/A

Add gifs/pictures for UI how-to

Is your feature request related to a problem? Please describe.
Currently we do not have visual examples of ARTEMIS UI in the wiki and README

Describe the solution you'd like
Create gifs/pictures for the different functionalities of the tool. Examples:

  • Register user
  • Overview
  • BGP updates table
  • Hijacks table
  • Hijack view
  • System view (modules & config)
  • Config historical comparison
  • Visualization

Describe alternatives you've considered
N/A

Additional context
N/A

Public API using authentication

Is your feature request related to a problem? Please describe.
Nope

Describe the solution you'd like
Expose the graphql API to the outside world using custom authentication

Describe alternatives you've considered

Additional context

Redis Backend Testing

Is your feature request related to a problem? Please describe.
We should add a test that validates the redis entries to avoid future system failures.

Describe the solution you'd like
We could try using the SUBSCRIBE method of redis to receive all new incoming messages.

Describe alternatives you've considered
N/A

Additional context
N/A

Investigate slow handling of incoming BGP updates (update: fix withdrawal query)

Describe the bug
The BGP updates in 1.1.0 seem to be handled much slower than in the past.
It is either a bottleneck in the db or the detection microservice. I could manage
to replicate it only on an installation with a large DB (>1M BGP updates), and detection
seems to operate as expected (expected speeds). So maybe a bottleneck query that takes
into account the size of the DB is taking place. Or maybe it is only a visual delay.

Affected Component(s)

  • Back-End (Database, Microservices, Containers, etc)
  • Front-End (Flask, API, etc)
  • Docs
  • Build System

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
The speed should be back up at normal levels.

Screenshots
N/A

System (please complete the following information):
N/A

Additional context
ARTEMIS release-1.1.0

Bug with user roles

Describe the bug
When a new user registers on the system the primary user role is 'pending'. However, it also has a secondary role the default 'user' role.

Affected Component(s)

  • Back-End (Database, Microservices, Containers, etc)
  • Front-End (Flask, API, etc)
  • Docs
  • Build System

Expected behavior
User should only have the 'pending' user role.

Migrate UI functions from REST to hasura

Is your feature request related to a problem? Please describe.
The hijack view and AS-PATH search are REST-based instead of graphql (hasura-) based.
This is because currently the "IN" query for lists is not implemented in hasura (under development).

Describe the solution you'd like
Migrate REST to hasura functions by creating custom "IN" membership function

Describe alternatives you've considered
N/A

Additional context
hasura/graphql-engine#1073

Integrate workflow for adding an ignored hijack event in ARTEMIS config

Is your feature request related to a problem? Please describe.
End-to-end workflow for adding an ignored hijack event in ARTEMIS config.

Describe the solution you'd like

  1. Upon pressing "hijack ignore" prompt the user about adding the event as a rule in config (#24)
  2. If yes, then translate the (ignored) hijack event into an ARTEMIS-compatible dictionary (#22) following: frontend --> rabbitmq --> config
  3. Translate the ARTEMIS-compatible dictionary into YAML primitives and update the config.yaml file (#23) following config --> config file

Describe alternatives you've considered
N/A

Additional context
N/A

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.