The Internet Content Adaptation Protocol (ICAP) is a lightweight HTTP-like protocol specified in RFC 3507 which is used to extend transparent proxy servers. It is used generally for a virus scanner or content filtering.
The purpose of this icap-server-opentc is to demonstrate one of the usages of the OpenTC server. In this case, the icap server is used as Data Leak Prevention (DLP). It is listening on the icap server’s default port 1344. The squid-cache is used as the http/s proxy (it can be also any other proxy servers). It is configured to connect to the icap server for the content filtering. Any out going http traffics through the squid proxy will be sent to the icap server, which will then forward it to the OpenTC server. OpenTC server analyses the data and classify it based on the pre-trained data. The result of the text classification is sent back to the icap server, which will decide if the outgoing traffic should be blocked or allowed.
Requirements
Python 3.x
opentc
PyYAML
pyicap 1.0b1
python-magic
python-multipart
TODO
the icap server should monitor the availability of the OpenTC server. In case it is not up or running, this icap server should try to reconnect it again several times in difference interval (i.e: the interval of the first 3 reconnection could be 10 seconds, and after 3 unsuccessful attempts to reconnect, the interval connection time should be changed to 300 seconds). Currently, the icap server has to be restarted manually after the OpenTC server is died or restarted.
Currently the decision to take, either the traffic is blocked or allowed, is implemented using manual “for_loop-if-elif” sequences, which maybe not easy to understand or error prone. In the future, the software would use a rule engine (if there is any) to simplify the creation of complex rules.
Metadata
Release files for opentc-icap 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| opentc-icap-0.5.0.tar.gz | 7.2 kB | Without provenance | Details for opentc-icap-0.5.0.tar.gz |
Release files / opentc-icap-0.5.0.tar.gz
| Download URL | opentc-icap-0.5.0.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8fbcb834466967b6cc13002115e9ecee24f51eb40ac283fe5b56c36c41af0c5b
|
|
BLAKE2b-256 checksum How to use checksums |
51e70e70af237d087f3c87d6a00ef73774769ecae63e112100d485f3a7fc9fe5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for opentc-icap 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.