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

Include Metadata Schema #269

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

kairoaraujo
Copy link
Collaborator

@kairoaraujo kairoaraujo commented May 8, 2024

What this PR does / why we need it

Include Metadata Schema for the DSSE envelopes.

Acceptance Criteria Met

  • Docs changes if needed
  • Testing changes if needed
  • All workflow checks passing (automatically enforced)
  • All review conversations resolved (automatically enforced)
  • DCO Sign-off

Special notes for your reviewer:

func (Metadata) Fields() []ent.Field {
return []ent.Field{
field.String("key").NotEmpty().Comment("Key value for the metadata item"),
field.String("value").NotEmpty().Comment("Value for the metadata item"),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @jkjell,
Should we have a string as a value or any data structure?
Any data structure could bring some flexibility, such as in the unrecognized fields TUF uses.
IMO, it helps a lot in application integrations or even operational usage.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️ the idea. The biggest unknown for me is if/how that complicates the creation of metadata (i.e. if we go the HTTP header route or something else)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest having it in the DSSE envelope JSON, but I know many people disagree.

{
    "payload": "payload.....",
    "payloadType": "https://witness.testifysec.com/...",
    "signatures": [
        {
            "keyid": "keyid...",
            "sig": "signature..."
        }
    ],
    "metadata": "any"
}

Copy link

codecov bot commented May 8, 2024

Codecov Report

Attention: Patch coverage is 0.41973% with 2847 lines in your changes are missing coverage. Please review.

Project coverage is 1.40%. Comparing base (a035c62) to head (05eac30).
Report is 81 commits behind head on main.

Files Patch % Lines
generated.go 0.00% 634 Missing ⚠️
ent/metadata_query.go 0.00% 383 Missing ⚠️
ent/mutation.go 0.00% 285 Missing ⚠️
ent/metadata_update.go 0.00% 250 Missing ⚠️
ent/gql_pagination.go 0.00% 193 Missing ⚠️
ent/gql_where_input.go 0.00% 148 Missing ⚠️
ent/metadata_create.go 0.00% 130 Missing ⚠️
ent/gql_collection.go 0.00% 119 Missing ⚠️
ent/dsse_update.go 0.00% 112 Missing ⚠️
ent/client.go 0.00% 98 Missing ⚠️
... and 16 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #269       +/-   ##
==========================================
- Coverage   82.40%   1.40%   -81.00%     
==========================================
  Files          10     125      +115     
  Lines         358   31290    +30932     
==========================================
+ Hits          295     441      +146     
- Misses         43   30792    +30749     
- Partials       20      57       +37     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kairoaraujo kairoaraujo changed the title WIP: Include Metadata Schema Include Metadata Schema May 16, 2024
@kairoaraujo kairoaraujo marked this pull request as ready for review May 16, 2024 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants