GithubHelp home page GithubHelp logo

build-trust / ockam Goto Github PK

View Code? Open in Web Editor NEW
4.4K 58.0 558.0 75.93 MB

Orchestrate end-to-end encryption, cryptographic identities, mutual authentication, and authorization policies between distributed applications – at massive scale.

Home Page: https://ockam.io

License: Apache License 2.0

Elixir 19.83% Rust 74.46% TypeScript 0.20% Shell 2.51% Erlang 0.36% Makefile 0.18% Swift 2.46%
messaging authentication key-management identity trust kafka rust security end-to-end-encryption encrypted-connections

ockam's Introduction

🚀 Portals for Mac – A macOS app built in Swift that uses the Ockam Rust library to privately share a service on your Mac with anyone, anywhere. The service is shared securely over an end-to-end encrypted and mutually authenticated Ockam Portal. Your friends will have access to it on their localhost! This app is a great example of the kinds of things you can build with Ockam 👉


Discord RepoRater

Trust for Data-in-Motion

Ockam is a suite of open source programming libraries and command line tools to orchestrate end-to-end encryption, mutual authentication, key management, credential management, and authorization policy enforcement – at massive scale.

Modern applications are distributed and have an unwieldy number of interconnections that must trustfully exchange data. To trust data-in-motion, applications need end-to-end guarantees of data authenticity, integrity, and confidentiality. To be private and secure by-design, applications must have granular control over every trust and access decision. Ockam allows you to add these controls and guarantees to any application.

Quick Start

Let's build a solution for a very common secure communication topology that applies to many real world use cases. We'll build our first example using Ockam Command, but it is just as easy to build end-to-end trustful communication using Ockam Programming Libraries.

An application service and an application client running on two private networks wish to securely communicate with each other without exposing ports on the Internet. In a few simple commands, we’ll make them safely talk to each other through an End-to-End Encrypted Cloud Relay.

Install Ockam Command

If you use Homebrew, you can install Ockam using brew.

# Tap and install Ockam Command
brew install build-trust/ockam/ockam

This will download a precompiled binary and add it to your path. If you don’t use Homebrew, you can also install on Linux and MacOS systems using curl.

curl --proto '=https' --tlsv1.2 -sSfL https://install.command.ockam.io | bash

End-to-end encrypted and mutually authenticated communication

Next, step through the following commands to setup secure and private communication between our application service and an application client.

# Check that everything was installed correctly by enrolling with Ockam Orchestrator.
#
# This will create a Space and Project for you in Ockam Orchestrator and provision an
# End-to-End Encrypted Cloud Relay service in your `default` project at `/project/default`.
ockam enroll

# -- APPLICATION SERVICE --

# Start an application service, listening on a local IP and port, that clients would access
# through the cloud encrypted relay. We'll use a simple HTTP server for this first example
# but this could be any other application service.
python3 -m http.server --bind 127.0.0.1 6000

# In a new terminal window, setup a tcp-outlet that makes a TCP service available at the given
# address `6000`. We can use this to send raw TCP traffic to the HTTP server on port `6000`.
# Finally create a relay in your default Orchestrator project. Relays make it possible to
# establish end-to-end protocols with services operating in remote private networks, without
# requiring a remote service to expose listening ports to an outside hostile network like the
# Internet.
ockam tcp-outlet create --to 6000
ockam relay create

# -- APPLICATION CLIENT --

# Setup a local tcp-inlet to allow raw TCP traffic to be received on port `7000` before
# it is forwarded. A TCP inlet is a way of defining where a node should be listening for
# connections, and where it should forward that traffic to.
ockam tcp-inlet create --from 7000

# Access the application service, that may be in a remote private network though
# the end-to-end encrypted secure channel, via your private and encrypted cloud relay.
curl --head 127.0.0.1:7000

Private and secure by design

In the example above, we’ve created two nodes and established an end-to-end secure channel between them through an encrypted cloud relay. For the sake of simplicity, we ran both ends on a single machine, but they could also be run on completely separate machines with the same result: an end-to-end encrypted and mutually authenticated secure channel.

Distributed applications that are connected in this way can communicate without the risk of spoofing, tampering, or eavesdropping attacks, irrespective of transport protocols, communication topologies, and network configuration. As application data flows across data centers, through queues and caches, via gateways and brokers - these intermediaries, like the cloud relay in the above example, can facilitate communication but cannot eavesdrop on, or tamper with data.

You can establish secure channels across networks and clouds over multi-hop, multi-protocol routes to build private and secure by design distributed applications that have a small vulnerability surface and full control over data authenticity, integrity, and confidentiality.

Trust for data-in-motion

