-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Fetch CRLs from a user defined URL #17136
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
5adba17
Fetch CRLs from a user defined CDP (PoC)
sgmiller 89eea4e
Handle no param sent
sgmiller 50ffb09
Move CRL fetch to a periodFunc. Use configured CA certs + system roo…
sgmiller 8407a80
comments
sgmiller a2cfb64
changelog
sgmiller ce31db1
Just use root trust
sgmiller 249b17d
cdp->url in api
sgmiller b3e140d
Store CRL and populate it initially in cdlWrite
sgmiller 211dcbd
Merge remote-tracking branch 'origin/main' into cert-auth-crl-autofetch
sgmiller 343540a
Merge remote-tracking branch 'origin/main' into cert-auth-crl-autofetch
sgmiller 89b29ea
Update docs
sgmiller 281fd20
Update builtin/credential/cert/path_crls.go
sgmiller 1ba0658
Handle pre-verification of a CRL url better
sgmiller b1de605
Merge branch 'cert-auth-crl-autofetch' of github.com:/hashicorp/vault…
sgmiller b6f382c
just in case
sgmiller ad2ce35
Fix crl write locking
sgmiller bdb5740
Add a CRL fetch unit test
sgmiller 99c267f
Remove unnecessary validity clear
sgmiller 0606bc3
Better func name
sgmiller 1114974
Don't exit early updating CRLs
sgmiller 6087cbd
lock in updateCRLs
sgmiller 0fae99e
gofumpt
sgmiller 4c75900
err-
sgmiller 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
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.
This needs to hold a write lock, in order for us to safely iterate over
b.crls
-- and eventually update it. A read lock isn't sufficient (even with a duplication) as we can modify the contents insetCRL
orpathCRLWrite
during this I think and deadlock.I think what needs to happen is the lock needs to be propagated up out of
setCRL
(which'll assume it is locked) and its callers will instead acquire that correctly (i.e., if they're going to call updateCRLs or fetchCRL eventually, they'll just proactively acquire the write lock).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.
Agreed. Something did feel off about that.
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.
Fixed.
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.
@sgmiller -- @stevendpclark pointed out you didn't add lock here in the periodic func ;-)
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.
This is actually the race test failure:
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.
Fixed.