106 Commits

Author SHA1 Message Date
Dave Syer
0b66476d0f DOS line endings 2016-02-16 10:42:31 +00:00
Dave Syer
2ad012b6c2 Backport synchronized access to SVN repository
Fixes gh-335
2016-02-16 10:41:14 +00:00
Dave Syer
d720b7bdb3 Revert to snapshots 2016-01-25 15:51:47 +00:00
Dave Syer
909e113198 Update to 1.0.4 2016-01-25 15:51:28 +00:00
Dave Syer
834808d7ec Allow ciphers in overrides via escape of '{' 2015-12-18 10:14:45 +00:00
Steve West
a0e8338c38 Fix bug where prefix keys (e.g. {name: value}) are not stripped
Also removing extraneous post-decrypt stripPrefix which was masking the encrypt bug.

Fixes gh-272
2015-12-01 18:02:00 +00:00
Spencer Gibb
d202f53c69 Bumped to 1.0.4.BUILD-SNAPSHOT 2015-11-16 10:05:06 -07:00
Dave Syer
7b0fb5df5e Make timeout configurable
Fixes gh-225
2015-09-04 09:48:28 +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
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
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
Dave Syer
ae343454a4 Add getters and setter for native profile repository 2015-03-19 17:22:16 +00:00
Dave Syer
24904a4d6d Add annotation processor 2015-03-19 14:26:41 +00:00
Dave Syer
02b13a41b2 Moved non-config client related code into commons
Refresh, Bootstrap and encryption features all moved into commons

See gh-104
2015-03-18 15:41:20 +00:00
Spencer Gibb
9d6dcac60b remove unused annotations 2015-03-17 10:36:18 -06:00
Dave Syer
83ef3e4b74 Disable config server client by default in config server
This change adds a listener that inserts a PropertySource really early
so that spring.cloud.config.enabled=false is the default in a config
server. It can be overridden if the user primes the Environment with
spring.cloud.config.enabled=true.

See gh-104
2015-03-17 15:14:32 +00:00
Dave Syer
ee4717bbab Allow patterns in repository search paths
User can now specify spring.cloud.config.server.git.searchPaths as
a list of patterns (instead of a list of subdirectory names).

See gh-97
2015-03-16 11:01:21 +00:00
Dave Syer
4ae639c351 Extra docs for embeddable config server
Fixes gh-100
2015-03-11 10:32:02 +00:00
Dave Syer
f0c77a594e Make svnkit optional
See gh-99
2015-03-11 10:31:29 +00:00
Dave Syer
d4553f6a57 Update to next snapshot 2015-03-03 14:56:26 +00:00
Dave Syer
5fc2b1af66 Fix @RequestMapping so that git label can contain periods
Spring MVC lops off the "extension" from request paths by default
(causing no end of other problems), but in this case making it
impossible, or unintuitive at best, to use version-like labels
in git repositories (e.g. 1.0.0). This change makes the mapping
a regex match which includes the whole path, not just the stem.

Fixes gh-94
2015-03-02 09:03:59 +00:00
Dave Syer
80cc7f9800 source->environment 2015-02-27 15:52:45 +00:00
Dave Syer
9a8e8e7627 Back to configure->config
The connectors project doesn't use any of the subpackages we do
here so if we movethe Environment and PropertySource into a sub-
package it should be safe.

See gh-91
2015-02-27 15:33:43 +00:00
Dave Syer
0c794adf5c Fix concurrent map modification error 2015-02-27 10:27:50 +00:00