All Projects → cossacklabs → Acra

cossacklabs / Acra

Licence: apache-2.0
Database security suite. Database proxy with field-level encryption, search through encrypted data, SQL injections prevention, intrusion detection, honeypots. Supports client-side and proxy-side ("transparent") encryption. SQL, NoSQL.

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects
python3
1442 projects

Projects that are alternatives of or similar to Acra

Fhe Toolkit Linux
IBM Fully Homomorphic Encryption Toolkit For Linux. This toolkit is a Linux based Docker container that demonstrates computing on encrypted data without decrypting it! The toolkit ships with two demos including a fully encrypted Machine Learning inference with a Neural Network and a Privacy-Preserving key-value search.
Stars: ✭ 1,123 (+54.68%)
Mutual labels:  cryptography, encryption, crypto
Noise
.NET Standard 1.3 implementation of the Noise Protocol Framework (revision 33 of the spec)
Stars: ✭ 124 (-82.92%)
Mutual labels:  cryptography, encryption, crypto
Cryfs
Cryptographic filesystem for the cloud
Stars: ✭ 1,560 (+114.88%)
Mutual labels:  cryptography, encryption, crypto
Maskbook
The portal to the new, open internet. ([I:b])
Stars: ✭ 691 (-4.82%)
Mutual labels:  cryptography, encryption, crypto
Securefs
Filesystem in userspace (FUSE) with transparent authenticated encryption
Stars: ✭ 518 (-28.65%)
Mutual labels:  cryptography, encryption, crypto
Featherduster
An automated, modular cryptanalysis tool; i.e., a Weapon of Math Destruction
Stars: ✭ 876 (+20.66%)
Mutual labels:  cryptography, encryption, crypto
Securitydriven.inferno
✅ .NET crypto done right. Professionally audited.
Stars: ✭ 501 (-30.99%)
Mutual labels:  cryptography, encryption, crypto
Virgil Crypto Php
Virgil PHP Crypto Library is a high-level cryptographic library that allows you to perform all necessary operations for secure storing and transferring data and everything required to become HIPAA and GDPR compliant.
Stars: ✭ 22 (-96.97%)
Mutual labels:  cryptography, encryption, crypto
Gun
An open source cybersecurity protocol for syncing decentralized graph data.
Stars: ✭ 15,172 (+1989.81%)
Mutual labels:  cryptography, encryption, crypto
Padding Oracle Attacker
🔓 CLI tool and library to execute padding oracle attacks easily, with support for concurrent network requests and an elegant UI.
Stars: ✭ 136 (-81.27%)
Mutual labels:  cryptography, encryption, crypto
S2n Tls
s2n : an implementation of the TLS/SSL protocols
Stars: ✭ 4,029 (+454.96%)
Mutual labels:  cryptography, encryption, crypto
Helib
HElib is an open-source software library that implements homomorphic encryption. It supports the BGV scheme with bootstrapping and the Approximate Number CKKS scheme. HElib also includes optimizations for efficient homomorphic evaluation, focusing on effective use of ciphertext packing techniques and on the Gentry-Halevi-Smart optimizations.
Stars: ✭ 2,749 (+278.65%)
Mutual labels:  cryptography, encryption, crypto
Cryptogotchas
A collection of common (interesting) cryptographic mistakes.
Stars: ✭ 118 (-83.75%)
Mutual labels:  cryptography, encryption, crypto
Demo Twilio Backend Nodejs
A sample backend that demonstrates how to generate a Virgil JWT and Twilio token used for authentication with the Virgil and Twilio services
Stars: ✭ 128 (-82.37%)
Mutual labels:  cryptography, encryption, crypto
Nsec
A modern and easy-to-use cryptographic library for .NET Core based on libsodium
Stars: ✭ 217 (-70.11%)
Mutual labels:  cryptography, encryption, crypto
Awesome Cryptography
A curated list of cryptography resources and links.
Stars: ✭ 3,475 (+378.65%)
Mutual labels:  cryptography, encryption, crypto
Forge
A native implementation of TLS in Javascript and tools to write crypto-based and network-heavy webapps
Stars: ✭ 4,204 (+479.06%)
Mutual labels:  cryptography, crypto
Snow
A Rust implementation of the Noise Protocol Framework
Stars: ✭ 436 (-39.94%)
Mutual labels:  cryptography, crypto
Constellation
Peer-to-peer encrypted message exchange
Stars: ✭ 365 (-49.72%)
Mutual labels:  encryption, crypto
Covertutils
A framework for Backdoor development!
Stars: ✭ 424 (-41.6%)
Mutual labels:  encryption, crypto