Behind the scenes, the above commands generated unique cryptographically provable identities and saved corresponding keys in a vault. Your orchestrator project was provisioned with a managed credential authority, and every node was setup to anchor trust in credentials issued by this authority. Identities were issued project membership credentials, and these cryptographically verifiable credentials were then combined with attribute based access control policies to setup a mutually authenticated and authorized end-to-end secure channel.

Your applications can make granular access control decisions at every request because they can be certain about the source and integrity of all data and instructions. You place zero implicit trust in network boundaries and intermediaries to build applications that have end-to-end application layer trust for all data in motion.

Powerful protocols, made simple

Underlying all of this is a variety of cryptographic and messaging protocols. We’ve made these protocols safe and easy to use in any application.

No more having to think about creating unique cryptographic keys and issuing credentials to all application entities. No more designing ways to safely store secrets in hardware and securely distribute roots of trust. Ockam’s integrated approach takes away this complexity and gives you simple tools for:

End-to-end data authenticity, integrity, and privacy in any communication topology

  • Create end-to-end encrypted, authenticated secure channels over any transport topology.
  • Create secure channels over multi-hop, multi-protocol routes - TCP, UDP, WebSockets, BLE, etc.
  • Provision encrypted relays for applications distributed across many edge and cloud private networks.
  • Make legacy protocols secure by tunneling them through mutually authenticated and encrypted portals.
  • Bring end-to-end encryption to enterprise messaging, pub/sub and event streams - Kafka, RabbitMQ etc.

Identity-based, policy driven, application layer trust – granular authentication and authorization

  • Generate cryptographically provable unique identities.
  • Store private keys in safe vaults - hardware secure enclaves and cloud key management systems.
  • Operate scalable credential authorities to issue lightweight, short-lived, attribute-based credentials.
  • Onboard fleets of self-sovereign application identities using secure enrollment protocols.
  • Rotate and revoke keys and credentials – at scale, across fleets.
  • Define and enforce project-wide attribute based access control policies - ABAC, RBAC or ACLs.
  • Integrate with enterprise identity providers and policy providers for seamless employee access.

Deep Dives

Next let's dive into a step-by-step guide on our command line and programming libraries.

  • Ockam Command Command line tools to build and orchestrate highly secure distributed applications. Orchestrate nodes, vaults, identities, credentials, secure channels, relays, portals and more. 👉

  • Ockam Programming Libraries Rust and Elixir libraries to build secure by design applications for any environment – from highly scalable cloud infrastructure to tiny battery operated microcontroller devices. 👉

  • Ockam Protocols Cryptographic and Messaging Protocols that make up the core of Ockam and provide the foundation for end-to-end application layer trust in data. 👉

License

The code in this repository is licensed under the terms of the Apache License 2.0.

Sponsorship Matching Program

Ockam sponsors open source builders who are making it possible for software to be more private and secure-by-design. This includes builders of tools and libraries that Ockam depends on. Under our matching program, if you sponsor the Ockam Open Source project, we will match your contribution and pass it along to other open source developers. For example: If you sponsor Ockam for $10 a month, we will match your $10, and will send $20 back out into the community. Learn more about our sponsorship matching program 👉

Learn more about Ockam

ockam's People

Contributors

0xkelvin avatar adrianbenavides avatar antoinevg avatar bitwalker avatar ckhrysze avatar davide-baldo avatar dependabot[bot] avatar etorreborre avatar glenngillen avatar hairyhum avatar hargut avatar lameferret avatar leonzchang avatar malnick avatar mattgreg avatar metaclips avatar michealkeines avatar miles170 avatar mrinalwadhwa avatar murex971 avatar neil2468 avatar nidnogg avatar ockam-team avatar polvorin avatar robinbudd avatar sanjodeundiak avatar shanesveller avatar spacekookie avatar thomcc avatar twittner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ockam's Issues

C - fix files that don't comply with editorconfig

Multiple files in implementations/c don't comply with editorconfig

vagrant ssh builder-debian -c "npx [email protected] check implementations/c"

In #97 we'll automate this test to make it pass we likely need to ignore some folders in editorconfig

