SlideShare a Scribd company logo
D i s t r i b u t e d
Identity & Authorization
The case for bearer tokens in .
Kyle Thomas
Founder & CEO
Motivations
- Distributed peer-to-peer messaging fabric
- Decentralization
- Privacy management
- Secure messaging
- Reducing complexity and cost
- Next-gen business process automation readiness
- Point-to-point enterprise data transfer
Requirements
- No central authority or broker
- Delegated authorization to self-sovereign organizations
- Ephemeral user model (in-memory for the duration of a connection)
- RS256 & Ed25519 signing algorithm support
- No dependency on nsc for generating key material
- Zero required configuration of operators, accounts or users
Bearer JWT
- Ubiquitous & extensible
- Token anatomy: header, payload & signature
- exp header contains the expiration timestamp of the bearer authorization
- alg header indicates the algorithm used for signing (EdDSA or RS256)
- kid “key id” header contains a identifier indicating which public key
should be used for signature verification
- nats permissions claim contains publish, subscribe and
allow_responses resource authorizations
- signature verification is attempted on CONNECT; if successful,
permissions are applied to an ephemeral in-memory user
Permission Model
{
"publish": {
"allow": [
"foo.bar",
"foo.*.baz"
],
"deny": []
},
"subscribe": {
"allow": [
"foo.bar”
],
"deny": []
},
"allow_responses": true
}
Permission Model{
"aud": "nats://nats.provide.network",
"exp": 1586804105,
"iat": 1586717705,
"iss": "https://ident.provide.services",
"jti": "d22768b8-10e5-411b-8840-caa438cc0cd9",
"nats": {
"permissions": {
"subscribe": {
"allow": [
"user.e889edea-580f-40d8-addf-d509dcf7783a",
"network.*.status",
"platform.>"
]
}
}
},
"prvd": {
"permissions": 7553,
"user_id": "e889edea-580f-40d8-addf-d509dcf7783a"
},
"sub": "user:e889edea-580f-40d8-addf-d509dcf7783a"
}
Caveats
- How do other configured authorization schemes work when JWT bearer
authorization is enabled?
- Disable the other schemes!
- Support -auth token parameter as fallback while migrating (i.e., NATS
Streaming example)
Usage
➜ ~ JWT_SIGNER_PUBLIC_KEY='
-----BEGIN PUBLIC KEY-----
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAullT/WoZnxecxKwQFlwE
9lpQrekSD+txCgtb9T3JvvX/YkZTYkerf0rssQtrwkBlDQtm2cB5mHlRt4lRDKQy
EA2qNJGM1Yu379abVObQ9ZXI2q7jTBZzL/Yl9AgUKlDIAXYFVfJ8XWVTi0l32Vsx
tJSd97hiRXO+RqQu5UEr3jJ5tL73iNLp5BitRBwa4KbDCbicWKfSH5hK5DM75EyM
R/SzR3oCLPFNLs+fyc7zH98S1atglbelkZsMk/mSIKJJl1fZFVCUxA+8CaPiKbpD
QLpzydqyrk/y275aSU/tFHidoewvtWorNyFWRnefoWOsJFlfq1crgMu2YHTMBVtU
SJ+4MS5D9fuk0queOqsVUgT7BVRSFHgDH7IpBZ8s9WRrpE6XOE+feTUyyWMjkVgn
gLm5RSbHpB8Wt/Wssy3VMPV3T5uojPvX+ITmf1utz0y41gU+iZ/YFKeNN8WysLxX
AP3Bbgo+zNLfpcrH1Y27WGBWPtHtzqiafhdfX6LQ3/zXXlNuruagjUohXaMltH+S
K8zK4j7n+BYl+7y1dzOQw4CadsDi5whgNcg2QUxuTlW+TQ5VBvdUl9wpTSygD88H
xH2b0OBcVjYsgRnQ9OZpQ+kIPaFhaWChnfEArCmhrOEgOnhfkr6YGDHFenfT3/RA
PUl1cxrvY7BHh4obNa6Bf8ECAwEAAQ==
-----END PUBLIC KEY-----' ./nats-server -p 4222 -DV [-auth natstoken]
➜ ~ docker run -e JWT_SIGNER_PUBLIC_KEY=$PUBKEY provide/nats-server
or
Use in production
Coming soon...
Ekho ProtocolShuttleby Provide
Resources
- NATS Server PR #1149
- NATS Server fork on GitHub and DockerHub
- ts-natsutil library with nats:// and wss:// support on GitHub
- Get in touch:
Twitter: @kylebt
GitHub: kthomas

