Skip to content

Commit 472db0e

Browse files
bkioshnstevenj
andauthored
feat(athena): Add rbac-registration module to Athena (#541)
* feat: setup rbac-reg mod in athena Signed-off-by: bkioshn <[email protected]> * wip: rbac reg Signed-off-by: bkioshn <[email protected]> * chore: misleading doc Signed-off-by: bkioshn <[email protected]> * fix: refinement Signed-off-by: bkioshn <[email protected]> * fix(wip): index rbac-registration Signed-off-by: bkioshn <[email protected]> * fix: refactor insert binding Signed-off-by: bkioshn <[email protected]> * fix(wip): indexing Signed-off-by: bkioshn <[email protected]> * fix: properly index rbac data Signed-off-by: bkioshn <[email protected]> * fix: create, insert, db data Signed-off-by: bkioshn <[email protected]> * fix: select Signed-off-by: bkioshn <[email protected]> * fix: get and build registration chain Signed-off-by: bkioshn <[email protected]> * fix: utils Signed-off-by: bkioshn <[email protected]> * fix: select Signed-off-by: bkioshn <[email protected]> * fix: build registration chain Signed-off-by: bkioshn <[email protected]> * fix: db data Signed-off-by: bkioshn <[email protected]> * fix: utils Signed-off-by: bkioshn <[email protected]> * fix: refine rbac indexing Signed-off-by: bkioshn <[email protected]> * chore: remove member Signed-off-by: bkioshn <[email protected]> * chore: remove unuse dep Signed-off-by: bkioshn <[email protected]> * chore: cosmetic Signed-off-by: bkioshn <[email protected]> * chore: add athena to semantic pr Signed-off-by: bkioshn <[email protected]> * chore: add word to dict Signed-off-by: bkioshn <[email protected]> * fix: minor Signed-off-by: bkioshn <[email protected]> * fix: remove stub Signed-off-by: bkioshn <[email protected]> * fix: binding Signed-off-by: bkioshn <[email protected]> * chore: remove unused Signed-off-by: bkioshn <[email protected]> * fix: missing binding Signed-off-by: bkioshn <[email protected]> --------- Signed-off-by: bkioshn <[email protected]> Co-authored-by: Steven Johnson <[email protected]>
1 parent 2d3da84 commit 472db0e

File tree

26 files changed

+858
-20
lines changed

26 files changed

+858
-20
lines changed

.config/dictionaries/project.dic

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ blosc
1111
bmac
1212
bootstrapper
1313
brotli
14+
canvaskit
1415
cardano
1516
cbor
1617
cdylib
@@ -20,6 +21,7 @@ chrono
2021
cids
2122
ciphertext
2223
codegen
24+
COEP
2325
condvar
2426
coverallsapp
2527
cpus
@@ -31,8 +33,10 @@ dalek
3133
dashmap
3234
datelike
3335
dcbor
36+
Devnet
3437
dotstar
3538
earthfile
39+
Embedder
3640
errno
3741
fadvise
3842
fcntl
@@ -151,6 +155,3 @@ xprivate
151155
xprv
152156
xpub
153157
zilla
154-
Embedder
155-
COEP
156-
canvaskit

.github/workflows/semantic_pull_request.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ jobs:
2222
utils
2323
general
2424
deps
25+
athena
Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
{
2-
"$schema": "https://raw.githubusercontent.com/input-output-hk/hermes/main/hermes/schemas/hermes_app_manifest.schema.json",
3-
"name": "app",
4-
"icon": "icon.svg",
5-
"metadata": "metadata.json",
6-
"modules": [
7-
{
8-
"package": "modules/http-proxy/lib/http_proxy.hmod",
9-
"name": "http_proxy"
10-
}
11-
],
12-
"www": "modules/http-proxy/lib/www"
13-
}
2+
"$schema": "https://raw.githubusercontent.com/input-output-hk/hermes/main/hermes/schemas/hermes_app_manifest.schema.json",
3+
"name": "app",
4+
"icon": "icon.svg",
5+
"metadata": "metadata.json",
6+
"modules": [
7+
{
8+
"package": "modules/http-proxy/lib/http_proxy.hmod",
9+
"name": "http_proxy"
10+
},
11+
{
12+
"package": "modules/rbac-registration/lib/rbac_registration.hmod",
13+
"name": "rbac_registration"
14+
}
15+
],
16+
"www": "modules/http-proxy/lib/www"
17+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[package]
2+
name = "rbac-registration"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[lib]
7+
crate-type = ["cdylib"]
8+
9+
[dependencies]
10+
wit-bindgen = "0.43.0"
11+
anyhow = "1.0.98"
12+
serde_json = "1.0.142"
13+
14+
cardano-blockchain-types = { version = "0.0.6", git = "https://github.com/input-output-hk/catalyst-libs", tag = "cardano-blockchain-types/v0.0.6" }
15+
rbac-registration = { version = "0.0.9", git = "https://github.com/input-output-hk/catalyst-libs", tag = "rbac-registration/v0.0.9" }
16+
catalyst-types = { version = "0.0.6", git = "https://github.com/input-output-hk/catalyst-libs.git", tag = "catalyst-types/v0.0.6" }
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
VERSION 0.8
2+
3+
IMPORT ../../../../ AS hermes
4+
IMPORT ../../../../../wasm/wasi AS wasi
5+
6+
build-rbac-registration:
7+
DO wasi+BUILD_RUST_COMPONENT --wasi-src-dir=../../../../../wasm/wasi --out=rbac_registration.wasm
8+
9+
local-build-rbac-registration:
10+
FROM scratch
11+
COPY +build-rbac-registration/rbac_registration.wasm .
12+
SAVE ARTIFACT rbac_registration.wasm AS LOCAL lib/rbac_registration.wasm
13+
14+
15+
package-rbac-registration-module:
16+
FROM hermes+build
17+
18+
COPY lib/ .
19+
COPY +build-rbac-registration/rbac_registration.wasm .
20+
21+
RUN ./target/release/hermes module package manifest_module.json
22+
SAVE ARTIFACT rbac_registration.hmod

hermes/apps/athena/modules/rbac-registration/blueprint.cue

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/input-output-hk/hermes/main/hermes/schemas/hermes_module_manifest.schema.json",
3+
"name": "rbac_registration",
4+
"metadata": "metadata.json",
5+
"component": "rbac_registration.wasm",
6+
"config": {
7+
"file": "config.json",
8+
"schema": "config.schema.json"
9+
},
10+
"settings": {
11+
"schema": "settings.schema.json"
12+
}
13+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/input-output-hk/hermes/main/hermes/schemas/hermes_app_metadata.schema.json",
3+
"name": "RBAC registration service",
4+
"version": "V0.1.0",
5+
"description": "Catalyst Role based access control registration service",
6+
"src": [
7+
"https://github.com/input-output-hk/hermes",
8+
"https://github.com/input-output-hk/catalyst-voices"
9+
],
10+
"copyright": ["Copyright Ⓒ 2024, IOG Singapore."],
11+
"license": [
12+
{
13+
"spdx": "Apache-2.0",
14+
"file": "/srv/data/apache2.txt"
15+
},
16+
{
17+
"spdx": "MIT",
18+
"file": "/srv/data/mit.txt"
19+
}
20+
],
21+
"developer": {
22+
"name": "IOG Singapore",
23+
"contact": "[email protected]",
24+
"payment": "wallet address"
25+
}
26+
}

0 commit comments

Comments
 (0)