hawat.blueprints.whois package

Description

This pluggable module provides access to internal whois service. It is built upon custom mentat.services.whois module. The main purpose of the whois service in Mentat system is to resolve abuse contacts for event sources to enable automated event reporting capabilities. Another use case is data access management by abuse groups in web interface.

This module enables access to internal whois database and enables users to input queries. The main use case scenario is a validation of target abuse contact for particular source address/network.

Provided endpoints

/whois/search

Page providing search form and displaying search results.

  • Authentication: login required

  • Methods: GET

hawat.blueprints.whois.BLUEPRINT_NAME = 'whois'

Name of the blueprint as module global constant.

class hawat.blueprints.whois.SearchView[source]

Bases: hawat.base.HTMLMixin, hawat.base.RenderableView

Application view providing search form for internal whois resolving service and appropriate result page.

The geolocation is implemented using mentat.services.whois module.

authentication = True
authorization = [<Permission needs={Need(method='role', value='admin'), Need(method='role', value='user'), Need(method='role', value='maintainer'), Need(method='role', value='developer')} excludes=set()>]
dispatch_request()[source]

Mandatory interface required by the flask.views.View.dispatch_request(). Will be called by the Flask framework to service the request.

classmethod get_menu_title(item=None)[source]

Implementation of hawat.base.BaseView.get_menu_title().

classmethod get_view_name()[source]

Implementation of hawat.base.BaseView.get_view_name().

classmethod get_view_title(item=None)[source]

Implementation of hawat.base.BaseView.get_view_title().

methods = ['GET']
class hawat.blueprints.whois.WhoisBlueprint(name, import_name, **kwargs)[source]

Bases: hawat.base.HawatBlueprint

Hawat pluggable module - whois resolving service.

classmethod get_module_title()[source]

Implementation of hawat.base.HawatBlueprint.get_module_title().

register_app(app)[source]

Callback method. Will be called from hawat.base.HawatApp.register_blueprint() method and can be used to customize the Flask application object. Possible use cases:

  • application menu customization

Parameters

app (hawat.base.HawatApp) – Flask application to be customize.

hawat.blueprints.whois.get_blueprint()[source]

Mandatory interface and factory function. This function must return a valid instance of hawat.base.HawatBlueprint or flask.Blueprint.