Commit Graph

119 Commits

Author SHA1 Message Date
Dave Syer
4310cc2017 Fix test 2015-09-30 17:53:30 +01:00
Dave Syer
62846bda84 Add ResourceController for serving plain text config files
Can be adapted to serve content in any format (e.g. nginx config file,
XML configuration for logger, etc.) - basically anything that can be
stored in plain text and doesn't require streaming.

Fixes gh-147, see also gh-198
2015-09-30 15:00:37 +01:00
Dave Syer
02a9eb3cd7 Refactor base classes for EnvironmentRepository implementations
Allows us to re-use the Scm features independent of the repository
abstraction.
2015-09-29 17:08:04 +01:00
Dave Syer
25dfa37612 Add support for matching profiles as well as applications
Patterns in the form {application}/{profile} are now supported with
the old behaviour being the default (all profiles matched if none
are specified).

Fixes gh-214
2015-09-25 10:37:34 +01:00
Dave Syer
da2b20c8be Fix test broken by change in commons 2015-09-25 09:43:20 +01:00
Dave Syer
63e90d7d27 Remove extra call to git fetch
A pull is going to happen anyway, so it's probably just
unnecessary overhead.

Fixes gh-227
2015-09-25 09:26:49 +01:00
Dave Syer
8d8e07a78e Push events for config changes
Works from local repos or with explicit POST to /monitor with
path=<serviceId>, also supports webhooks from github and gitlab.
2015-09-22 17:33:42 +01:00
Spencer Gibb
dc5097b188 polish 2015-09-18 08:22:42 -06:00
Dave Syer
f5017cdbad Revert to snapshot 2015-09-08 10:21:35 +01:00
Dave Syer
aca20566be Update for M1 release 2015-09-08 10:12:42 +01:00
Dave Syer
33f5cfcdef Line ending changes after gh-221 2015-09-05 10:02:58 +01:00
Dave Syer
14be630f62 Add javadocs for cloneOnStart 2015-09-04 09:52:42 +01:00
Dave Syer
950386dddf Merge branch '1.0.x' 2015-09-04 09:49:02 +01:00
Dave Syer
7b0fb5df5e Make timeout configurable
Fixes gh-225
2015-09-04 09:48:28 +01:00
Dave Syer
acbf3c1166 Adapt NativeEnvironmentRepository to changes in Spring Boot 1.3
The ConfigFileApplicationListener was refactored into a new callback
specifically for messing with the Environment before refresh.
2015-08-18 09:13:30 +01:00
Stephen Oakey
c17d782ec8 Made all RequestMappings GET method only
Request methods for all calls should be GET only.
2015-08-12 10:34:58 -06:00
Dave Syer
922ad890ce Clarify role of ConfigServerBootstrapApplicationListener in javadoc 2015-07-28 13:20:12 +01:00
Spencer Gibb
93bc26fad9 polish 2015-07-27 14:51:08 -06:00
Dave Syer
dd52e58367 Merge branch '1.0.x' 2015-07-16 09:28:52 +01:00
Dave Syer
ec94a579f4 Synchronize access to code that deletes basedir on startup
When the first request comes in there is a potential race while the
basedir is prepared (if another request comes in at that crucial
time they collide). This change just synchronizes the method where
the basedir is prepared (it's a once only operation).

Fixes gh-187
2015-07-16 09:25:58 +01:00
Dave Syer
5071798c19 Merge branch '1.0.x' 2015-07-13 11:54:22 +01:00
Dave Syer
ca0c5ecf1b Add spring.cloud.config.server.git.timeout (default infinite)
Sets the undlerlying timeout for the HTTP/SSH connection if
applicable in JGit.

See gh-141
2015-07-13 11:53:44 +01:00
Dave Syer
7828a0ee5a Fix possible concurrent modification error in EnvironmentController
Fixes gh-180
2015-07-10 12:02:12 +01:00
Dave Syer
3e46e64e87 Update to Brixton 2015-06-26 12:57:05 +01:00
Dave Syer
1a0e6689dc Prepare master for next snapshot 2015-06-26 10:57:18 +01:00
Dave Syer
ce494fb053 Bump spring-security-rsa 2015-06-24 17:21:33 +01:00
Dave Syer
0834917275 Support for git labels with slashes ("/")
Spring MVC can't match a pattern with a slash in it so we support
a special character sequence "(_)" which is legal in a URL
but hopefully rare in a git label.

Fixes gh-154
2015-06-24 14:19:13 +01:00
Dave Syer
22f241e342 Add spring.cloud.config.server.encrypt.enabled flag
So server can delegate decryption to the clients.

Fixes gh-162
2015-06-23 13:53:29 +01:00
Dave Syer
772fa118f3 Split up basedir.mkdirs() for Windows users
Fixes gh-173
2015-06-23 13:39:03 +01:00
Dave Syer
1504d6cb0c Provide options for key rotation and per-app cryptography
Cipher text (and plain text in the /encrypt endpoint) can now
carry a prefix of {name:value} pairs, all of which are passed
into the TextEncryptorLocator (instead of just the app name
and profiles).

The inputs are prepared symmetrically by the EncryptionController
(if used) and the EnvironmentEncryptor (used in the EnvironmentController).

Tidy up docs and add notes on keys.
2015-06-12 10:15:09 +01:00
Alex Corvino
fdf6689e90 Add option to clone repositories on start
On startup the server will clone all git repositories if the property
"spring.cloud.config.server.git.cloneOnStart" is set to true. If the
property is not set or is set to false then the server will behave
as it does currently.

Fixes gh-149
2015-06-10 09:33:47 +01:00
wojtkiewicz
14726f4964 added few missing tests for new endpoints in EncryptionController 2015-06-08 06:56:04 +01:00
Dave Syer
2a0f73740a Make text encryptor configuration an autoconfig
So that it can be controlled with @ConditionalOnBean etc.
2015-05-26 16:54:57 +01:00
wojtkiewicz
7437cdef49 Introduce TextEncryptorLocator abstraction
Allows more customization of encryption and decryption stack. Should
be no change for existing users.

Fixes gh-124
2015-05-26 15:26:04 +01:00
Dave Syer
891e928890 Extend NoSuchLabelException to SVN repository
See gh-153
2015-05-19 11:58:53 +01:00
Dave Syer
c685931308 Send 404 if Git label not found
See gh-153
2015-05-19 11:49:41 +01:00
Dave Syer
e94b4039a6 Strip "document" prefix from YAML by default
It's pretty uncommon for Spring apps, but sometimes YAML is not a
map, but more naturally a String or Collection. In these cases Spring
puts a "document" prefix in the Map it creates, so we can strip that
off if the user prefers it.

Fixes gh-143
2015-05-19 10:53:51 +01:00
Mikel Armañanzas
641d5b40e8 Fixing problem in windows loading files
Fixes gh-133, fixes gh-136, fixes gh-135
2015-05-06 06:47:24 -04:00
Spencer Gibb
242baae663 add a configurable health indicator for the Config Server
fixes gh-142
2015-05-04 13:32:51 -06:00
Dave Syer
98b64aa4cb If URI has no context path add one ("/")
Fixes gh-131
2015-04-29 11:38:00 +02:00
Dave Syer
5d1af78f91 Update to 1.0.2 snapshots 2015-04-23 11:11:21 +01:00
Dave Syer
5440d1d157 Add synchronized keyword to protect repository access
Fixes gh-128
2015-04-17 11:48:16 +01:00
Dave Syer
280a7a2c09 Allow environment overrides to be escaped for placeholders
E.g. spring.cloud.config.server.overrides.foo=$\{bar} will evaluate
to foo=${bar} in the client's Environment (allowing local replacement
of the placeholder instead of on the configserver).
2015-04-03 10:32:41 +01:00
Dave Syer
0f3233bad1 Add logging to EncryptionController
Fixes gh-115
2015-03-26 10:19:20 +00:00
Roy Clarkson
a15aed0b78 Use 'trunk' as default label for Subversion repositories
This commit adds a getDefaultLabel() method to the EnvironmentRepository
interface. SvnKitEnvironmentRepository returns 'trunk', while all other
implementations return 'master'. ConfigServerMvcConfiguration and
ConfigServerBootstrapConfiguration will utilize labels configured on
the client and server before falling back to the repository's default
label.