More Related Content

PDF
A New Way of Thinking | NATS 2.0 & Connectivity
PPTX
Azure Hub spoke v1.0
PPTX
MTのスケールアップパターン with AWS
PDF
Kubernetes
PDF
8 - OpenShift - A look at a container platform: what's in the box
ODP
Introduction to AWS
PDF
High Availability PostgreSQL with Zalando Patroni
PDF
Easy, Secure, and Fast: Using NATS.io for Streams and Services
A New Way of Thinking | NATS 2.0 & Connectivity
Azure Hub spoke v1.0
MTのスケールアップパターン with AWS
Kubernetes
8 - OpenShift - A look at a container platform: what's in the box
Introduction to AWS
High Availability PostgreSQL with Zalando Patroni
Easy, Secure, and Fast: Using NATS.io for Streams and Services

What's hot (20)

PDF
실전! AWS 하이브리드 네트워킹 (AWS Direct Connect 및 VPN 데모 세션) - 강동환, AWS 솔루션즈 아키텍트:: A...
PPTX
Oracle on AWS RDS Migration - 성기명
PDF
(Draft) Kubernetes - A Comprehensive Overview
PDF
Building a redundant CloudStack management cluster - Vladimir Melnik
PPT
Oracle WebLogic Server Basic Concepts
PPTX
NSX-T Architecture and Components.pptx
PPTX
Azure kubernetes service (aks)
PPTX
Let's Talk About: Azure Networking
PDF
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교 및 구축 방법
PPTX
Azure fundamentals
PDF
Ansible docker
PDF
OpenVPN as a WAN - pfSense Hangout October 2016
PDF
How Prometheus Store the Data
PPTX
PPT
Tomcat server
PDF
Understanding Azure Networking Services
PPTX
Continuous Delivery with Jenkins
PPTX
Let's Talk About: Database Migration Service
PDF
The Making of the Oracle R2DBC Driver and How to Take Your Code from Synchron...
PPTX
Architecting Azure IoT Solutions
실전! AWS 하이브리드 네트워킹 (AWS Direct Connect 및 VPN 데모 세션) - 강동환, AWS 솔루션즈 아키텍트:: A...
Oracle on AWS RDS Migration - 성기명
(Draft) Kubernetes - A Comprehensive Overview
Building a redundant CloudStack management cluster - Vladimir Melnik
Oracle WebLogic Server Basic Concepts
NSX-T Architecture and Components.pptx
Azure kubernetes service (aks)
Let's Talk About: Azure Networking
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교 및 구축 방법
Azure fundamentals
Ansible docker
OpenVPN as a WAN - pfSense Hangout October 2016
How Prometheus Store the Data
Tomcat server
Understanding Azure Networking Services
Continuous Delivery with Jenkins
Let's Talk About: Database Migration Service
The Making of the Oracle R2DBC Driver and How to Take Your Code from Synchron...
Architecting Azure IoT Solutions
Ad

Similar to NATS Connect Live | Distributed Identity & Authorization (20)

PPTX
Hadoop and Big Data Security
PDF
The Hidden Costs of Self-Signed SSL Certificates
PDF
The Hidden Costs of SelfSigned SSL Certificates
PDF
Asymmetric cryptography
PDF
PPTX
CLOUD SECURITY.pptx
PDF
EPV_PCI DSS White Paper (3) Cyber Ark
PDF
Ciss previsionnotes
PDF
Why Tokenization as a Service is Essential for Your Business.pdf
PPTX
Security best practices for hyperledger fabric
PDF
Secure ip payment networks what's available other than ssl - final
PDF
HP secure mail techincal brief and the ibe advantage
PPTX
MongoDB World 2018: Low Hanging Fruit: Making Your Basic MongoDB Installation...
PDF
PSU Security Conference 2015 - LAPS Presentation
PDF
TrustLeap Multipass - Unbreakable Passwords For Cloud Services
PDF
2p Mta Data Sheet V1.7 X1a
PPTX
PPTX
Toronto MuleSoft Meetup: Virtual Meetup #3
PDF
IRJET- A Novel and Secure Approach to Control and Access Data in Cloud St...
Hadoop and Big Data Security
The Hidden Costs of Self-Signed SSL Certificates
The Hidden Costs of SelfSigned SSL Certificates
Asymmetric cryptography
CLOUD SECURITY.pptx
EPV_PCI DSS White Paper (3) Cyber Ark
Ciss previsionnotes
Why Tokenization as a Service is Essential for Your Business.pdf
Security best practices for hyperledger fabric
Secure ip payment networks what's available other than ssl - final
HP secure mail techincal brief and the ibe advantage
MongoDB World 2018: Low Hanging Fruit: Making Your Basic MongoDB Installation...
PSU Security Conference 2015 - LAPS Presentation
TrustLeap Multipass - Unbreakable Passwords For Cloud Services
2p Mta Data Sheet V1.7 X1a
Toronto MuleSoft Meetup: Virtual Meetup #3
IRJET- A Novel and Secure Approach to Control and Access Data in Cloud St...
Ad

