Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: RBAC Documentation Drafting #332

Merged
merged 88 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from 85 commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
dc01689
chore: wip
minikin Dec 20, 2023
eccc9bf
Update 0005-flutter-app.md
minikin Dec 21, 2023
e00ae83
Update 0005-flutter-app.md
minikin Dec 21, 2023
5d08877
Merge branch 'main' into feature/adr-fronted-app-architecture
minikin Dec 21, 2023
42c3755
Update 0005-flutter-app.md
minikin Dec 22, 2023
3183dc2
Update 0005-flutter-app.md
minikin Dec 25, 2023
9a756d5
Merge branch 'main' into feature/adr-fronted-app-architecture
minikin Dec 25, 2023
7240906
Merge branch 'main' into feature/adr-fronted-app-architecture
minikin Dec 27, 2023
d23779b
Update 0005-flutter-app.md
minikin Dec 27, 2023
16bf4a2
Update 0005-flutter-app.md
minikin Dec 27, 2023
1b980f2
Update 0005-flutter-app.md
minikin Dec 27, 2023
bcc4891
Update 0005-flutter-app.md
minikin Dec 27, 2023
e63d75c
Update 0005-flutter-app.md
minikin Dec 29, 2023
8320354
Merge branch 'main' into feature/adr-fronted-app-architecture
minikin Dec 29, 2023
0539ac9
Update 0005-flutter-app.md
minikin Dec 29, 2023
8b9695c
Merge branch 'main' into feature/adr-fronted-app-architecture
minikin Jan 3, 2024
07ad50c
Update 0005-flutter-app.md
minikin Jan 3, 2024
83faf22
Merge branch 'main' into feature/adr-fronted-app-architecture
stevenj Jan 4, 2024
ec8ea17
docs(docs): Use latest docs builders and fix concepts page
stevenj Jan 4, 2024
6903db6
Merge branch 'main' into feature/adr-fronted-app-architecture
stevenj Jan 11, 2024
d6e5ce8
docs(cips): Start drafting the CIPS for milestone 2
stevenj Jan 11, 2024
211293d
docs(cips): More text for RBAC metadata draft
stevenj Jan 12, 2024
f5fe3e9
docs(cips): WIP updates to draft cip for role registration
stevenj Jan 18, 2024
d85ff26
docs(cips): define draft specification for a ULID cbor tag
stevenj Jan 18, 2024
069e180
docs(cips): Further WIP edits to RBAC
stevenj Jan 18, 2024
0680e07
docs(cips): fix ulid spec binary encoding reference
stevenj Jan 18, 2024
d849fde
docs(cips): Add a tag to the epoch time.
stevenj Jan 18, 2024
9766001
docs(cips): Add CBOR tag cip for ED25519-BIP32 Keys, Derivation paths…
stevenj Jan 19, 2024
d0682f7
docs(cips): Properly define the field tags to use where known, and cl…
stevenj Jan 19, 2024
7b6eda3
docs(cips): Fix nonce so its reliable without needing blockchain data
stevenj Jan 26, 2024
95ebe48
Merge branch 'main' into feat/cips
stevenj Feb 7, 2024
d95dc25
docs(cips): updates
stevenj Mar 8, 2024
94970ea
Merge branch 'main' into feat/cips
stevenj Mar 13, 2024
8e7e579
docs(docs): Add CDDL definition for POC x509 envelope metadata
stevenj Mar 13, 2024
153170e
fix(vscode): update vscode extension recommendations
stevenj Mar 13, 2024
c665fd7
docs(cips): rbac x509 envelope fix
stevenj Mar 13, 2024
0960b2f
docs(cips): wip updates to high level docs
stevenj Mar 15, 2024
322fbbc
docs(cips): Add overview of cardano transaction processign and data
stevenj Mar 15, 2024
2d9d8a9
docs(cips): update cardano block to be complete for clarity
stevenj Mar 15, 2024
7fd0c00
docs(cips): fix layout engine
stevenj Mar 15, 2024
e0cb03c
docs(cips): wip cddl for envelope metadata
stevenj Mar 20, 2024
3b976c2
Merge branch 'main' into feat/cips
stevenj Mar 21, 2024
3e35923
docs(cips): Add cddl specs and diagrams for x509 rbac registration work
stevenj Mar 22, 2024
f08e65a
Merge branch 'main' into feat/cips
stevenj Mar 22, 2024
4f5e8db
docs(cips): Add full transaction/metadata relationship diagram
stevenj Mar 25, 2024
3150ceb
Merge branch 'feat/cips' of github.com:input-output-hk/catalyst-voice…
stevenj Mar 25, 2024
c18d995
refactor(cips): reorganize documentation ready for drafting descripti…
stevenj Mar 26, 2024
8ff8ea8
docs(cips): add cip draft for catalyst roles using the x509-rbac stan…
stevenj Mar 26, 2024
2a53640
docs(cips): Add c509 cddl with restrictions and enhancements for plut…
stevenj Mar 27, 2024
e0d07e4
docs(cips): Metadata envelope specification draft complete
stevenj Mar 29, 2024
3f0f0e3
Merge branch 'main' into feat/cips
stevenj Mar 29, 2024
4cc7577
Update docs/src/catalyst-standards/draft-cips/c509-plutus-restricted-…
stevenj Apr 2, 2024
7c67290
Update docs/src/catalyst-standards/draft-cips/c509-plutus-restricted-…
stevenj Apr 2, 2024
e0d8346
Update docs/src/catalyst-standards/draft-cips/x509-role-registration-…
stevenj Apr 2, 2024
c17ceff
Update docs/src/catalyst-standards/draft-cips/x509-role-registration-…
stevenj Apr 2, 2024
46a3839
Update docs/src/catalyst-standards/draft-cips/x509-envelope-metadata/…
stevenj Apr 2, 2024
d067e40
Update docs/src/catalyst-standards/draft-cips/x509-envelope-metadata/…
stevenj Apr 2, 2024
b4a87c1
Update docs/src/catalyst-standards/draft-cips/x509-envelope-metadata/…
stevenj Apr 2, 2024
8e58677
Update docs/src/catalyst-standards/draft-cips/c509-plutus-restricted-…
stevenj Apr 2, 2024
89eb0a2
docs(cips): Fix time and algorithm comments
stevenj Apr 3, 2024
172ffbf
build(frontend): Relax flutter/dart version requirements to last mino…
stevenj Apr 3, 2024
9eb5340
Merge branch 'relax-flutter-versions' into feat/cips
stevenj Apr 3, 2024
24792a2
Merge branch 'main' into feat/cips
stevenj Apr 3, 2024
863a6a0
docs(cips): wip
stevenj Apr 5, 2024
d749a50
Merge branch 'main' into feat/cips
stevenj Apr 8, 2024
fa26708
Merge branch 'main' into feat/cips
stevenj Apr 8, 2024
974d832
fix(cips): rename draft x509 envelope CIP so its easier to identify
stevenj Apr 10, 2024
65b3986
docs(cips): WIP updates to x509 roles
stevenj Apr 10, 2024
2904227
fix(cips): rename RBAC definition CIP draft so its easier to identify
stevenj Apr 10, 2024
29fe657
docs(cips): x509 certificate registration format fully defined
stevenj Apr 10, 2024
daf0b0e
docs(cips): Document the restricted plutus subset.
stevenj Apr 10, 2024
3c3008f
docs(cips): Add document detailing how CIP-30 is used to sign the tra…
stevenj Apr 10, 2024
76746d5
Merge branch 'main' into feat/cips
stevenj Apr 10, 2024
2b6411f
fix(cips): remove trailing spaces
stevenj Apr 10, 2024
5a83eeb
Merge branch 'feat/cips' of github.com:input-output-hk/catalyst-voice…
stevenj Apr 10, 2024
989b0a5
Merge branch 'main' into feat/cips
stevenj Apr 10, 2024
5f68b88
fix(cips): Fix line lengths
stevenj Apr 10, 2024
37823e0
Merge branch 'feat/cips' of github.com:input-output-hk/catalyst-voice…
stevenj Apr 10, 2024
2a9114a
fix(cips): Correct spelling
stevenj Apr 10, 2024
51c365e
fix(cips): spelling
stevenj Apr 10, 2024
c1546e9
Merge branch 'main' into feat/cips
stevenj Apr 10, 2024
6312ba7
fix(frontend): revert changes to flutter/dart versions
stevenj Apr 10, 2024
26ad502
fix(frontend): more flutter/dart version corrections
stevenj Apr 10, 2024
b9ed28e
fix(frontend): Revert flutter files to same as main branch
stevenj Apr 10, 2024
1dc7ddf
fix(frontend): revert more flutter .yml files to those in main
stevenj Apr 10, 2024
fc7f462
fix(cips): Fix links between files
stevenj Apr 10, 2024
d4a2b68
docs(cips): Add catalyst specific role registration documentation
stevenj Apr 10, 2024
cb687d0
docs(spelling): fix spelling
stevenj Apr 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions .config/dictionaries/project.dic
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ cfbundle
chromedriver
chrono
ciphertext
CIPs
COCOAPODS
codegen
codepoints
Expand All @@ -48,7 +49,6 @@ Edgedriver
emurgo
encryptor
endfunction
endfunction
fetchval
fmtchk
fmtfix
Expand Down Expand Up @@ -86,6 +86,9 @@ lintfix
localizable
loguru
mdlint
metadatum
metadatums
metamap
mgrybyk
mithril
mitigations
Expand Down Expand Up @@ -120,6 +123,8 @@ pubspec
pytest
rapidoc
redoc
Replayability
repr
reqwest
rfwtxt
ripgrep
Expand All @@ -140,6 +145,7 @@ slotno
sqlfluff
Stefano
stevenj
Subkey
subosito
SYSROOT
tacho
Expand All @@ -156,13 +162,14 @@ Traceback
TXNZD
Typer
unmanaged
UTXO
utxo
Utxos
UTXO
utxos
Utxos
vite
vitss
vkey
vkeywitness
voteplan
voteplans
wallclock
Expand All @@ -176,6 +183,3 @@ xctest
xctestrun
xcworkspace
yoroi
cbor
metamap
repr
1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"rust-lang.rust-analyzer",
"JScearcy.rust-doc-viewer",
"serayuzgur.crates",
"anweiss.cddl-languageserver",
"tintinweb.graphviz-interactive-preview",
"terrastruct.d2"
]
Expand Down
1 change: 1 addition & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,5 +175,6 @@
"web-components.min.js",
"**/generated/**",
"utilities/catalyst_voices_remote_widgets/example/**/**",
"**/*.svg"
]
}
1 change: 1 addition & 0 deletions docs/src/architecture/08_concepts/.pages
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
title: Concepts
32 changes: 32 additions & 0 deletions docs/src/catalyst-standards/cbor_tags/ulid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# ULIDs for CBOR