Acra: database security suite
Database protection suite with field level encryption and intrusion detection.


GitHub release Circle CI Coverage Status godoc
Server platforms Client platforms Install on DigitalOcean


| Acra Engineering Examples | Documentation | Installation | Examples and tutorials | | ---- | ---- | ---- | --- | --- |

What is Acra

Acra — database security suite for sensitive and personal data protection.

Acra provides field level encryption (client-side or proxy-side), multi-layered access control, database leakage prevention, and intrusion detection capabilities in a convenient, developer-friendly package. Acra was specifically designed for web and mobile apps with centralised data storage, including with distributed, microservice-rich applications.

Perfect Acra-compatible applications Typical industries
Web and mobile apps that store data in a centralised database or object storage
  • Healthcare
  • Finance
  • E-commerce
  • Critical infrastructures
  • Apps with > 1000 users
IoT apps that collect telemetry and process data in the cloud
High-load data processing apps

Acra gives you tools for encrypting the data records into special cryptographic containers, storing them in the database or file storage and then decrypting them in a secure compartmented area (separate virtual machine/container). Acra allows to encrypt data as early as possible and operate on encrypted data.

Acra's cryptographic design ensures that no secret (password, key, etc.) leaked from the application or database will be sufficient for decryption of the protected data chunks that originate from it. Acra minimises the leakage scope, detects unauthorised behavior, and prevents the leakage, informing operators of the incident underway.

This is Acra Community Edition, it's free for commercial and non-commercial use, forever.

User Acra suite for protecting data

Major security features

Cryptographic protection of data field level encryption (client-side and/or proxy-side);
each data record is encrypted using unique encryption keys
Selective encryption select which field/columns to encrypt to balance good security and performance
Key management tools built-in tools for key distribution, key rotation (with/without data re-encryption), and compartmentalisation
Trust compartmentalisation datastore and application components can be compromised, yet the data stays protected
Prevention of SQL injections through a built-in SQL firewall
Intrusion detection system using poison records (honey tokens) to warn about suspicious behaviour
REST API (gRPC, HTTP) encryption/decryption using AcraTranslator
Searchable encryption ᵉ available for Acra Enterprise users
Masking / anonymization ᵉ
Tokenization / Pseudonymization ᵉ
Cryptographically protected audit log ᵉ

Acra delivers different layers of defense for different parts and stages of the data lifecycle. This is what defence in depth is – an independent set of security controls aimed at mitigating multiple risks in case of an attacker crossing the outer perimeter.

Developer and DevOps friendly

Secure default settings your infrastructure is secure from the start without additional configuring
Cryptography is hidden
under the hood
no risk of selecting the wrong key length or algorithm padding
Automation-friendly easy to configure and automate
Quick infrastructure integration via binary packages or Docker images
Easy client-side integration client-side encryption libraries support ~11 languages
Code-less client-side integration available for server-side encryption in AcraServer's Transparent proxy mode
Logging, metrics, tracing throughout all Acra components;
compatible with ELK stack, Prometheus, Jaeger
No vendor lock rollback utilities to decrypt database into plaintext
Demos, examples, simulators numerous web-based and Docker-based example projects available
DigitalOcean Acra 1-Click App run AcraServer in your DigitalOcean cloud
Managed solution available we can setup and manage Acra for you

Cryptography

Acra relies on our cryptographic library Themis, which implements high-level cryptosystems based on the best available open-source implementations of the most reliable ciphers. Acra strictly doesn't contain self-made cryptographic primitives or obscure ciphers. To deliver its unique guarantees, Acra relies on the combination of well-known ciphers and smart key management scheme.

Default crypto-primitive source OpenSSL
Supported crypto-primitive sources ᵉ BoringSSL, LibreSSL, FIPS-compliant, GOST-compliant, HSM
Storage encryption AES-256-GCM + ECDH
Transport encryption TLS v1.2+ / Themis Secure Session
KMS integration ᵉ Amazon KMS, Google Cloud Platform KMS, Hashicorp Vault, Keywhiz

ᵉ — available in the Enterprise version of Acra only. Drop us an email to get a full list of features and a quote.

Try Acra without writing code

How does Acra work?

To better understand the architecture and data flow in Acra, please refer to the Architecture and data flow section in the documentation.

Protecting data in SQL databases using AcraServer

AcraServer works as transparent encryption/decryption proxy with SQL databases. Depending on your app architecture, it's possible to use client-side encryption or server-side encryption, or both simultaneously.

Integrating client-side encryption using AcraWriter

