-
Notifications
You must be signed in to change notification settings - Fork 27
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
Allow multiple private keys but use the latest one #1748
Open
h2zh
wants to merge
67
commits into
PelicanPlatform:main
Choose a base branch
from
h2zh:multiple-private-keys
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
67 commits
Select commit
Hold shift + click to select a range
43b1440
key manager
h2zh 5f4532f
check private keys dir every 10 mins
h2zh da110ab
Use the latest private key
h2zh 3fc8d52
enbale concurrent access to the issuer private keys in memory, by ado…
h2zh 46380ef
Checks the directory containing .pem files every 5 minutes and loads …
h2zh 05eb5f6
backward compatibility: migrate existing issuer key, patches and twea…
h2zh ab4da0c
use atomic pointer for the in-memory private keys map
h2zh e6a72f2
newIssuerKey API endpoint on origin, and unit tests
h2zh 5ba6057
get the most recent modified private key from file dir, simply the code
h2zh 04342d0
move the LaunchIssuerKeysDirRefresh func to origin service
h2zh e94c311
fix linting problem
h2zh 54f48f5
use new config param IssuerKeysDirectory to replace IssuerKey
h2zh 532cd05
fix linting problems
h2zh 7b738d2
in docs, correct the scope of components affected by IssuerKeysDirectory
h2zh f4fdbd8
deprecate IssuerKey
h2zh 09d3586
improve the naming of migrated key
h2zh a80f272
patch for the algorithm of new key regristration
h2zh a518afb
register namespace with new key (with TODO left)
h2zh dceede7
update namespace pubKey in registry db
h2zh 8cb8090
update pubkey of all origin exports; align new key API and manual add…
h2zh 473c5f3
improve how the registry authorize origin to address the security con…
h2zh 007b7f1
Enhanced PoP using a "previous private key's signature"; previous act…
h2zh 00b24c8
Avoid key file naming collision when running new and old codebase bac…
h2zh edc1250
Merge branch 'main' into multiple-private-keys
h2zh 1fb11fd
Merge branch 'main' into multiple-private-keys
h2zh ac8eadf
handle old origin and a new registry (and vice versa); fix bug and ad…
h2zh da83225
fix semantic issues in PR review
h2zh 6ae3260
detach Namespaces PubKey Update from Namespace Registration workflow
h2zh adcc5ee
reverts changes on namespace registration workflow in previous commits
h2zh 0ea7e4f
fix linter issues
h2zh bc07e32
add unit tests to ensure public key update failures occur as expected
h2zh e3ca516
fix issues in follow-up reviews
h2zh e27231e
fix linter and go build tests
h2zh 6ccb591
on registry, only rotate out the one previous key, then add the new k…
h2zh c26d95b
remove IssuerKey deprecated: true to avoid several failed tests
h2zh 922a666
Merge branch 'main' into multiple-private-keys
h2zh 9496706
attempt to fix failed TestRegistryKeyChainingOSDF on GH Action test (…
h2zh 1ee5574
attempt to fix repeated-cache-access-not-found on GH Action test-ubuntu
h2zh 8605720
fix deprecated-replacedby binding check
h2zh fc24a65
minor semantic improvement
h2zh 2657575
attempt to fix API timeout "/api/v1.0/registry/updateNamespacesPubKey"
h2zh 9d83986
another attempt to fix timeout
h2zh f1123dd
3rd attempt to fix timeout
h2zh 08481cd
4th attempt to fix timeout
h2zh f3c7c99
5th attempt to fix timeout
h2zh 7cc6591
6th attempt to fix timeout
h2zh 0955e18
7th attempt to fix timeout
h2zh 6162778
8th attempt to fix timeout
h2zh e9a0fb2
9th attempt to fix timeout
h2zh 752ab32
10th attempt to fix timeout
h2zh 0b1b7c1
10.5th attempt to fix timeout
h2zh d6dc0e1
11th attempt to fix timeout
h2zh 5eb651f
12th attempt to fix timeout
h2zh 85bc504
only run ./registry/registry_db_test.go and client_commands_test.go
h2zh 1fec0ce
comment out TestServeNamespaceRegistry
h2zh 9d03bd4
comment out TestServeNamespaceRegistry
h2zh 08d3044
comment out both TestServeNamespaceRegistry and TestMultiPubKeysRegis…
h2zh 6809e1d
test improvement
h2zh 2c1ebd3
fix ResetCurrentIssuerKeysDir
h2zh ba42296
revert target tests in test-template.yml
h2zh 7280e9d
Avoid deadlock when waiting on exit
bbockelm b6593ce
bring back TestServeNamespaceRegistry and TestMultiPubKeysRegisteredO…
h2zh 896aa4b
comment out TestMultiPubKeysRegisteredOnNamespace
h2zh 67b62f0
comment out TestServeNamespaceRegistry
h2zh 7933e3c
generate a unique filename using a POSIX mkstemp-like logic; fix race…
h2zh e089e62
fix and refine private key i/o relevant funcs, remove risky api, crea…
h2zh a878208
attempt to solve timeout
h2zh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this work? Before, the variable was a file and now it's a directory. All the code below operates on this as if it was a directory.
On first glance, appears that the tool is broken, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, the private/public generation logic lies in
config.GetIssuerPublicJWKS()
, which was already updated to incorporate the new keys in IssuerKeysDirectory instead of only one key file at IssuerKey. Thepelican generate keygen
command works as expected (creating a key in ./issuer-keys).