An authentication proxy for Amazon Elasticsearch Service
Project description
Keyfree automatically discovers your access keys using Python’s boto3. If the environment you are running keyfree in has already been configured for boto3 then you are good to go!
Recommeded configuration is to run keyfree on an EC2 instance, with an instance role profile that grants at least the es:ESHttpGet permission, in which case keyfree will automatically discover your role credentials.
Installing
keyfree is available on pypi:
pip install keyfree
or on the docker hub:
docker pull nickrw/keyfree
Configuring
When you run keyfree it will use boto to discover AWS access credentials and region configuration. The easiest way to create a configuration file which boto will discover is by using awscli’s “aws configure” command, and entering the information when prompted.
pip install awscli aws configure
Alternatively, you can configure everything through environment variables
export AWS_ACCESS_KEY_ID=... export AWS_SECRET_ACCESS_KEY=... export AWS_DEFAULT_REGION=eu-west-1
Running
The keyfree python package includes a bin script which will launch a werkzeug server for testing purposes. If you run it in production you should use a production-ready web server such as gunicorn. The docker image does this for you, but you can do it yourself by pointing a WSGI server at keyfree.proxy:app
keyfree-proxy-test --endpoint <your endpoint uri>
Or using docker
# Only the region and endpoint are required if you are running on an EC2 # instance which has role-based access to your ES domain. docker run -ti --rm \ -e AWS_ACCESS_KEY_ID=your_access_key \ -e AWS_SECRET_ACCESS_KEY=your_secret_key \ -e AWS_DEFAULT_REGION=your_region \ -e ENDPOINT=your_endpoint_url \ -p 9200:9200 \ nickrw/keyfree
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file keyfree-1.0.0.tar.gz
.
File metadata
- Download URL: keyfree-1.0.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ae119d248c1dace64b8ece83567120cb25ef73860c5f9a74cf38940624bdbb5 |
|
MD5 | 9aa0f0c25118f75ed429d3266b8790f4 |
|
BLAKE2b-256 | 4b8ff5f8f5a7a99df4e53ef007256ab93aa4dc785d94c74619f9cca5d0cc0210 |
File details
Details for the file keyfree-1.0.0-py2.py3-none-any.whl
.
File metadata
- Download URL: keyfree-1.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4de996d9fbc3406f20bb98bb96b004980c52c4fc530fe2872b5b22f111c70b6a |
|
MD5 | 6f68e3d3d00c7b8767b402899838ba89 |
|
BLAKE2b-256 | 46b6c8235f2f896c094d16ffbb4f7f03a6759933a571fb6a0b5161f2ed18a2f3 |