Skip to content

ConnectEverything/oscon2019

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NATS is a simple, secure and performant communications system for digital systems, services and devices. NATS is a hosted project in the Cloud Native Computing Foundation (CNCF). NATS has over 30 client language implementations, and the NATS server can run on-premise, in the cloud, at the edge, and even on a Raspberry Pi. NATS can secure and simplify design and operation of modern distributed systems.

OSCON Demo

This Docker image is in support of a talk at OSCON 2019. All the code here is OSS, and the GitHub repo can be found here.

> docker run -ti --rm synadia/oscon

This will place you in a small alpine linux container that has some NATS utilities (nats-pub, nats-sub, nats-req, and nsc). There is also a simple chat application powered by NATS and NGS, in a totally secure and totally distributed way.

Getting Started

The image comes with some credentials that can be viewed via creds-show helper. The helper uses the nsc utility to describe and manipulate users and accounts. These credentials only allow a small set of interactions, which we will use to request broader permissions to the system.

The NATS utilities allow a user to send and receive messages from the global NGS system. These messages are secured and isolated to the OSCON account. Think of accounts as a secure by default, run anywhere VPC for NATS. By default, only other users in your account can receive messages that are sent.

Currently the credentials are too limiting to do much, but feel free to try some nats-pub and nats-sub calls.

To get our broader permissions we will use nats-req to send a secure request and ask for broader credentials to interact with the chat application. The request to chat.req.access will be the username you want to use for the chat application, e.g. derek. We will direct the credentials to a file.

> nats-req chat.req.access <NAME> > chat.creds

You can inspect these permissions with the nsc tool.

> nsc describe jwt -f chat.creds

When running the chat application, our mini Slack clone, you will enter msgs and press enter to send. <TAB> will move you to select a new channel or to DM others that are online.

> chat -creds chat.creds 

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published