Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: implement key rotation system#14710

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
sreya merged 9 commits intomainfromjon/keyrotate
Sep 19, 2024
Merged

feat: implement key rotation system#14710

sreya merged 9 commits intomainfromjon/keyrotate
Sep 19, 2024

Conversation

sreya
Copy link
Collaborator

@sreyasreya commentedSep 17, 2024
edited
Loading

This PR implements an abstraction for rotating our internal signing keys. It's intentionally not integrated into the broader application in an attempt to keep the PR to a reasonable (although regrettably still large) size.

Contributes towardscoder/internal#52

@sreyasreya changed the titleJon/keyrotatefeat: implement key rotation systemSep 17, 2024
@sreyasreya marked this pull request as ready for reviewSeptember 17, 2024 22:49
Copy link
Contributor

@spikecurtisspikecurtis left a comment

Choose a reason for hiding this comment

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

Some comments inline, but I don't need to review again.

})
require.NoError(t, err)
require.Equal(t, now.Add(defaultRotationInterval*3), rotatedKey.StartsAt.UTC())
})
Copy link
Contributor

Choose a reason for hiding this comment

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

One more slightly insidious edge case:

2 Workspace apps keys in the database

seq 19, expiresAt 2 hours ago, valid secret
seq 20, deletesAt now, NULL secret (e.g. manually deleted)

We should insert a new key with sequence 21, startsAt 30 minutes from now.
We should set key 19 deletesAt to 1h5m fromnow, since as far as we know, it could be being used to mint tokens right now.

sreya reacted with thumbs up emoji
Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

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

I fixed it so thatdeletes_at is dependent on thestarts_at of the new key. So thedeletes_at would be1hr35m from now.

@sreyasreya merged commit2d5c068 intomainSep 19, 2024
26 checks passed
@sreyasreya deleted the jon/keyrotate branchSeptember 19, 2024 18:12
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsSep 19, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@spikecurtisspikecurtisspikecurtis approved these changes

@deansheatherdeansheatherAwaiting requested review from deansheather

Assignees

@sreyasreya

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@sreya@spikecurtis@deansheather

[8]ページ先頭

©2009-2025 Movatter.jp