Client-side encryption using AcraServer and AcraWriter

The typical infrastructure with AcraConnector and AcraServer, data is encrypted on the client side (web backend or mobile app) using AcraWriter, decrypted on the AcraServer side, that works as transparent database proxy.

Client-side encryption using AcraServer and AcraWriter

The dataflow of encrypted and plaintext data. Note: it's possible to write encrypted data directly to the database, omitting the AcraServer.

This is what the process of encryption and decryption of data in a database looks like:

  • Your application encrypts some data through AcraWriter by generating an AcraStruct using Acra storage public key and then updates the database. AcraStructs generated by AcraWriter can't be decrypted by it — only the Acra's server side has the keys for decryption.
  • To retrieve the decrypted data, your application talks to AcraServer. It is a server-side service that works as a database proxy: it transparently sits between your application and the database and silently listens to all the traffic coming to and from the database.
  • AcraServer monitors the incoming SQL requests and blocks the unwanted ones using the built-in configurable SQL firewall called AcraCensor. AcraServer only sends allowed requests to the database. Certain configurations for AcraServer can be adjusted remotely using AcraWebConfig web server.
  • Upon receiving the database response, AcraServer tries to detect AcraStructs, decrypts them, and returns the decrypted data to the application.
  • AcraConnector is a client-side daemon responsible for providing encrypted and authenticated connection between the application and AcraServer. AcraConnector runs under a separate user/in a separate container and acts as middleware. AcraConnector accepts connections from the application, adds an extra transport encryption layer using TLS or Themis Secure Session, sends the data to AcraServer, receives the result, and sends it back to the application.

Integrating proxy-side encryption using AcraServer in Transparent proxy mode

Server-side encryption using AcraServer

The typical infrastructure with AcraConnector and AcraServer, data is encrypted and decrypted by AcraServer, that works as transparent database proxy.

Server-side encryption using AcraServer

The dataflow of encrypted and plaintext data, AcraServer it encrypts and decrypts data.

Transparent proxy mode allows you to configure AcraServer to encrypt records in specific database columns without altering the application code. Basically, AcraServer here performs AcraWriter's duties.

This mode is useful for large distributed applications, where separate updating of the source code for each client app is complicated.

  • Imagine that the client application wants to update some data in the database. The application logic doesn't need to change because there's no need to integrate AcraWriter library into the application code. The application sends SQL requests with plaintext data through AcraConnector and AcraServer to the database, as described above. There's a secure transport layer between AcraConnector and AcraServer (via TLS or Themis Secure Session), so data from client app is transmitted via a secure channel.
  • On receiving SQL queries, AcraServer parses each query and encrypts the desired values into AcraStructs. To know which values to encrypt, AcraServer uses a special configuration file (known as encryptor_config_file) that describes which columns in which tables should be encrypted. AcraServer uses AcraStruct encryption key just as AcraWriter would.
  • After encrypting the values into AcraStructs, AcraServer passes the modified queries to the database and the database response – back to the client application via AcraConnector.
  • When the client application wants to read the data, it sends a read query to the database (via AcraConnector and AcraServer). Upon retrieving the database response, AcraServer tries to detect AcraStructs, decrypts them, and returns the decrypted data to the application.

Transparent mode has the same features as the "usual" mode – including SQL firewall, intrusion detection based on poison records, Zone support, etc.

Check out the detailed documentation on using and configuring the Transparent proxy mode.

Protecting data in any file storage using AcraWriter and AcraTranslator

Client-side encryption and standalone decryption using AcraTranslator

The typical infrastructure with AcraConnector and AcraTranslator, data is encrypted on the client side (web backend or mobile app) using AcraWriter, decrypted on the AcraTranslator side, that works as standalone decryption service.

Acra Translator: simplified architecture

The dataflow of encrypted and plaintext data, AcraTranslator only decrypts data on demand.

In some use cases, the application can store encrypted data as separate blobs (in NoSQL databases, or as files that are not in a database, i.e. in a S3 bucket, local file storage, etc.). In this case, you can use AcraTranslator — a lightweight server that receives AcraStructs and returns the decrypted data.

Note: since Q3 2020, AcraTranslator can both encrypt and decrypt data via REST API (HTTP, gRPC). You may use a combination of AcraWriter+AcraTranslator for client-side encryption and Translator-side decryption; or AcraTranslator only for both encryption and decryption without changing app code.

