Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

Limit restful requests to backend ElasticSearch cluster: Queries only.

Project description

# esFrontLine

Limit restful requests to backend ElasticSearch cluster: Queries for the public,

## Requirements

* Python 2.7 or 3.6.2+
* An ElasticSearch cluster to forward queries to

## Install

I will assume you have Python installed (if not, here are [Windows7 instructions](

pip install esFrontLine

## Setup

You must write your own setting.json file with the following properties set:

* **elasticsearch** - (Array of) ElasticSearch nodes
* **** - URL of the ElasticSearch node that will accept query requests
* **elasticsearch.port** - port for ES (default = 9200)
* **flask** - parameters (default port = 5000)
* **whitelist** - list of indexes that are allowed
* **users** - list of allowed HAWK users, with their linked resources
* **users.resources** - list of indexes the user is allowed
* **users.hawk** - object of [Hawk credentials](
* **** - any human readable name to identify the user or application
* **users.hawk.key** - the secret value held by both endpoints and not shared with anyone
* **users.hawk.algorithm**: always "sha256" for now
* **debug** - for debugging

Here is an example of my ```settings.json``` file

"users": [
"hawk": {
"id": "",
"key": "secret",
"algorithm": "sha256"
"resources": [
"whitelist":["bugs", "org_chart", "bug_summary", "reviews"],
"filename": "./tests/results/logs/app.log",
"maxBytes": 10000000,
"backupCount": 200,
"encoding": "utf8"


## Execution

python --settings-file <path_to_file_with_JSON_settings>

## Code Source


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
esFrontLine-2.11.18154.tar.gz (7.7 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page