[{third-party,_build}/**]
indent_style = ignore
indent_size = ignore
end_of_line = ignore
trim_trailing_whitespace = ignore
charset = ignore

Any folders starting with . are already ignored like .build

Vault - Migrate tests to a unit test framework

Vault test code currently uses simple conditionals to check error state and printf to report on the state of each test case. Vault code, and the C library as a whole, should migrate to a unit test framework to simplify test cases and make it easy to expand test coverage.

Desired features:

  • Output in a format supported by Azure Pipelines (xUnit looks desirable)
  • Platform independent code/embedded friendly
  • Open-source license

Releases for Windows are throwing errors on build 0.2.7

If you have a question, please don’t file an issue, instead, ask the Ockam team on Slack

Expected Behavior

When running the Ockam client for windows (both i386 and x64 releases), in version 0.2.7, the client should register a new DID when calling: ockam register <alias>.

Actual Behavior

The client looks to be registering ok, but the persistance back to disk shows some errors.

image

Steps to Reproduce the Problem

1. Download the 0.2.7 release for windows (x386 or x64)
2. Extract the release and run the client (ockam) from a command prompt

Environment

  • Ockam Version: 0.2.7
  • Operating System: Windows 10 (version 1809)

Typos on README

Few typos on the README, e.g.,

  • Overview point 2
  • Command Line, first sentence

Expected Behavior

n/a

Actual Behavior

n/a

Steps to Reproduce the Problem

n.a

Environment

n/a

Vault - Establish common parameter checking in vault interface

Parameter checking is currently in each individual Vault. This can lead to inconsistencies across implementations. A common set of parameter checks must be established in the vault interface C file.

Questions to consider:

  • What parameters are required and what are optional
  • Are valid buffer pointers allowed with a size of 0 passed in

CEO

If you have a question, please don’t file an issue, instead, ask the Ockam team on Slack

Expected Behavior

Actual Behavior

Steps to Reproduce the Problem

1.
2.
3.

Environment

  • Ockam Version:
  • Operating System

goreleaser is broken

» ./build run -i goreleaser release --skip-publish --rm-dist

   • releasing using goreleaser 0.95.2...
   • could not load config, using defaults
   • RUNNING BEFORE HOOKS
   • GETTING AND VALIDATING GIT STATE
   ⨯ release failed after 0.01s error=current folder is not a git repository

Vault - Support Mbed Crypto

Add support for the following functions to allow for testing without external hardware:
-Random number generation
-Key pair generation/public key retrieval (Curve25519 to start)
-ECDH
-HKDF
-AES GCM

Add RPC Plugin Framework

We need a plugin framework that allows outside contribution while also allow us as maintainers to stay opinionated about library usage and dependency management. To this end, we should add an RPC plugin framework that would allow a developer to build an independent binary which could be placed in a well known location that would then be scanned by ockam on startup. The ockam process would start any plugin binaries in this well known location, and they would register themselves with the ockam process.

This plugin architecture should be used to allow any type of singer package to be implemented to start. The pkcs11 package should be refactored to use this framework.

Vault - Accept non-null pointer with 0 length for encrypt/decrypt

Expected Behavior

ockam_vault_aes_gcm_encrypt and ockam_vault_aes_gcm_decrypt should accept a non-NULL pointer to the en-/de-crypt buffer, with 0 length. As it is, the user must special-case the calls whenever a 0-length payload is submitted.

Actual Behavior

The functions fail if length is 0 but pointer is not NULL

Steps to Reproduce the Problem

Environment

  • Ockam Version:
  • Operating System:

Vault - Improve configuration and status reporting

A Vault interface configuration structure needs to be modified to handle slot locations as slots are currently hardcoded into a Vault implementation.

Additionally, a Vault interface can currently be built to use Curve25519 or NIST P-256 but it has no way of reporting what curve it has been built for. The protocols calling into a Vault interface need to be able to determine if a Vault implementation will be able to support the communication they're handling. A Vault implementation's test cases should also use the status reporting to determine what tests to run.

Introduction and Framing Contributions

Hello,

I am jumping in to start some threads and contribute to issues. At present I am unable to contribute to the code repository directly until I receive appropriate clearance through my main employer. There should not be any issue, though it can take time. Until then, this note is on file to set scope of involvement and anticipated contributions.

In my role at Dolby I am responsible for scouting and assessing new possibilities of technology and business models. Over the last four years, a key theme has been on connected audio devices. I lead a technical team setting out some of the more longer term aspects, implications, designs, performance, possibilities and user experiences. This is within the Technology Incubation Group led by Mike Hollier.

There is a clear future where audio devices will be present and need to be co-ordinated at a scale beyond human intervention - imaging 60 billion microphones to choose from in routing audio with appropriate security and privacy. There are deep adjacent threads in my team on what this means for society, ethics, privacy and the implications of the post privacy audio world already upon us. My involvement with Ockam is exploratory around the possibility of a secure distributed approach that can scale and offer what is needed in addition to any audio processing in the realm of DUAD (distributed uncertain and asynchronous audio devices).

At this stage, some notes and scope limiting of my contribution

  • Contribution to issues and comments only, with inline example code but no code contribution to the main repository
  • Expressed opinions are personal and rising from personal technology experience and perspective
  • The interest of Dolby is associative through myself, but not direct or indicative of any business relationship at this stage

Looking forward to the release and response to the great work and ideas in the API!

Glenn Dickins
Principal Architect of Convergence, Dolby
Honorary Professor, Australian National University
http:.//www.dickins.com

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.