This is what the process of encryption and decryption of data using AcraTranslator looks like:

  • Your application encrypts some data using AcraWriter, generating an AcraStruct using Acra storage public key and puts the data into any file storage. AcraStructs generated by AcraWriter can't be decrypted by it — only the Acra's server side has the right keys for decrypting it. Otherwise, you might decide not to use AcraWriter, but use AcraTranslator for encrypting data – application sends plaintext, AcraTranslator returns AcraStructs.
  • To decrypt an AcraStruct, your application sends it to AcraTranslator as a binary blob via HTTP or gRPC API. AcraTranslator doesn’t care about the source of the data, it is responsible for holding all the secrets required for data decryption and for actually decrypting the data.
  • AcraTranslator decrypts AcraStructs and returns the decrypted data to the application.
  • To avoid sending plaintext via an unsecured channel, AcraTranslator requires the use of AcraConnector, a client-side daemon responsible for providing encrypted and authenticated connection between the application and AcraServer. AcraConnector runs under a separate user/in a separate container and acts as middleware. It accepts connections from the application, adds transport encryption layer using TLS or Themis Secure Session, sends data to AcraServer, receives the result, and sends it back to the application.

AcraTranslator and AcraServer are fully independent server-side components and can be used together or separately depending on your infrastructure.

Availability

Client-side

AcraWriter is a client-side library that encrypts data into a special binary format called AcraStruct. AcraWriter is available for Ruby, Python, Go, C++, Node.js, iOS, Android/Java and PHP, but you can easily generate AcraStruct containers with Themis for any platform you want.

AcraWriter is required only for the client-side encryption dataflow. If you use AcraServer in Transparent encryption mode, or use AcraTranslator for both encryption and decryption, you don't need AcraWriter at all.

Client platform Documentation and guides Examples Package manager
🐹 Go Installation guide examples/golang
🐍 Python Installation guide examples/python PyPI
♦️ Ruby Installation guide examples/ruby Gem
➕ C++ Installation guide examples/cpp
📱 iOS (Swift / Objective-C) Installation guide examples/objc CocoaPods
☎️ Android (Java / Kotlin) Installation guide examples/android_java maven
🐘 PHP Installation guide examples/php
🍭 Node.js Installation guide examples/nodejs npm

Server-side

The Server-side Acra components (AcraServer, AcraTranslator) should run as separate services/servers/VMs. Key management utils and database helpers are usually run on the same server as AcraServer/AcraTranslator.

Install Server-side Acra components:

Distributive Instruction set Download package or alternatively
CentOS 7 x86_64 rpm package use Docker or
build from source
Debian Stretch (9)
Debian Jessie (8)
x86_64/i386 deb package
Ubuntu Bionic (18.04) x86_64 deb package
Ubuntu Artful (17.10)
Ubuntu Xenial (16.04)
x86_64/i386 deb package
macOS (10.12 - 10.14) x86_64 -

Note: the server-side Acra components are not compatible with Windows OS as host OS, consider using Docker.

Compatibility and integration

AcraServer is a server-side service that works as database proxy: it sits transparently between your application and the database, listens silently to all the traffic that's coming to and from the database. AcraTranslator is database-agnostic: it provides HTTP and gRPC API to decrypt AcraStructs stored anywhere.

Acra is compatible with numerous RDBMS, object and KV stores, cloud platforms, external key management systems (KMS), load balancing systems.

Cloud platforms DigitalOcean, AWS, GCP, Heroku
RDBMS MySQL v5.7+, PosgtreSQL v9.4-v11, MariaDB v10.3
Google Cloud SQL, Amazon RDS
Object stores filesystems, KV databases, Amazon S3, Google Cloud DataStore
Load balancing HAProxy, cloud balancers

Open source Acra has limited integration support, more services are available in the Enterprise version of Acra only.

Installation and launch

Quick try (run example apps)

Acra Example Projects illustrate the integration of Acra data protection suite into existing applications: web applications based on Django and Ruby on Rails frameworks, and simple CLI applications. We took well-known apps, detected sensitive data there and added the encryption layer. Protecting the data is completely transparent for the users and requires minimal changes in the infrastructure and application code.

Developers and Ops friendly:

  • run a single command to deploy the application, database, Acra's components, logs, and dashboards;
  • read the code changes and see how little it takes to integrate encryption into the client application;
  • learn how Acra works by reading logs, monitoring metrics in Prometheus, checking tracers in Jaeger and watching Grafana dashboards;
  • inspect Docker-compose files, architecture schemes, database tables, and much more.

Requirements: Linux or macOS with installed Docker.

⚙️ Run Acra Example Projects ⚙️

Quick integration into your infrastructure