This document specifies a tag for ULIDs in Concise Binary Object Representation (CBOR) [1].

Tag: 32780
Data item: byte string
Semantics: Binary ULID (https://github.com/ulid/spec/tree/master)
Point of contact: Steven Johnson <[email protected]>
Description of semantics:
https://github.com/input-output-hk/catalyst-voices/tree/main/docs/src/catalyst-standards/cbor_tags/ulid.md

## Semantics

Tag 32780 can be applied to a byte string (major type 2) to indicate that the byte string
is a binary [ULID] as specified by the [ULID Binary Layout].

## References

<!-- markdownlint-disable max-one-sentence-per-line -->
<!-- cspell: words Bormann -->
[1] [C. Bormann, and P. Hoffman. "Concise Binary Object Representation (CBOR)". RFC 8949, October 2020.][RFC 8949]
<!-- markdownlint-enable max-one-sentence-per-line -->

[2] [Universally Unique Lexicographically Sortable Identifier][ULID]

## Author

Steven Johnson <[email protected]>

[RFC 8949]: https://datatracker.ietf.org/doc/html/rfc8949
[ULID]: https://github.com/ulid/spec/blob/master/README.md
[ULID Binary Layout]: https://github.com/ulid/spec/tree/master#binary-layout-and-byte-order
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
; This c509 Certificate format is based upon:
; https://datatracker.ietf.org/doc/draft-ietf-cose-cbor-encoded-cert/09/
; And is restricted/customized to better enable compatibility with Plutus scripts
; that would consume them, without loosing necessary features of x509
; Not all x509 features are supported and some fields have different semantics to improve
; certificate size and ability to be processed by Plutus Scripts.

; cspell: words reencoded, biguint

C509CertificatePlutusRestrictedSubset = [ TBSCertificate, issuerSignatureValue: ed25519Signature, ]

; The elements of the following group are used in a CBOR Sequence:
TBSCertificate = (
c509CertificateType: &c509CertificateTypeValues, ; Always 0
certificateSerialNumber: CertificateSerialNumber, ; Can be ignored/set to 0 or used as intended.
issuer: Name, ; This could be an on-chain reference to the issuer cert, what would be the best way? Transaction hash/cert hash?
validityNotBefore: Time, ; c509 uses UTC
validityNotAfter: Time, ; c509 uses UTC
subject: Name, ; Reference to on-chain keys related to this certificate
subjectPublicKeyAlgorithm: AlgorithmIdentifier, ; Must be int(12) = Ed25519
subjectPublicKey: subjectPublicKey, ; Ed25519 public key
extensions: Extensions, ; No extensions are currently supported must be set to []
issuerSignatureAlgorithm: AlgorithmIdentifier, ; Must be int(12) = Ed25519
)

; 0 = Native CBOR Certificate type
; 1 = reencoded-der-cert - Not supported in this restricted version of the format.
c509CertificateTypeValues = ( native-cbor: 0,
; reencoded-der: 1 ; Not supported in this restricted encoding format
)

CertificateSerialNumber = biguint

Name = [ * RelativeDistinguishedName ]
/ text
/ bytes

RelativeDistinguishedName = Attribute / [ 2* Attribute ]

Attribute = (
( attributeType: int, attributeValue: text )
// ( attributeType: oid, attributeValue: bytes )
// ( attributeType: pen, attributeValue: bytes )
// CardanoPublicKey
)

subjectPublicKey = bytes .size (32..32); Ed25519 public key stored in bytes, adjust size of this if other key types are supported.

; This is a completely custom Attribute for the RelativeDistinguishedName which is only for use with Plutus scripts.
; attributeType = The type of Cardano key we associate with this certificate.
; proof = Does the transaction require proof that the key is owned by the transaction signer?
; attributeValue = The Cardano public key hash of the attribute type

CardanoPublicKey = ( attributeType: &cardanoKeyTypes proof: bool, attributeValue: bytes .size (28..28) )

cardanoKeyTypes = (
paymentKeyHash: 0,
stakeKeyHash: 1,
drepVerificationKeyHash: 2,
ccColdVerificationKeyHash: 3,
ccHotVerificationKeyHash: 4,
)

; Plutus will need to convert the Unix epoch timestamp to the nearest slot number
; validityNotBefore rounds up to the next Slot after that time.
; validityNotAfter rounds down to the next Slot before that time.
Time = ( ~time / null )

ed25519Signature = bstr .size 64; Ed25519 signature must be tagged to identify their type.


; Currently ONLY AlgorithmIdentifier int(12) - Ed25519 is supported.
; oid and [ algorithm: oid, parameters: bytes ] are not supported by Plutus.
AlgorithmIdentifier = (int
/ ~oid
/ [ algorithm: ~oid, parameters: bytes ])

; Extensions are not currently supported by plutus and should be set to []
; Any extensions present in the certificate will be ignored by plutus scripts.
Extensions = [ * Extension ] / int

Extension = (
( extensionID: int, extensionValue: any )
// ( extensionID: ~oid, ? critical: true, extensionValue: bytes )
// ( extensionID: pen, ? critical: true, extensionValue: bytes )
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
CIP: /?
Title: Restricted format for C509 compatibility with Plutus
Category: MetaData
Status: Proposed
Authors:
- Steven Johnson<[email protected]>
Implementors: []
Discussions:
- https://github.com/cardano-foundation/cips/pulls/?
Created: 2023-10-24
License: CC-BY-4.0
---

## Abstract

Plutus can access metadatums that encode C509 certificates.
This specification documents the restricted feature set of those certificates.

## Motivation: why is this CIP necessary?

In order to keep complexity low, this specification details a set of restriction
on-top of a standard C509 certificate definition.
These restrictions help plutus support the important features of
x509 certificates in smart contracts on-chain.

They also help reduce the amount of data stored on-chain.

## Specification

See [c509-cert-plutus-restricted.cddl](./c509-cert-plutus-restricted.cddl).
This is the formal specification which describes the requirements of on-chain x509 certificates.
ust include a CDDL schema in it's specification.-->

## Rationale: how does this CIP achieve its goals?

By clearly defining the feature set that plutus scripts can accept from C509 certificates it is easier for
script writers and certificate creators to produce interoperable certificates.

## Path to Active

This draft CIP requires extensive collaboration with multiple parties in order to arrive at a
correct and viable specification.

It has been kept deliberately terse in order for that process to be as open and collaborative as possible.

### Acceptance Criteria

* General community consensus on the minimum standard needs to be agreed.

### Implementation Plan

## Copyright

This CIP is licensed under [CC-BY-4.0]

Code samples and reference material are licensed under [Apache 2.0]

This file was deleted.

Loading
Loading