MONARC Objects Sharing Platform
Presentation
MOSP is a platform for creating, editing and sharing validated JSON objects of any type.
You can use any available JSON schemas in order to create new JSON objects via a Web form dynamically generated and based on the selected JSON schema.
Since MOSP is a collaborative platform, all changes to JSON objects are tracked.
It is also possible to interact with MOSP programmatically thanks to its API. You can use PyMOSP if you need a client.
As example you can have a look at official instance operated by CASES and more particularly the objects shared by the MONARC project. The goal is to gather security related JSON objects, in the first place aimed to be used with MONARC. Some JSON objects can be exported to a MISP galaxy.
Installation
There are different ways to deploy MOSP.
Clone the repository and use a Python virtualenv
$ git clone https://github.com/CASES-LU/MOSP.git
$ cd MOSP/
$ npm install
$ poetry install
$ poetry shell
$ pybabel compile -d mosp/translations
$ export FLASK_APP=runserver.py
$ export FLASK_ENV=development
$ flask db_create
$ flask db_init
$ flask import_licenses_from_spdx
$ flask create_admin --login <login> --password <password>
$ flask run
* Serving Flask app "runserver" (lazy loading)
* Environment: development
* Debug mode: on
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 221-873-938
Deploy to Heroku
Manually with some simple commands:
$ git clone https://github.com/CASES-LU/MOSP.git
$ cd MOSP/
$ heroku create --region eu <name-of-your-instance>
$ heroku addons:add heroku-postgresql:hobby-dev
$ heroku config:set APPLICATION_SETTINGS='heroku.cfg'
$ heroku buildpacks:add --index 1 heroku/python
$ heroku buildpacks:add --index 2 https://github.com/heroku/heroku-buildpack-nodejs
$ git push heroku master
$ heroku run init
$ heroku run flask import_licenses_from_spdx
$ heroku ps:scale web=1
or simply with this button:
The default credentials are admin for the login and password for the password.
If you want to create other users programmatically:
$ heroku run flask create_user --login <nickname> --password <password>
$ heroku run flask create_admin --login <nickname> --password <password>
Contributing
Contributions are welcome and there are many ways to participate to the project. You can contribute to MOSP by:
- reporting bugs;
- suggesting enhancements or new features;
- improving the documentation;
- creating new objects on our instance.
Feel free to fork the code, play with it, make some patches and send us pull requests.
There is one main branch: what we consider as stable with frequent updates as hot-fixes.
Features are developed in separated branches and then regularly merged into the master stable branch.
Flask is used for the backend. Please use black for the syntax of your Python code.
Vanilla JS is the JavaScript framework used.
Documentation
A documentation is available on the MONARC website.
License
This software is licensed under GNU Affero General Public License version 3
- Copyright (C) 2018-2021 Cédric Bonhomme
- Copyright (C) 2018-2021 SECURITYMADEIN.LU
For more information, the list of authors and contributors is available.