Commit Graph

53 Commits

Author SHA1 Message Date
Ryan Turner f7ffdea3b1 Remove separator argument from toSetOfSpiffeIds() examples
The ',' separator is not accepted as valid by the library. There is now
an override method which uses a default separator, so prefer that for
the examples, where the separator character is not particularly
relevant.

Signed-off-by: Ryan Turner <turner@uber.com>
2021-01-12 20:31:26 -08:00
Max Lambrecht aff23a7d79 Use google osdetector plugin instead of internal gradle class.
Upgrade gradle wrapper to 6.7.1

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-11-24 10:57:37 -03:00
Max Lambrecht dbd44a4db4 Minor improvements in READMEs and javadocs.
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-10-27 10:52:22 -03:00
Max Lambrecht 5a8d9d9056 Bump version to 0.6.2
Improve how the SpiffeTrustManager is configured to either validate SPIFFE IDs or acceptAny.
Validate the SslContextOptions.
Add visibility to some validation errors by logging warnings.
Improve log of the X509Source update.
Improve Spiffe Provider README.

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-08-25 13:08:52 -03:00
Max Lambrecht 09149487a0 Tasks for signing and publishing artifacts to maven repository.
Add to README instruction to add the maven and gradle dependencies.
Minor additions to gradle build configs.

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-08-04 14:39:35 -03:00
Max Lambrecht e9df15e44b Refactoring to improve testability.
Add X509Source interface.
Add tests to cover provider module.

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-07-16 15:08:09 -03:00
Max Lambrecht f663e75a27 Amendments in javadocs.
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-07-08 15:33:50 -03:00
Max Lambrecht e994ede993 Add MacOS support.
Amendments in javadocs.
Other minor changes.

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-07-04 09:57:49 -03:00
Max Lambrecht 7b61cb8c47 Addressing PR comments:
- refactors to replace strings by enums
- improve code readability
- add and clarify documentation
- improve and fix logic in spiffe id parsing
- rename classes

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-06-30 14:19:07 -03:00
Max Lambrecht 167efbac89 Fixing typos
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-06-29 13:41:08 -03:00
Max Lambrecht 9b428d316d Addressing code style issues in module java-spiffe-provider.
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-06-26 16:04:57 -03:00
Max Lambrecht 3e81bee7ff Fixing checkstyle issues.
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-06-26 13:23:53 -03:00
Max Lambrecht 86c724e587 Fixing links in README.
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-06-24 15:40:52 -03:00
Max Lambrecht 81584a90fb Refactoring and completing javadocs.
Rename property to improve clarity.

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-06-24 15:14:16 -03:00
Max Lambrecht 7d11db4944 Addressing PR comments:
- refactor methods for creating JwtSource and X509Source instances
- completing and clarifying javadocs

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-06-24 14:09:19 -03:00
Max Lambrecht 48aa4e6308 Removing SpiffeId and TrustDomain limit validations.
Improving javadocs.
Removing unused code.

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-06-23 15:00:59 -03:00
Max Lambrecht 5221f838eb Amendments in javadocs and README.
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-06-23 11:28:51 -03:00
Max Lambrecht ca5511eb91 Addressing PR comments:
- refactor acceptedSpiffeIds from List to Set
- refactor tests
- renaming methods to improve clarity
- amendments in javadocs

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-06-23 11:26:00 -03:00
Max Lambrecht c92c90e7ea Addressing PR comments:
- replace private key format and algorithm guessing by parameters
- refactor a few ifs to switch case
- add spiffeid and trust domain validations and tests
- remove all imports wildcards
- other minor changes to improve quality

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-06-22 16:08:17 -03:00
Max Lambrecht 538be3fa09 Minor typo fix.
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-06-19 17:34:15 -03:00
Max Lambrecht fbbf17d0a3 Minor typo and grammar fixes.
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-06-19 15:14:30 -03:00
Max Lambrecht 57076ef4f5 java-spiffe-provider: Code style improvements.
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-06-19 14:32:32 -03:00
Max Lambrecht db57253657 Add javadoc and source jars generation. Fixing errors and warnings.
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-06-18 11:03:06 -03:00
Max Lambrecht 2153452545 Rename root package to 'io.spiffe'.
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-06-18 10:18:08 -03:00
Max Lambrecht 0e7413ad09 Adding and improving javadocs in the java-spiffe-provider module.
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-06-15 13:28:42 -03:00
Max Lambrecht 2f7c83452a Fix error in TrustManager validation.
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-06-13 12:52:21 -03:00
Max Lambrecht 874c7a5a88 Adding configuration for accepting any SPIFFE ID.
Amend X509 wordings.
Adding documentation in README.
Improvements.

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-06-12 15:59:08 -03:00
Max Lambrecht 46d6fc0ade Fix code issues.
Improve README.

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-06-12 08:06:07 -03:00
Max Lambrecht af2ee3d27b Move modules versions to a single parent version to simplify versioning.
Add gradle task to copy generated jars artifacts to a common folder.
Add travis config to deploy the jars.

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-06-10 14:43:13 -03:00
Max Lambrecht 91eb49bd8e Update grpc, netty and jwt-jose dependencies
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-06-09 14:01:07 -03:00
Max Lambrecht cccc243829 Set core dependency as api
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-06-09 13:51:45 -03:00
Max Lambrecht bee7627afa Minor: fixing gradle warnings
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-06-09 09:04:55 -03:00
Max Lambrecht ea0d363c68 Refactor BundleSource interfaces to have a single parameterized interface for both X509 and JWT bundles.
Minor code improvements.

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-06-08 14:56:51 -03:00
Max Lambrecht d68c17caaa Moving class to avoid circular references.
Rename type parameters.
Improve readability.

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-06-08 14:37:02 -03:00
Max Lambrecht cf761c5bdf Java Spiffe Helper implementation
Refactors
Tests
README improvements

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-06-04 10:19:19 -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 3ef62e0812 Adding and refactoring tests
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-05-17 09:42:19 -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 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 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 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 Lambrecht 96b27c8277 Amending names and comments
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
2020-04-27 06:47:28 -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 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