More from NATS (20)

PDF
RethinkConn 2022!
PDF
KubeCon + CloudNative Con NA 2021 | A New Generation of NATS
PPTX
Deep Dive into Building a Secure & Multi-tenant SaaS Solution with NATS
PDF
NATS Connect Live | Serverless on Kubernetes with OpenFaaS & NATS
PDF
NATS Connect Live!
PDF
NATS Connect Live | SwimOS & NATS
PDF
NATS Connect Live | Pub/Sub on the Power Grid
PDF
NATS Connect Live | NATS as a Service Mesh
PDF
NATS Connect Live | Resgate
PDF
NATS Connect Live | NATS & Augmented Reality
PDF
Deploy Secure and Scalable Services Across Kubernetes Clusters with NATS
PDF
KubeCon NA 2019 Keynote | NATS - Past, Present, and the Future
PDF
OSCON 2019 | Time to Think Different
PDF
Serverless for the Cloud Native Era with Fission
PDF
Simple, Secure, Scalable Messaging for the Cloud Native Era - AllThingsOpen 2...
PDF
Microservices Meetup San Francisco - August 2017 Talk on NATS
PDF
Writing Networking Clients in Go - GopherCon 2017 talk
PDF
NATS vs HTTP for Interservice Communication
PDF
Using NATS for Control Flow in Distributed Systems
PDF
Integration Patterns for Microservices Architectures
RethinkConn 2022!
KubeCon + CloudNative Con NA 2021 | A New Generation of NATS
Deep Dive into Building a Secure & Multi-tenant SaaS Solution with NATS
NATS Connect Live | Serverless on Kubernetes with OpenFaaS & NATS
NATS Connect Live!
NATS Connect Live | SwimOS & NATS
NATS Connect Live | Pub/Sub on the Power Grid
NATS Connect Live | NATS as a Service Mesh
NATS Connect Live | Resgate
NATS Connect Live | NATS & Augmented Reality
Deploy Secure and Scalable Services Across Kubernetes Clusters with NATS
KubeCon NA 2019 Keynote | NATS - Past, Present, and the Future
OSCON 2019 | Time to Think Different
Serverless for the Cloud Native Era with Fission
Simple, Secure, Scalable Messaging for the Cloud Native Era - AllThingsOpen 2...
Microservices Meetup San Francisco - August 2017 Talk on NATS
Writing Networking Clients in Go - GopherCon 2017 talk
NATS vs HTTP for Interservice Communication
Using NATS for Control Flow in Distributed Systems
Integration Patterns for Microservices Architectures

Recently uploaded (20)

PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPT
Teaching material agriculture food technology
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
A Presentation on Artificial Intelligence
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Empathic Computing: Creating Shared Understanding
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Teaching material agriculture food technology
Network Security Unit 5.pdf for BCA BBA.
20250228 LYD VKU AI Blended-Learning.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Spectroscopy.pptx food analysis technology
Dropbox Q2 2025 Financial Results & Investor Presentation
A comparative analysis of optical character recognition models for extracting...
MIND Revenue Release Quarter 2 2025 Press Release
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Spectral efficient network and resource selection model in 5G networks
Assigned Numbers - 2025 - Bluetooth® Document
A Presentation on Artificial Intelligence
Unlocking AI with Model Context Protocol (MCP)
Digital-Transformation-Roadmap-for-Companies.pptx
sap open course for s4hana steps from ECC to s4
Empathic Computing: Creating Shared Understanding
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf

