- read `ca.crt`, `tls.crt` and `tls.key` optional properties in eureka bindings
- process them into keystore and truststore, and wire up eureka client/instance properties
- place the trust-store and keystore in the `$TMPDIR` and reference them by absolute path.
- add a `pem` package for parsing and converting PEM encoded RSA keys
and certificates. (This package may eventually be replaced by the PEM
package in spring-boot, but not until 3.1 is the minimum supported
boot version. The package here is copied from spring-boot but
simplified and made Java 8 compatible.)
Co-authored-by: Dave Walter <walterda@vmware.com>
Co-authored-by: Andrew Wittrock <awittrock@vmware.com>
Co-authored-by: Matt Royal <mroyal@vmware.com>
Co-authored-by: Paul Aly <maly7; paly@vmware.com>
If allowing the mapping to generate a JDBC/R2DBC URL then all three of the fields are required, the host, port and database. If even one is not set, the information will not be mapped and the default value for the property will be used.
Reference: #74
Signed-off-by: Daniel Mikusa <dmikusa@vmware.com>
* Adding logic to flex the MySQL jdbc and r2dbc connection sting based on classpath
This PR is related to issue #72.
Co-authored-by: gm2552 <meyerg@vmware.com>
* add support for authorization-grant-types key for oauth2 bindings
* Introduce MapMapper.Source#when(Predicate<Object>)
* update readme with oauth2 -> authorization-grant-type(s)
Previously Spring Cloud Bindings always composed spring.datasource.url from the host port and database properties. This is limiting in that it does not provide a mechanism for users to specify jdbc properties (e.g. sslMode). The PR retains the original behavior but also respects jdbc-url and r2dbc-url keys in all RDBS bindings. The explicit jdbc-url and r2dbc-url keys take precedence over the composed value.
Signed-off-by: Emily Casey <ecasey@vmware.com>
This changes makes a bunch documentation improvements, case normalizations,
and general improvements left over from the previous addition of the
Kubernetes Service Binding support.
Signed-off-by: Ben Hale <bhale@vmware.com>
When key names are potentially ambiguous (does this server-id refer to the vault server?) prefer longer more explicit key names. When there is no ambiguity stick with the existing shorter names.
Signed-off-by: Emily Casey <ecasey@vmware.com>
Autoconfigures spring.security.oauth2.* application properties. The name of the binding will become the name of the client. The name of the provider will be taken from metadata/provider.
Resolves#35
Signed-off-by: Emily Casey <ecasey@pivotal.io>
Previously, the implementations of the EnvironmentPostProcessors added
ApplicationEventListener to their interface as well. These implementations
tested fine, but of course since there was no full integration test to ensure
that they were registered I forgot to add them to spring.factories.
This change adds their declarations as ApplicationEventListeners to the
spring.factories file and ensures that the logs are replayed when the
application is finished preparing.
Signed-off-by: Ben Hale <bhale@vmware.com>
Previously, whenever the library was included on a classpath it would attempt
to auto-configure Spring Boot. Since part of the API can be used as a
straight library, and in that usage, auto-configuration would not be
desirable, the auto-configuration needed a global off switch. This change
adds a global guard, disabled by default, in the
org.springframework.cloud.bindings.boot.enable System Property.
[resolves#25]
Signed-off-by: Ben Hale <bhale@vmware.com>
Previously, auto-configuration of all kinds of bindings were either enabled or
disabled en-mass. This level of granularity wasn't really appropriate in
practice as it many use-cases could be served with some bindings but not
others. This change updates each auto-configuration to watch for a particular
key to be disabled.
[resolves#29]
Signed-off-by: Ben Hale <bhale@vmware.com>
This change adds a README file containing information about using the project
and the properties that are set automatically.
[resolves#2]
Signed-off-by: Ben Hale <bhale@vmware.com>