This repository has been archived by the owner on Dec 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from vrtadmin/dev
Merge dev branch into master
- Loading branch information
Showing
46 changed files
with
2,597 additions
and
1,397 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,3 +55,4 @@ docs/_build/ | |
|
||
# PyBuilder | ||
target/ | ||
server/first_config.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,9 +17,16 @@ Installing your own FIRST server can be quick and easy with an Ubuntu machine an | |
|
||
**After cloning the Git repo** | ||
|
||
Save your google auth json information to install/google_secret.json | ||
Save your google auth json information to install/google_secret.json. To generate a google_secret.json file you will need to go to https://console.developers.google.com, create a project, select the project, select Credentials in the left set of links under APIs & services. Once selected, select the Create credentials drop down menu and click OAuth client ID. Select Web application, and fill out the details. Set the Authorized redirect URIs to your server name with `/oauth/google` | ||
|
||
Optionally, you can add install/ssl/apache.crt and apache.key file if you have an SSL certificate you would prefer to use. | ||
Examples | ||
|
||
.. code:: | ||
http://localhost:8888/oauth/google | ||
http://first.talosintelligence.com/oauth/google | ||
Once created you will have the option to down the JSON file containing the generated secret. Optionally, you can add install/ssl/apache.crt and apache.key file if you have an SSL certificate you would prefer to use. | ||
|
||
.. code:: | ||
|
@@ -32,16 +39,23 @@ When the FIRST server is installed, no engines are installed. FIRST comes with t | |
|
||
.. note:: | ||
|
||
Before engines can be installed, the developer must be registered with the system. Ensure the developer is registered before progressing. | ||
Before engines can be installed, the developer must be registered with the system. This can be accomplished through the web UI if OAuth has been setup or manually by the user_shell.py located in the utilities folder. | ||
|
||
.. code:: | ||
$ cd FIRST-server/server/utilities | ||
$ python user_shell.py adduser <user_handle: johndoe#0001> <user email: [email protected]> | ||
Ensure the developer is registered before progressing. | ||
|
||
Python script ``engine_shell.py`` can be provided with command line arguments or used as a shell. To quickly install the three available engines run the below commands: | ||
|
||
.. code:: | ||
$ cd FIRST-server/server/utilities | ||
$ python engine_shell.py install first.engines.exact_match ExactMatchEngine <developer_email> | ||
$ python engine_shell.py install first.engines.mnemonic_hash MnemonicHashEngine <developer_email> | ||
$ python engine_shell.py install first.engines.basic_masking BasicMaskingEngine <developer_email> | ||
$ python engine_shell.py install first_core.engines.exact_match ExactMatchEngine <developer_email> | ||
$ python engine_shell.py install first_core.engines.mnemonic_hash MnemonicHashEngine <developer_email> | ||
$ python engine_shell.py install first_core.engines.basic_masking BasicMaskingEngine <developer_email> | ||
Once an engine is installed you can start using your FIRST installation to add and/or query for annotations. Without engines FIRST will still be able to store annotations, but will never return any results for query operations. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
mysqlclient | ||
mongoengine | ||
django | ||
werkzeug | ||
distorm3 | ||
capstone | ||
httplib2 | ||
oauth2client | ||
google-api-python-client |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.contrib import admin | ||
|
||
# Register your models here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.apps import AppConfig | ||
|
||
|
||
class EnginesConfig(AppConfig): | ||
name = 'engines' |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import models | ||
|
||
# Create your models here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.test import TestCase | ||
|
||
# Create your tests here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.shortcuts import render | ||
|
||
# Create your views here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"secret_key" : "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", | ||
|
||
"db_engine" : "django.db.backends.mysql", | ||
"db_dbname" : "first", | ||
"db_user" : "user", | ||
"db_password" : "pass", | ||
"db_host" : "localhost", | ||
"db_port" : 3306, | ||
|
||
"debug" : true, | ||
"allowed_hosts" : ["localhost", "testserver"], | ||
|
||
"oauth_path" : "", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +0,0 @@ | ||
#------------------------------------------------------------------------------- | ||
# | ||
# Intializes FIRST's DBManager and EngineManager | ||
# Copyright (C) 2016 Angel M. Villegas | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License along | ||
# with this program; if not, write to the Free Software Foundation, Inc., | ||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
# | ||
#------------------------------------------------------------------------------- | ||
|
||
# FIRST Modules | ||
from first.dbs import FIRSTDBManager | ||
from first.engines import FIRSTEngineManager | ||
|
||
DBManager = FIRSTDBManager() | ||
EngineManager = FIRSTEngineManager(DBManager) | ||
Oops, something went wrong.