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

Fix #119: Fetch and archive google json web keys set pair #137

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

Conversation

sukhman-sukh
Copy link

This PR introduces a model to store JSON Web Key Sets (JWK Sets) and X.509 certificates, along with a timestamp indicating the last update.

It also exposes two API endpoints for managing the key sets:

  1. GET /api/key/fetchJwkSet
  • Retrieves all archived keys stored in the database.
  1. POST /api/key/updateJwkSet
  • Updates the timestamp for an existing key if it already exists in the database. If the key is new (rotated), it will be inserted into the database along with the latest timestamp.

@sukhman-sukh sukhman-sukh changed the title Fetch and archive google json web keys set pair Fix #119: Fetch and archive google json web keys set pair Dec 18, 2024
Signed-off-by: sukhman <[email protected]>
@Divide-By-0
Copy link
Member

How do these display in the front end when I search? And is the timestamp getting passed to witness?

@sukhman-sukh
Copy link
Author

Sure,
I will add a page in frontend to view the archived JWK set and certs similar to DKIM archive

@Divide-By-0
Copy link
Member

Please fork a branch on main repo and make a new PR, as it will then deploy a preview for that. Please also add the frontend features at the same time as this PR, as well as a test!

@Divide-By-0
Copy link
Member

The more important part of this issue is that we need to update keys every 5 minutes or so, so a cronjob script is a critical part of the backend deployment here.

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