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>
When a binding is provided as a mounted ConfigMap/Secret pair (containing
metadata and secret values respectively) the files within the metadata and
secret directories will be symlinks to files in a colocated hidden directory
that contains the content. In order to handle bindings presented in this
format a Binding object will ignore hidden files and directories when it is
contructed using a path. This prevents errors that previously occured
when the Binding assumed all metadata and secret entries were regular files, and
attempted to read the content of those directories directly.
Resolves#40
Signed-off-by: Emily Casey <ecasey@pivotal.io>
When a binding is provided as a mounted ConfigMap/Secret pair (containing
metadata and secret values respectively) the files within the metadata and
secret directories will be symlinks to files in a colocated hidden directory
that contains the content. In order to handle bindings presented in this
format a Binding object will ignore hidden files and directories when it is
contructed using a path. This prevents errors that previously occured
when the Binding assumed all metadata and secret entries were regular files, and
attempted to read the content of those directories directly.
Resolves#40
Signed-off-by: Emily Casey <ecasey@pivotal.io>
Adds r2dbc properties for mysql, postgres, sqlserver, oracle, and db2
bindings. This allow bindings to be used with reactive drivers.
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 the logging put out by the library happened synchronously with the
code executing. Because this library typically runs so early in the Spring
Boot lifecycle that logging isn't yet configured, it needs to defer that
logging until later.
This change converts the library to use Boot's DeferredLogger and listen for
an ApplicationPrepared event before logging out its messages.
Signed-off-by: Ben Hale <bhale@vmware.com>
Previously the PutIfPresent API was a clunky way of only setting a property in
the PropertySource if the corresponding entry from the binding existed. It
was pointed out in #31 that there are better APIs for doing this same thing.
Unfortunately the suggestion in that issue wasn't suitable (it was built for
beans not maps), but it did inspire a better API that was suited to maps.
This change implements that new API.
Signed-off-by: Ben Hale <bhale@vmware.com>
Previously all of the guard behavior was triggered by the contents of
environment variables. In a Spring Boot application, looking at the
environment isn't the only way to get configuration. This change updates the
guards to use the Environment for configuration retrieval.
[resolves#30]
Signed-off-by: Ben Hale <bhale@vmware.com>
This was missed during the implementation. The broader integration test that
should have caught this will come in #33.
[resolves#32]
Signed-off-by: Ben Hale <bhale@vmware.com>