Ejemplo n.º 1
0
def run_in_dev_mode():

    config = ServerConfig()
    configure_logging(config['logging'], plain=True)

    server = TAXIIServer(config)

    app = create_app(server)
    app.debug = True

    app.run(port=9000)
Ejemplo n.º 2
0
def setup_logging():
    configure_logging({'': 'debug'})
Ejemplo n.º 3
0
from opentaxii.server import TAXIIServer
from opentaxii.config import ServerConfig
from opentaxii.middleware import create_app
from opentaxii.utils import configure_logging

config = ServerConfig()
configure_logging(config['logging'], plain=True)

server = TAXIIServer(config)

app = create_app(server)
app.debug = True
Ejemplo n.º 4
0
def setup_logging():
    configure_logging({'': 'debug'})
Ejemplo n.º 5
0
import anyconfig
import argparse
import structlog

from opentaxii.config import ServerConfig
from opentaxii.server import TAXIIServer
from opentaxii.utils import configure_logging
from opentaxii.taxii.entities import CollectionEntity

config = ServerConfig()
configure_logging(config.get('logging'), plain=True)

log = structlog.getLogger(__name__)


def get_parser():
    parser = argparse.ArgumentParser(
        description = "Create services via OpenTAXII Auth API",
        formatter_class = argparse.ArgumentDefaultsHelpFormatter
    )
    return parser


def create_services():

    parser = get_parser()

    parser.add_argument("-c", "--services-config", dest="config",
            help="YAML file with services configuration", required=True)

    args = parser.parse_args()
Ejemplo n.º 6
0
import argparse
import structlog

from opentaxii.server import TAXIIServer
from opentaxii.config import ServerConfig
from opentaxii.utils import configure_logging

config = ServerConfig()
configure_logging(config.get('logging'), plain=True)

log = structlog.getLogger(__name__)


def get_parser():
    parser = argparse.ArgumentParser(
        description = "Create Account via OpenTAXII Auth API",
        formatter_class = argparse.ArgumentDefaultsHelpFormatter
    )
    return parser


def create_account():

    parser = get_parser()
    parser.add_argument("-u", "--username", dest="username", help="Username for the new account", required=True)
    parser.add_argument("-p", "--password", dest="password", help="Password for the new account", required=True)

    args = parser.parse_args()

    server = TAXIIServer(config)