For a quick and easy integration of Acra into your own infrastructure, we recommend trying Acra with Docker first. Using only two commands, you will get all the Acra's components and database up and running, with a secure transport layer between them. We prepared several typical infrastructure variants to experiment with.

  • Select one appropriate use case from the pre-made configurations ("Compose files"): use AcraServer-based configuration to protect the data in a database or select AcraTranslator to protect the files or any other binary blob stored elsewhere.
  • Launch Acra's server-side by running the selected Docker-compose file: it will generate the appropriate keys, put them into correct folders, perform a public key exchange, run selected services and database, and then it will listen to the incoming connections.
  • Integrate AcraWriter into your application code where you need to protect the sensitive data, supply AcraWriter with an Acra storage public key (generated by Docker-compose on the previous step). Encrypt the data into AcraStructs and send them into the database or file storage.
  • Decrypt data by reading the database through AcraServer or by decrypting the files through AcraTranslator.

Please use the Acra Docker demo stand for testing/experimenting purposes only as the encryption keys are pre-generated in the configuration.

Normal integration into your infrastructure

For production environments, we insist on generating and exchanging keys manually and deploying Acra as Docker containers or from source code. Refer to the Quick Start guide to understand how to download and launch Acra components, generate keys, and perform the key exchange properly.

Documentation, tutorials, additional information

The most recent versions of the documentation, tutorials, and demos for Acra are available on the official Cossack Labs Documentation Server. The Github Wiki documentation is deprecated and is no longer updated since v0.82.0.

To gain an initial understanding of Acra, you might want to:

You can also check out the speaker slides for the following talks by Cossack Labs engineers:

Demo projects

Client-side encryption mode Transparent encryption mode

AcraCensor: SQL firewall to prevent SQL injections

AcraCensor example application illustrates how to use AcraCensor as SQL firewall to prevent SQL injections. The target application is a well-known vulnerable web application OWASP Mutillidae 2.

The demo project has a Docker-compose file that runs the following web infrastructure:

  • OWASP Mutillidae web application,
  • Acra encryption suite.

Acra works as a proxy between web and database. AcraCensor inspects every SQL query that runs from the web application to the database, and back, and blocks suspicious queries.

Watch the video

Requirements: Linux or macOS with installed Docker.

⚙️ Run AcraCensor SQL firewall example ⚙️

Poison records: intrusion detection example

Intrusion detection example application illustrates how to use poison records (honey tokens) as "intrusion markers" that warn about possible attack.

Requirements: Linux or macOS with installed Docker.

🍯 Run intrusion detection example 🐝

Acra Load Balancing Example

Acra load balancing example application illustrates building high availability and balanced infrastructure, based on Acra components, PostgreSQL, and Python web application. We prepared several configurations with multiple databases and HAProxy.

🔛 Run Acra Load Balancing Example 🔛

GDPR, HIPAA, CCPA

Acra can help you comply with the current privacy regulations, such as:

Configuring and using Acra in a designated form will cover most of the demands described in articles 25, 32, 33, and 34 of GDPR and the PII data protection demands of HIPAA. Read more about Acra and GDPR compliance here.

Open source vs Pro vs Enterprise

This is Acra Community Edition, the open source version of Acra, which is 💯 free for commercial and non-commercial usage. Please let us know in the Issues if you stumble upon a bug, see a possible enhancement, or have a comment on security design.

There are also Pro and Enterprise versions of Acra available. Those versions provide better performance, redundancy/load balancing, come pre-configured with crypto-primitives of your choice (FIPS, GOST), have integration with key/secret management tools in your stack, provide unique security features like search through encrypted data, and have plenty of utils and tools for your Ops and SREs to operate Acra conveniently – deployment automation, scaling, monitoring, and logging. Talk to us to get full feature lists and a quote.

Security consulting

It takes more than just getting cryptographic code to compile to secure the sensitive data. Acra won't make you “compliant out of the box” with all the modern security regulations, and no other tool will.

We help companies plan their data security strategy by auditing, assessing data flow, and classifying the data, enumerating the risks. We do the hardest, least-attended part of reaching the compliance – turning it from the “cost of doing business” into the “security framework that prevents risks”.

Contributing to us

If you’d like to contribute your code or provide any other kind of input to Acra, you’re very welcome. Your starting point for contributing is here.

License

Acra is licensed as Apache 2 open-source software.

Contacts

If you want to ask a technical question, feel free to raise an Issue or write to [email protected].

To talk to the business wing of Cossack Labs Limited, drop us an email to [email protected].

Blog Twitter CossackLabs Medium CossackLabs

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].