Skip to content

[Security - Revocation] Crl Directory Watcher Implementation#34749

Merged
gtcooke94 merged 233 commits intogrpc:masterfrom
gtcooke94:CRLWatcher
Nov 3, 2023
Merged

[Security - Revocation] Crl Directory Watcher Implementation#34749
gtcooke94 merged 233 commits intogrpc:masterfrom
gtcooke94:CRLWatcher

Conversation

@gtcooke94
Copy link
Copy Markdown
Contributor

@gtcooke94 gtcooke94 commented Oct 19, 2023

This adds the directory reloader implementation of the CrlProvider. This will periodically reload CRL files in a directory per gRFC A69

Included in this is the following:

  • A public API to create the DirectoryReloaderCrlProvider
  • A basic directory interface in gprpp and platform specific impls for getting the list of files in a directory (unfortunately prior C++17, there is no std::filesystem, so we have to have platform specific impls)
  • The implementation of DirectoryReloaderCrlProvider takes an event_engine and a directory interface. This allows us to test using the fuzzing event engine for time mocking, and to implement a test directory interface so we avoid having to make temporary directories and files in the tests. This is notably not in include, and the CreateDirectoryReloaderCrlProvider is the only way to construct one from the public API, so we don't expose the event engine and directory details to the user.

@gtcooke94 gtcooke94 enabled auto-merge (squash) November 3, 2023 20:46
@gtcooke94 gtcooke94 merged commit 0d4e1ef into grpc:master Nov 3, 2023
@copybara-service copybara-service bot added the imported Specifies if the PR has been imported to the internal repository label Nov 3, 2023
gtcooke94 added a commit to gtcooke94/grpc that referenced this pull request Nov 13, 2023
)

This adds the directory reloader implementation of the CrlProvider. This
will periodically reload CRL files in a directory per [gRFC
A69](grpc/proposal#382)

Included in this is the following:
* A public API to create the `DirectoryReloaderCrlProvider`
* A basic directory interface in gprpp and platform specific impls for
getting the list of files in a directory (unfortunately prior C++17,
there is no std::filesystem, so we have to have platform specific impls)
* The implementation of `DirectoryReloaderCrlProvider` takes an
event_engine and a directory interface. This allows us to test using the
fuzzing event engine for time mocking, and to implement a test directory
interface so we avoid having to make temporary directories and files in
the tests. This is notably not in `include`, and the
`CreateDirectoryReloaderCrlProvider` is the only way to construct one
from the public API, so we don't expose the event engine and directory
details to the user.

---------

Co-authored-by: gtcooke94 <gtcooke94@users.noreply.github.com>
gtcooke94 added a commit to gtcooke94/grpc that referenced this pull request Nov 13, 2023
)

This adds the directory reloader implementation of the CrlProvider. This
will periodically reload CRL files in a directory per [gRFC
A69](grpc/proposal#382)

Included in this is the following:
* A public API to create the `DirectoryReloaderCrlProvider`
* A basic directory interface in gprpp and platform specific impls for
getting the list of files in a directory (unfortunately prior C++17,
there is no std::filesystem, so we have to have platform specific impls)
* The implementation of `DirectoryReloaderCrlProvider` takes an
event_engine and a directory interface. This allows us to test using the
fuzzing event engine for time mocking, and to implement a test directory
interface so we avoid having to make temporary directories and files in
the tests. This is notably not in `include`, and the
`CreateDirectoryReloaderCrlProvider` is the only way to construct one
from the public API, so we don't expose the event engine and directory
details to the user.

---------

Co-authored-by: gtcooke94 <gtcooke94@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants