Skip to content

feat: host a signed Network Descriptor and JWKS from quick-start [OpenAgriNet/network-adapter#74] - #82

Open
tdprajwal wants to merge 4 commits into
feat/71-registry-federation-fieldsfrom
feat/74-host-descriptor-jwks
Open

tdprajwal wants to merge 4 commits into
feat/71-registry-federation-fieldsfrom
feat/74-host-descriptor-jwks

Conversation

@tdprajwal

@tdprajwal tdprajwal commented Oct 14, 2026 •

Copy link
Copy Markdown

What

make host-descriptor generates the signed Network Descriptor, JWKS and
schema-packs.json from the network's registry entry and serves them through NPM.
Also fixes a Keycloak restart loop after an interrupted boot.

Why

Another network needs these to find and verify us before admitting us.

Testing

Tested on two local networks: the peer verifies over HTTPS, and tampered
documents are refused. Calls signed with the UUID keyId are accepted;
osid-signed calls are refused.

Closes OpenAgriNet/network-adapter#74

@tdprajwal tdprajwal changed the title feat: host a signed Network Descriptor and JWKS feat: host a signed Network Descriptor and JWKS #74 Oct 15, 2026
@tdprajwal tdprajwal changed the title feat: host a signed Network Descriptor and JWKS #74 feat: host a signed Network Descriptor and JWKS [#74] Oct 15, 2026
@tdprajwal
tdprajwal force-pushed the feat/74-host-descriptor-jwks branch from dbd9721 to 2fbcd4b Compare October 15, 2026 10:44
@tdprajwal
tdprajwal force-pushed the feat/74-host-descriptor-jwks branch 2 times, most recently from 0fd8192 to de61c44 Compare October 21, 2026 10:24
@tdprajwal tdprajwal changed the title feat: host a signed Network Descriptor and JWKS [#74] feat: host a signed Network Descriptor and JWKS from quick-start [OpenAgriNet/network-adapter#74] Oct 21, 2026

@ameersohel45 ameersohel45 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1. Key id mismatch (blocking)
setup.py:542 signs with the entry's osid, but the adapter looks up the key's own osid (sunbirdRegistry.go:548). Once validateSign is on, every call fails with key_id_mismatch. Quick-start doesn't show it because validateSign is off there. Can we agree on one id before merging?

2. Schema URL pattern
On an already-seeded registry, old rows still have raw.githubusercontent URLs, so the new pattern will refuse any update to them. Can the pattern accept both forms?

^https://(raw\.githubusercontent\.com/OpenAgriNet/network-specs/[A-Za-z0-9_-]+|openagrinet\.github\.io/network-specs)/schema/[A-Za-z0-9]+/v[0-9]+\.[0-9]+/[A-Za-z0-9_-]+\.yaml$

@ameersohel45 ameersohel45 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

make host-descriptor doesn't host anything
It only writes the descriptor, JWKS and schema-packs files into .well-known/. Serving them still needs NPM recreated for the new mount and well-known.conf pasted in by hand. Can we either make the command do what its name says, or rename it to something like make prepare-desc-jwks-schemaPack?

@tdprajwal
tdprajwal force-pushed the feat/74-host-descriptor-jwks branch from 2905f8d to 96830d4 Compare October 23, 2026 11:56
@tdprajwal

Copy link
Copy Markdown
Author

Thanks @ameersohel45 , all three addressed:

  1. Key id: switched from the osid to our own UUID keyId on the key. Adapters sign with it
    and the JWKS publishes it, so it's the same in every registry. feat: update knowledge-provider Helm charts #84's lookup needs to match
    k.KeyID as well as k.OSID; I'll share the diff, in comments there.
  2. The pattern now accepts both URL forms, as suggested.
  3. make host-descriptor now hosts: it generates the files, starts or reloads NPM, and checks
    the descriptor is served. The paste step is gone (the locations moved to server_proxy.conf).

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