NATS Connect Live | Distributed Identity & Authorization

  • 1. D i s t r i b u t e d Identity & Authorization The case for bearer tokens in . Kyle Thomas Founder & CEO
  • 2. Motivations - Distributed peer-to-peer messaging fabric - Decentralization - Privacy management - Secure messaging - Reducing complexity and cost - Next-gen business process automation readiness - Point-to-point enterprise data transfer
  • 3. Requirements - No central authority or broker - Delegated authorization to self-sovereign organizations - Ephemeral user model (in-memory for the duration of a connection) - RS256 & Ed25519 signing algorithm support - No dependency on nsc for generating key material - Zero required configuration of operators, accounts or users
  • 4. Bearer JWT - Ubiquitous & extensible - Token anatomy: header, payload & signature - exp header contains the expiration timestamp of the bearer authorization - alg header indicates the algorithm used for signing (EdDSA or RS256) - kid “key id” header contains a identifier indicating which public key should be used for signature verification - nats permissions claim contains publish, subscribe and allow_responses resource authorizations - signature verification is attempted on CONNECT; if successful, permissions are applied to an ephemeral in-memory user
  • 5. Permission Model { "publish": { "allow": [ "foo.bar", "foo.*.baz" ], "deny": [] }, "subscribe": { "allow": [ "foo.bar” ], "deny": [] }, "allow_responses": true }
  • 6. Permission Model{ "aud": "nats://nats.provide.network", "exp": 1586804105, "iat": 1586717705, "iss": "https://ident.provide.services", "jti": "d22768b8-10e5-411b-8840-caa438cc0cd9", "nats": { "permissions": { "subscribe": { "allow": [ "user.e889edea-580f-40d8-addf-d509dcf7783a", "network.*.status", "platform.>" ] } } }, "prvd": { "permissions": 7553, "user_id": "e889edea-580f-40d8-addf-d509dcf7783a" }, "sub": "user:e889edea-580f-40d8-addf-d509dcf7783a" }
  • 7. Caveats - How do other configured authorization schemes work when JWT bearer authorization is enabled? - Disable the other schemes! - Support -auth token parameter as fallback while migrating (i.e., NATS Streaming example)
  • 8. Usage ➜ ~ JWT_SIGNER_PUBLIC_KEY=' -----BEGIN PUBLIC KEY----- MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAullT/WoZnxecxKwQFlwE 9lpQrekSD+txCgtb9T3JvvX/YkZTYkerf0rssQtrwkBlDQtm2cB5mHlRt4lRDKQy EA2qNJGM1Yu379abVObQ9ZXI2q7jTBZzL/Yl9AgUKlDIAXYFVfJ8XWVTi0l32Vsx tJSd97hiRXO+RqQu5UEr3jJ5tL73iNLp5BitRBwa4KbDCbicWKfSH5hK5DM75EyM R/SzR3oCLPFNLs+fyc7zH98S1atglbelkZsMk/mSIKJJl1fZFVCUxA+8CaPiKbpD QLpzydqyrk/y275aSU/tFHidoewvtWorNyFWRnefoWOsJFlfq1crgMu2YHTMBVtU SJ+4MS5D9fuk0queOqsVUgT7BVRSFHgDH7IpBZ8s9WRrpE6XOE+feTUyyWMjkVgn gLm5RSbHpB8Wt/Wssy3VMPV3T5uojPvX+ITmf1utz0y41gU+iZ/YFKeNN8WysLxX AP3Bbgo+zNLfpcrH1Y27WGBWPtHtzqiafhdfX6LQ3/zXXlNuruagjUohXaMltH+S K8zK4j7n+BYl+7y1dzOQw4CadsDi5whgNcg2QUxuTlW+TQ5VBvdUl9wpTSygD88H xH2b0OBcVjYsgRnQ9OZpQ+kIPaFhaWChnfEArCmhrOEgOnhfkr6YGDHFenfT3/RA PUl1cxrvY7BHh4obNa6Bf8ECAwEAAQ== -----END PUBLIC KEY-----' ./nats-server -p 4222 -DV [-auth natstoken] ➜ ~ docker run -e JWT_SIGNER_PUBLIC_KEY=$PUBKEY provide/nats-server or
  • 9. Use in production Coming soon... Ekho ProtocolShuttleby Provide
  • 10. Resources - NATS Server PR #1149 - NATS Server fork on GitHub and DockerHub - ts-natsutil library with nats:// and wss:// support on GitHub - Get in touch: Twitter: @kylebt GitHub: kthomas