Resolves #107
2015-03-24 14:36:52 -05:00
Dave Syer
93543644a2 Nested JSON format instead of flat properties
Since JSON is a subset of YAML it makes more sense to keep the
same format (i.e. nested objects instead of the flattened
property names).

See gh-112
2015-03-24 13:50:36 +00:00
Chris Manning
57bcd734d1 Adding endpoint for .json similar to .yml, .yaml, and .properties
Fixes gh-113, fixes gh-112
2015-03-24 13:25:19 +00:00
Dave Syer
b1ba8df066 Fix native profile so it behaves as described in docs
The SCM repositories have a "clean()" method to strip out the server's
own configuration files from the property sources shipped to remote
clients. The "native" one didn't have that method so this change adds
it with a similar implementation to the SCM case, except slightly
more complicated because of the extra search locations added by the
"label" parameter.

Also changes the name SpringApplicationEnvironmentRepository to
NativeEnvironmentRepository to match the profile and the config properties.

Fixes gh-109
2015-03-20 14:42:42 +00:00
Dave Syer
5a80ce9e3a Explicitly list profiles and label in Environment
Fixes gh-111
2015-03-20 13:13:52 +00:00
Dave Syer
ea138e8dbd Default label on client is null (so server can set priority)
Fixes gh-108
2015-03-20 07:59:49 +00:00