Skip to content
This repository was archived by the owner on Sep 18, 2024. It is now read-only.

feat: implement certification endpoints #105

Merged
merged 1 commit into from
May 8, 2024
Merged

Conversation

GuiBibeau
Copy link
Collaborator

Description of the pull request

The subnet's focus is on edge delivery of AI at scale. We are implementing a certification mechanisms for the miners to ensure they are running approved images in the subnet. This will ensure nobody is trying to game the system. This security will have multiple facets. Rotating certification keys is one of them. The scenario goes like this:

  1. A miner downloads a signed certified docker image and runs it
  2. The docker image will show a checksum hash of itself proving it's identity.
  3. The certification api will return a private value associated with this image to be included in API responses from miners
  4. this certification will change at a random moment forcing miners to re authenticate

This PR includes is the API side of this flow.

Changes made

  1. move redis client into a common file to avoid code duplication
  2. create a put and get endpoint for the certicicates. The put endpoint is bearer protected since only admins can update the certificate
  3. create a get endpoint checking the validity of hash and image signature, returns the current rotating certificate

Related issues

Testings done

Screenshots (if any)

Checklist

  • I have written tests
  • My code does not produce new errors
  • I gave myself a code review before asking others.

Copy link

vercel bot commented May 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
akeru-akeru-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 8, 2024 0:25am

@GuiBibeau GuiBibeau added 🟧 priority: high Stalls work on the project or its dependents 💻 aspect: code Concerns the software code in the repository 💪 skill: subnet requires proficiency with subnet labels May 8, 2024
Copy link
Collaborator

@TommieNg TommieNg left a comment

Choose a reason for hiding this comment

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

LGTM. 👍🏻

Copy link
Member

@tobySolutions tobySolutions left a comment

Choose a reason for hiding this comment

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

LGTM! Great work Gui!!!

@GuiBibeau GuiBibeau merged commit 9d9c4f2 into main May 8, 2024
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
💻 aspect: code Concerns the software code in the repository 🟧 priority: high Stalls work on the project or its dependents 💪 skill: subnet requires proficiency with subnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants