Simple PoC to issue JSON Web Tokens (JWTs) with a canister on the Internet Computer.

Overview

JWT Issuer Proof of Concept

Overview

Simple PoC to issue JSON Web Tokens (JWTs) with a canister on the Internet Computer. It allows the issuance of two types of JWTs:

  • Symmetric (kind: mac, algo: HS256) uses a secret stored in the canister (not secure against a single malicious node provider).
  • Asymmetric (kind: tecdsa, algo ES256k) uses Threshold ECDSA (tECDSA) and kind iccsa uses canister signatures.

The JWT's sub (subject) field will be set to the principal of the caller. In tECDSA mode the iss (issuer) field will be set to the did:key representation of the tECDSA public key.

The canister signature (ICCSA) implementation is based on the Internet Identity implementation. The iss is set to the principal of the canister and the signature field of the JWT is set to the base64url encoded ICCSA certificate. Obviously no JWT library will be available to verify a JWT with algo: ICCSA and there might be better encodings. This is just meant as a PoC.

Quickstart

If you want to test your project locally, you can use the following commands:

# Starts the replica, running in the background
dfx start --background

# Deploys your canisters to the replica and generates your candid interface
dfx deploy

Interacting with the minimal web UI

Once the job completes, your application will be available at http://localhost:8000?canisterId={frontend_canister_id}.

Interacting wth dfx

Coming soon :)
You might also like...
A framework for creating PoC's for Solana Smart Contracts in a painless and intuitive way

Solana PoC Framework DISCLAIMER: any illegal usage of this framework is heavily discouraged. Most projects on Solana offer a more than generous bug bo

A PoC backbone for NFT Marketplaces on NEAR Protocol
A PoC backbone for NFT Marketplaces on NEAR Protocol

NFT Market Reference Implementation A PoC backbone for NFT Marketplaces on NEAR Protocol. Reference Changelog Changelog Progress: basic purchase of NF

WIP, POC of node js driver for pulsar backed by rust

WIP not ready at all, POC for node js rurt based pulsar driver pulsar-node-rust-client This project was bootstrapped by create-neon. Installing pulsar

OXiDE - A PoC packer written in Rust

OXiDE is a PoC Rust packer. It doesn't do much other than compress the target binary, but if you read the code, you'll find that extending it to do more (e.g., obfuscation, anti-reversing) is very possible!

Quick poc of the rsync wire protocol in Rust. Supports delta transfer.

Rsync wire protocol in Rust This is a quick poc of the rsync wire protocol in Rust. It supports delta transfer. The code is really a mess right now, a

Wangan Midnight MaxiTune 3DX+ Loader PoC

Required Packages Arch Linux nvidia-cg-toolkit mangohud lib32-glibc lib32-gcc-libs lib32-libx11 lib32-libxcb lib32-libpulse lib32-alsa-lib lib32-libxa

ATA-based DMA-attacking PoC tool written in Rust

atadma-rs ATA-based DMA-attacking PoC tool written in Rust Introduction This PoC is modified from ddma by btbd. Both the CLI-tool and the Windows driv

Example implementation for Biscuit tokens cryptography

example implementation for Biscuit token cryptography To aid in the implementation of Biscuit tokens in various languages, this repository contains an

Metaplex is a protocol built on top of Solana that allows: Creating/Minting non-fungible tokens;
Metaplex is a protocol built on top of Solana that allows: Creating/Minting non-fungible tokens;

Metaplex is a protocol built on top of Solana that allows: Creating/Minting non-fungible tokens; Starting a variety of auctions for primary/secondary

Owner
Dominic Wörner
curious
Dominic Wörner
All the data an IC app needs to make seamless experiences, accessible directly on the IC. DAB is an open internet service for NFT, Token, Canister, and Dapp registries.

DAB ?? Overview An Internet Computer open internet service for data. All the data an IC app needs to make a seamless experience, accessible directly o

Psychedelic 58 Oct 6, 2022
Source project for the Internet Computer software

The Internet Computer is the world’s first blockchain that runs at web speed and can increase its capacity without bound. Like the Internet (which is composed of many machines adhering to TCP/IP protocol) and blockchain protocols (such as Bitcoin and Ethereum).

DFINITY 1.2k Jan 1, 2023
Terabethia - A Bridge and Messaging Protocol between Ethereum and the Internet Computer.

Terabethia - A Bridge Between Ethereum & the Internet Computer Terabethia is a bridge between Ethereum & the Internet Computer that contracts in both

Psychedelic 36 Dec 26, 2022
DIP721 - An Internet Computer Non-fungible Token Standard

DIP721 - Introduction DIP721 is an ERC-721 style non-fungible token standard built mirroring its Ethereum counterpart and adapting it to the Internet

Psychedelic 48 Nov 24, 2022
A preview of the integration between Bitcoin and the Internet Computer.

Bitcoin Integration Developer Preview Overview The integration between the Internet Computer and Bitcoin will enable developers to build canisters tha

DFINITY 39 Sep 21, 2022
Rust library for build smart contracts on Internet Computer, by the Spinner.Cash team.

Spinner Rust library for building smart contracts on the Internet Computer. More specifically it is used by Spinner.Cash, a decentralized layer-2 prot

Spinner 6 May 31, 2022
A demo of the Internet Computer's Bitcoin API

Bitcoin Integration Demo A demo of the bitcoin endpoints on the Internet Computer. This demo is already deployed to the IC, so you can already try it

Islam El-Ashi 8 Jul 2, 2022
Designed for rapid iteration in IC Canister development projects.

IC_Utils Designed for rapid iteration in IC Canister development projects. IcContext IcContext provides the context for ic canister object invocation,

AlphaQ 83 Nov 13, 2023
React Native (Expo) + JWT Authentication + Rust ICP canister

React Native (Expo) app with JWT Authentication and IC Rust canister This is a Proof-of-Concept React Native Expo mobile application that uses JSON We

Luca Bertelli 5 May 2, 2024
EVM compatible chain with NPoS/PoC consensus

Reef Chain Reef chain is written in Rust. A basic familiarity with Rust tooling is required. To learn more about Reef chain, please refer to Documenta

Reef Finance 148 Dec 31, 2022