Commit Graph

16 Commits

Author SHA1 Message Date
Easwar Swaminathan 48b7581b56
security/advancedtls: remove Go1.19 build constraints (#7404) 2024-07-10 15:38:24 -07:00
Gregory Cooke dbd24a9e81
[advancedTLS] Removed deprecated APIs in advancedTLS (#7303)
* remove deprecated APIs from advancedTLS
2024-06-06 14:33:42 -04:00
Arvind Bright 32f60917be
*: update deps (#7282) 2024-05-31 13:36:20 -07:00
Gregory Cooke 4879d51a59
advancedTLS: Swap to DenyUndetermined from AllowUndetermined in revocation settings (#7179)
* swap to `DenyUndetermined` from `AllowUndetermined`
2024-05-06 13:40:28 -04:00
Gregory Cooke b433b9467d
advancedtls: Rename RevocationConfig (#7151) 2024-04-30 11:00:35 -07:00
Arvind Bright cb9c22d501
vet: run staticcheck for all sub modules (#7155) 2024-04-23 11:47:30 -07:00
Gregory Cooke fc8da03081
advancedtls: unexport parts of API not meant to be public (#7118) 2024-04-17 08:32:56 -07:00
erm-g 408139acc3
security/advancedtls: CRL checks improvement (#6968) 2024-02-14 15:33:38 -08:00
erm-g b82468a346
crl provider: Static and FileWatcher provider implementations (#6670)
* rename certificateListExt to CRL

* CRLProvider file

* Add CRLProvider to RevocationConfig

* Beginning refactor of CRL handling

* Shell of StaticCRLProvider

* basic static crl provider test

* use loadCRL helper

* refactor of CRL loading

* Table tests

* Table tests

* Add tests with Static CRL provider

* New certs to be used for CRL tests. Added test for passing and failing connections based on CRL check outcomes

* Main functionality of File Watcher (Directory) CRL provider

* Refactor async go routine, validate() func, add unit tests

* Custom error callback, related unit tests

* Error callback test improvement

* Comments for StaticCRLProvider

* Comments for public API

* go mod tidy

* Comments for tests

* Fix vet errors

* Change Static provider behavior to match C Core, address other PR comments

* Data race fix

* Test helper fn change

* Address PR comments

* Address PR comments (part 2)

* Migration from context to channel for controlling crl reloading goroutine

* Align in-memory CRL updates during directory scan to C++ behavior

* Improve comments for ScanCRLDirectory

* Base test case for Scan CRL Directory file manipulations

* full set of cases for CRL directory content manipulation

* Add comment for table test structure

* Fix for go.mod and go.sum

* Empty directoru workaround

* Delete deprecated crl functionality

* Restoring deprecated crl files

* Fit to grpctest.Tester pattern

* Update readme for crl provider tests

* Address PR comments

* Revert "Restoring deprecated crl files"

This reverts commit 56437603a4.

* Revert "Resolve conflicts with upstream - deletion of deprecated crl"

This reverts commit e0130640c46efd9a43649bf409c6e762ae66e225, reversing
changes made to 21f430135c.

Revert deletion

* Update link for gRFC proposal

* Address PR comments

* Address PR comments part 1

* Address PR comments part 2

* Address PR comments part 3

* Fix for go.mod and go.sum

* Fix comment typo

* Fix for gRFC tag

* Add more details to CRL api  godoc comments.

* Address PR comments

* Address PR comments

* Delete crl_deprecated.go and crl_deprecated_test.go

* Delete testdate/crl/provider/filewatcher directory and .gitignore under it

* Race test fix

* Address PR comments

* Address PR comments

* Refactor directory reloader test from checking size of crl map to querying individual entries approach

* Add extra case for RefreshDuration config test

* Update cpmment for table test structure

* Unexport scan scanCRLDirectory, drop related mutex, update the comments

* Update API comments, clear tmp dir after the tests

---------

Co-authored-by: Gregory Cooke <gregorycooke@google.com>
2023-10-30 20:41:22 -04:00
Doug Fawley fbff2abb0f
*: update `interface{}` to `any` and `go.mod` version to `go 1.19` (#6544) 2023-08-14 09:04:46 -07:00
Gregory Cooke 1d20f1b500
security/advancedtls: swap from deprecated pkix.CertificateList to x509.RevocationList (#6054)
Swap from deprecated pkix.CertificateList to x509.RevocationList

pkix.CertificateList is deprecated.
We have an internal wrapper around this for representing CRLs. This PR updates that wrapper to use the preferred x509.RevocationList.

This also replaces x509.ParseCRL (deprecated) with x509.ParseRevocationList. The former supported PEM input, while the latter requires DER, so I added a utility function parseRevocationList that does the PEM -> DER conversion if needed, taken from the x509.ParseCRL implementation.

The one issue here is that x509.RevocationList was introduced in golang 1.19. We are still supporting 1.18. To solve this, I've put build restrictions on crl.go and crl_test.go to only build on 1.19+. Also, I also added the files crl_deprecated.go and crl_deprecated_test.go, which are identical copies to the crl.go and crl_test.go files before this PR. They have the build restriction of <go1.19, so they will be used in the 1.18 build. This change is luckily very isolated and these are the only 2 files that needed the build restrictions.
2023-03-23 13:34:01 -04:00
Theodore Salvo f2fbb0e07e
Deprecate use of `ioutil` package (#5906)
Resolves https://github.com/grpc/grpc-go/issues/5897
2023-01-03 11:20:20 -08:00
Gregory Cooke 617d6c8a6c
security/advancedtls: add test for crl cache expiration behavior (#5749)
* Add test for cache reloading

* cleanup

* swap to using nil for no revoked certs

* Add description for new test
2022-12-01 14:09:57 -05:00
ZhenLian e63e1230fd
advancedtls: remove the usage of CDP in CRL enforcement (#5218) 2022-03-25 09:58:06 -07:00
Roland Bracewell Shoemaker 231ca3b24e
security/advancedtls: fix CRL issuer comparison (#5130)
Fix CRL issuer comparison issue
2022-01-25 13:32:27 -08:00
Matt Jones ce7bdf50ab
advancedtls: CRL checking for golang gRPC (#4489)
* Code for CRL checking for golang gRPC.
2021-07-15 09:53:31 -07:00