Ejemplo n.º 1
0
def main():
    admin.init(
        base.ResourceHandler(
            GoogleCredentials,
            handler=GoogleCredentialsHandler,
        ),
        admin.CONTEXT_APP_AND_USER,
    )
Ejemplo n.º 2
0
def main():
    admin.init(
        base.ResourceHandler(MonitoringInputs),
        admin.CONTEXT_APP_AND_USER,
    )
Ejemplo n.º 3
0
def main():
    admin.init(
        base.ResourceHandler(PubSubInputs, handler=datainput.DataInputHandler),
        admin.CONTEXT_APP_AND_USER)
Ejemplo n.º 4
0

class DefaultInputs(base.BaseModel):
    """REST Endpoint of Server in Splunk Add-on UI Framework.
    """
    rest_prefix = 'ta_tenable'
    endpoint = "configs/conf-tenable_sc_inputs"
    requiredArgs = {'server', 'data', 'index', 'interval'}
    optionalArgs = {'start_time', 'batch_size'}
    normalisers = {"disabled": normaliser.Boolean()}

    defaultVals = {'data': 'sc_vulnerability', 'batch_size': 10000}

    cap4endpoint = ''
    cap4get_cred = ''


class DefaultHandler(base.BaseRestHandler):
    def __init__(self, *args, **kwargs):
        base.BaseRestHandler.__init__(self, *args, **kwargs)
        session_key = self.getSessionKey()
        self.defaultVals.update({
            'start_time':
            ta_tenable_util.get_30_days_ago_local_time(session_key)
        })


if __name__ == "__main__":
    admin.init(base.ResourceHandler(DefaultInputs, handler=DefaultHandler),
               admin.CONTEXT_APP_AND_USER)
Ejemplo n.º 5
0
import ta_tenable_import_declare

import splunk.admin as admin

from splunktaucclib.rest_handler import base, normaliser
from splunktalib.common import util

util.remove_http_proxy_env_vars()


class Servers(base.BaseModel):
    """REST Endpoint of Server in Splunk Add-on UI Framework.
    """
    rest_prefix = 'ta_tenable'
    endpoint = "configs/conf-tenable_sc_servers"
    requiredArgs = {'url', 'username', 'password'}
    encryptedArgs = {'password'}
    cap4endpoint = ''
    cap4get_cred = ''


if __name__ == "__main__":
    admin.init(base.ResourceHandler(Servers), admin.CONTEXT_APP_AND_USER)