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

Develop #70

Merged
merged 2 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
58 changes: 46 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -602,13 +602,15 @@ sequenceDiagram
Note over H: Publish new Entity Statement
```

## Example Implementation Steps
## Example: Trust Mark Issuance and Verification Steps

### 1. Trust Anchor Setup
### Step 1: Set up Trust Anchor

```http
# Create Trust Anchor account
POST http://localhost:8081/accounts
Content-Type: application/json

{
"username": "trust-anchor",
"identifier": "http://localhost:8080/trust-anchor"
Expand All @@ -621,12 +623,20 @@ X-Account-Username: trust-anchor
# Create Trust Mark type
POST http://localhost:8081/trust-mark-types
X-Account-Username: trust-anchor
Content-Type: application/json

{
"identifier": "http://localhost:8080/trust-anchor/trust-mark-types/exampleType"
}
```

### Step 2: Set up Trust Mark Issuer

```http
# Create Issuer account
POST http://localhost:8081/accounts
Content-Type: application/json

{
"username": "trust-mark-issuer",
"identifier": "http://localhost:8080/trust-mark-issuer"
Expand All @@ -636,31 +646,49 @@ POST http://localhost:8081/accounts
POST http://localhost:8081/keys
X-Account-Username: trust-mark-issuer

# Publish Issuer configuration
POST http://localhost:8081/entity-statement
X-Account-Username: trust-mark-issuer
```

### Step 3: Authorize Trust Mark Issuer

```http
# Authorize Issuer using Trust Anchor account
POST http://localhost:8081/trust-mark-types/{type-id}/issuers
POST http://localhost:8081/trust-mark-types/{trust-mark-type-id}/issuers
X-Account-Username: trust-anchor
Content-Type: application/json

{
"identifier": "http://localhost:8080/trust-mark-issuer"
}

# Publish Trust Anchor configuration
POST http://localhost:8081/entity-statement
X-Account-Username: trust-anchor
```

# Issue Trust Mark
### Step 4: Issue Trust Mark

```http
# Issue Trust Mark to holder
POST http://localhost:8081/trust-marks
X-Account-Username: trust-mark-issuer
Content-Type: application/json

{
"sub": "http://localhost:8080/trust-mark-holder",
"trust_mark_type_identifier": "http://localhost:8080/trust-mark-types/exampleType"
}
```

# Publish Issuer configuration
POST http://localhost:8081/entity-statement
X-Account-Username: trust-mark-issuer
### Step 5: Set up Trust Mark Holder

```http
# Create Holder account
POST http://localhost:8081/accounts
Content-Type: application/json

{
"username": "trust-mark-holder",
"identifier": "http://localhost:8080/trust-mark-holder"
Expand All @@ -670,22 +698,28 @@ POST http://localhost:8081/accounts
POST http://localhost:8081/keys
X-Account-Username: trust-mark-holder

# Store Trust Mark
# Store received Trust Mark
POST http://localhost:8081/received-trust-marks
Content-Type: application/json
X-Account-Username: trust-mark-holder

{
"trust_mark_type_identifier": "http://localhost:8080/trust-mark-types/exampleType",
"jwt": "eyJ..."
"jwt": "eyJ..." # Replace with JWT token issued in step 4
}

# Publish Holder configuration
POST http://localhost:8081/entity-statement
X-Account-Username: trust-mark-holder
```

### 5. Trust Mark Verification
### Step 6: Verify Trust Mark Status

# Verify Trust Mark status
```http
# Check Trust Mark status
POST http://localhost:8080/trust-mark-issuer/trust-mark-status
Content-Type: application/json

{
"trust_mark_id": "http://localhost:8080/trust-mark-types/exampleType",
"sub": "http://localhost:8080/trust-mark-holder"
Expand All @@ -694,7 +728,7 @@ POST http://localhost:8080/trust-mark-issuer/trust-mark-status

# License

```
```text
Apache License Version 2.0
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ fun getNpmVersion(): String {

allprojects {
group = "com.sphereon.oid.fed"
version = "0.4.21-SNAPSHOT"
version = "0.4.23-SNAPSHOT"
val npmVersion by extra { getNpmVersion() }

// Common repository configuration for all projects
Expand Down