Commit Graph

110 Commits

Author SHA1 Message Date
Max Lambrecht ef2cdafab9 Adding utility methods for generating x509 certificates for testing purposes.
Adding jacoco test coverage report plugin.
Adding and improving tests for X509SvidValidator and CertificateUtils.

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-22 09:31:32 -03:00
Max Lambrecht ef4dbf86c5 Adding tests for BackoffPolicy and RetryHandler.
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-20 15:14:19 -03:00
Max Lambrecht 0853442026 Adding tests.
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-20 14:09:30 -03:00
Max Lambrecht 87c8aadeba Refactoring Algorithm and Family as enums.
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-20 13:51:10 -03:00
Max Lambrecht 21514c7a16 Renaming Algorithm class
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-20 13:23:39 -03:00
Max Lambrecht e160708d4e Refactoring JWT SVID and bundle.
Replace JWT library using nimbus for both JWT and JOSE bundles.
Refactoring tests
Adding tests for improving coverage.

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-20 13:17:19 -03:00
Max Lambrecht 8c5384ee3b Implementing JWT bundle and bundle set.
Refactors to X509 bundle and set.
Adding tests.
Adding library for processing JOSE JWK bundles.

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-19 13:07:07 -03:00
Max Lambrecht a203cf450f Avoid warning Unknown channel option 'SO_KEEPALIVE' on Mac
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-18 13:58:33 -03:00
Max Lambrecht a58aa9925b Avoid warning Unknown channel option 'SO_KEEPALIVE'
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-18 12:51:02 -03:00
Max Lambrecht 11d00e191c Adding tests to improve coverage for X509Svid, X509SvidValidator, X509BundleSet, SpiffeId, JwtSvid.
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-18 12:11:47 -03:00
Max Lambrecht fa50d55dd0 Change exception thrown by validation method and adding tests
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-18 09:00:54 -03:00
Max Lambrecht ec681cbf99 Add defensive copy to prevent vulnerability
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-17 09:54:43 -03:00
Max Lambrecht 3ef62e0812 Adding and refactoring tests
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-17 09:42:19 -03:00
Max Lambrecht 5abd112c58 X509 SVID: adding validations and tests
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-16 14:10:33 -03:00
Max Lambrecht 8d9bbc065a JWT SVID implementation
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-16 07:52:32 -03:00
Max Lambrecht 12329d924d Adding method to TrustDomain and test
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-13 11:08:25 -03:00
Max Lambrecht 588da2cd55 Adding documentation
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-08 09:44:53 -03:00
Max Lambrecht 6565ea1029 Minor change
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-08 08:02:08 -03:00
Max Lambrecht 19bf9730b7 Remove unnecessary method
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-08 07:58:38 -03:00
Max Lambrecht f8a176dc20 Change method name to improve clarity.
Fix build warning.

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-08 07:36:03 -03:00
Max Lambrecht 9867c032cf Move examples to a folder in tests.
Add details to README.
Make constants public.

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-07 09:03:42 -03:00
Max Lambrecht 4e35b003fc Update workload.proto.
Validate that the X.509 context has both the svid and the bundles in the X509 context watcher.

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-06 15:56:57 -03:00
Max Lambrecht 8de0b766ab Adding extra method to create X509 source, improving some javadoc comments.
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-06 15:36:12 -03:00
Max Lambrecht 29daad1c5b Adding timeout to X509Source new method.
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-06 11:16:20 -03:00
Max Lambrecht 8027b39298 Minor change: making field final
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-04 08:59:48 -03:00
Max 89380590b8 Configure workload api client and netty channel with the ExecutorService and shutdown the underlying channel properly.
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-04 08:56:58 -03:00
Max Lambrecht b0bac0c29a Setting the defaults for the BackoffPolicy in the builder constructor
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-01 08:44:46 -03:00
Max Lambrecht 30c0ddb5e2 Minor fix in method signature
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-01 06:52:42 -03:00
Max Lambrecht 0c4801cf49 Remove double synchronization that is no longer recommended, add synchronized to method instead
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-01 05:32:04 -03:00
Max Lambrecht c7212b9c76 Make constructor private in X509SourceManager
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-04-30 13:17:34 -03:00
Max 7d12743fb5 Adding backoff retry to watchX509Context.
Changing X509ContextException and X509ContextException to make them checked.
Address multiple PR comments.
Adding tests to Address and TrustDomain.

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-04-30 09:33:46 -03:00
Max 8e64bb63a0 Improve methods to avoid unnecessary extra get operation
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-04-28 12:26:08 -03:00
Max Lambrecht 96b27c8277 Amending names and comments
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-04-27 06:47:28 -03:00
Max Lambrecht 571dd3c5d4 Minor change in logging
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-04-27 06:32:33 -03:00
Max Lambrecht c26f0339a6 Delete unused classes
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-04-27 06:18:03 -03:00
Max Lambrecht bf6053c18c Process federated bundles from X509Context update
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-04-26 16:31:04 -03:00
Max Lambrecht ecabc0f288 Minor fixes
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-04-26 15:16:11 -03:00
Max Lambrecht 44cda6e809 Refactor error handling: use Exceptions instead of Result wrapper type
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-04-26 13:58:21 -03:00
Max Lambrecht 8e06cb12d7 Refactor: changing name jwtKeys and x509Roots by jwtAuthorities and x509Authorities
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-04-23 11:42:18 -03:00
Max Lambrecht 928b075661 Moving and cleaning dependencies
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-04-23 07:39:55 -03:00
Max Lambrecht 91f06d83bc Adding more info in readme and completing an example
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-04-22 11:54:14 -03:00
Max Lambrecht 219a2e2e71 Refactoring SSL Context factory. Refactoring WorkloadAPIClient and X509Source
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-04-22 10:01:55 -03:00
Max Lambrecht 2cccc1c988 Refactoring Results in multiple methods. Refactoring the X509Source config.
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-04-21 13:01:26 -03:00
Max Lambrecht 15978d8313 Add comments to provide more details about the X509Source
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-04-20 12:14:35 -03:00
Max Lambrecht 07169bf411 Add Exception to error result
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-04-20 11:49:45 -03:00
Max Lambrecht 5eb49938ba Make FetchJwtSvid return a Result
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-04-20 11:26:50 -03:00
Max Lambrecht 3e05e37b10 Changing return value from Optional to Result. Other refactors. Improving comments.
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-04-20 10:56:36 -03:00
Max Lambrecht 43f9d79e8c [WIP]-Define v2 interface, refactor in modules
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-04-10 14:21:27 -03:00
Max 8c3866ee85
Merge pull request #21 from transferwise/log-throwable-listener-on-error
Log throwable when StreamObserver#onError is triggered
2019-11-26 13:20:59 -05:00
Levani Kokhreidze 29445c1c71 Log throwable when StreamObserver#onError is triggered
Signed-off-by: Levani Kokhreidze <levani.codes@gmail.com>
2019-11-02 19:21:19 +02:00