Commit Graph
100 Commits
Author SHA1 Message Date
Dave Syer 377bccf12a Update to latest cloud dependencies 2017-05-10 11:37:53 +01:00
Dave Syer 030a8e7111 Remove Lombok from hystrix stream 2017-05-10 11:09:15 +01:00
Dave Syer ced1f36d19 bump spring cloud build version 2017-05-05 17:16:18 +01:00
Dave Syer 69622e909b Fix typo in test method name 2017-04-27 10:29:59 +01:00
Dave Syer a99e23f9fc Update to Boot 1.5.0 2016-12-12 12:31:32 +00:00
Dave Syer 704a874e84 Add example of empty sensitive headers
Emphasises that it's a black list, and clarifies that you need to
set it to empty to get authorization and cookie headers.
2016-11-03 12:06:43 +00:00
Dave Syer 7f075d11ee Allow Cors requests through to backend by default
Instead of blocking them (which is the default behaviour of a
Spring MVC controller) Cors requests will flow through the Zuul
filters by default. Users can control it by grabbing the
ZuulHandlerMapping in a @PostConstruct and injecting some
CorsConfiguration via its setCorsConfigurations() method.
2016-10-25 14:33:53 +01:00
Dave Syer a38b7b71ac Append to X-Forwarded-* headers instead of replacing them
This fixes most of the issues people encounter when there are
multiple proxies in the request. The tricky thing is that there
is another header "Forwarded" that we don't recognize, but which
backends probably do, at least some of the time (since it is
from an actual RFC). The problem is that "Forwarded" does not
contain the ports, so Spring UriComponentsBuilder cannot use it
to rewrite links to a specific port. Since we do not support it
already, this change doesn't make things any worse, but the
corner case is there still.
2016-10-25 12:56:49 +01:00
Dave Syer 139ab95438 Make configuration imports deterministic 2016-10-25 12:20:31 +01:00
Dave Syer 71ac67f9f1 Suppress some warnings 2016-10-25 12:20:21 +01:00
Dave Syer 0e1b856fc5 Extract proxy header manipulation into method 2016-10-25 07:50:38 +01:00
Dave Syer e94c35d331 Exclude aws jars from eureka client by default
Saves about 5MB in the final executable jar, and it should be
optional for Spring Cloud users.
2016-10-13 10:03:19 +01:00
Dave Syer 5f96c415e3 Upgrade xstream to 1.4.9
Fixes XXE vulnerability in Eureka Server (external entity processing
on by default in older versions of the library).
2016-09-22 16:23:27 +01:00
Dave Syer bc4f5a3788 Ensure version is scraped from parent pom 2016-09-20 13:34:30 +01:00
Dave Syer f094ecfd88 Allow user to set system properties to control http client in zuul
The SimpleHostRoutingFilter now accepts normal -Dhttps.proxy= and
-Dhttps.port= settings (and other things that generally work with
java.net).

Fixes gh-510
2016-09-20 12:30:49 +01:00
Dave Syer 6310059531 Move unnecessary dependencies up a level 2016-09-19 12:02:34 +01:00
Dave Syer cb44cd2e33 Add additional test to look for null hosts in Zuul
Conflicts:
	spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/ribbon/RibbonClientConfigurationTests.java
2016-08-18 12:59:05 +01:00
Dave Syer 68cf346025 Change repo URLs to https 2016-08-17 17:33:02 +01:00
Dave Syer 7927372b75 Polish 2016-08-17 17:33:02 +01:00
Dave Syer 58cf528463 Remove extra (redundant) condition
A problem in Spring Boot means that the extra conditions are combined
with OR not AND, so it's a bug to have more than one until that
gets fixed (in an AnyNestedCondition).

See https://github.com/spring-projects/spring-boot/pull/6672
2016-08-17 14:04:45 +01:00
Dave Syer b9e2a1b21e Fix test so it actually works if there is a server on localhost:80 2016-08-17 09:19:33 +01:00
Dave Syer f76f294f7f Rename test to conform to usual pattern 2016-08-17 09:04:37 +01:00
Dave Syer 8cf581d496 Correct description of cloud foundry instance id
Fixes gh-1214
2016-07-27 11:37:47 +01:00
Dave Syer afb43c5883 Actually fix the feign client validation issue
We need to still assert that the FeignClient is valid (no name and
value specified together for instance). Added missing tests.
2016-07-21 10:36:18 +01:00
Dave Syer 85ef54a9a1 Fix Feign validation for Spring 4.2 and 4.3
There is a utility method in Spring that we can use to merge all
the aliases. That way 4.2 and 4.3 behave the same way.

Fixes gh-1192
2016-07-21 08:28:33 +01:00
Dave Syer 2f581a1181 Use JUnit assertions 2016-07-21 08:28:31 +01:00
Dave Syer 110f872779 Fix generic type signature (otherwise breaks with Spring 4.3) 2016-07-21 08:28:27 +01:00
Dave Syer c03ae0ab47 Update README with new CLA link 2016-07-11 14:35:10 +01:00
Dave Syer ff46a7dc50 Merge branch '1.1.x'
Conflicts:
	spring-cloud-netflix-dependencies/pom.xml
2016-06-17 15:10:51 +01:00
Dave Syer 9e479481cc Exempt @RequestParams of type Collection from feign expander
It isn't very helpful to have a Collection converted to a String
anyway. We need to implement something new in Feign to apply
the converter (expander) to individual elements in the collection
but this change should get back to the old behaviour with
List<String> at least.

Fixes gh-1115
2016-06-17 14:55:35 +01:00
Dave Syer 525c5852fb Add JAVA_OPTS to travis 2016-06-13 08:40:36 +01:00
Dave Syer 69501bd110 Merge 1.1.x 2016-06-13 08:05:07 +01:00
Dave Syer 95e086a543 Revert change to sources plugin 2016-06-13 07:58:13 +01:00
Dave Syer f6cd2d279d Update README 2016-06-11 10:50:32 +01:00
Dave Syer 9cab69a968 Update readme script to handle local includes 2016-06-11 09:54:41 +01:00
Dave Syer 6906c7ba55 Update to 1.1.3 snapshots 2016-06-10 17:05:29 +01:00
Dave Syer ad7e341b78 Clarify turnine config some more 2016-06-09 16:48:03 +01:00
Dave Syer 53a3076e1c Add docs on turbine.combineHostPort 2016-06-09 16:22:20 +01:00
Dave Syer 02d935dbaa Add @ConditionalOnEnabledEndpoint to archaius endpoint
Fixes gh-936
2016-06-09 11:22:47 +01:00
Dave Syer 4507d1d46d Add listener for HeartbeatEvent to refresh zuul routes
Fixes gh-1084
2016-06-09 11:22:47 +01:00
Dave Syer b6fa67c49f Use Servlet 3.0 Part instead of Spring MultipartFile
So that it can handle multi-part requests that do not have a
file name.

Fixes gh-1067
2016-06-06 14:32:43 +01:00
Dave Syer 1c7c96a245 Add local copies of hystrix images
Fixes gh-1076
2016-06-06 13:54:51 +01:00
Dave Syer 0da6f27aac Explicitly exclude form-body params that appear in query string
Fixes gh-1080
2016-06-06 13:43:18 +01:00
Dave Syer b5f8c73060 Update tp mvn 3.3.9 2016-06-04 09:14:45 +01:00
Dave Syer 4a1e637b83 Fix content type when missing from incoming request
If there is no content type incoming, then it should be
absent in the outgoing request (not "null").

Fixes gh-1037
2016-05-24 09:02:48 +01:00
Dave Syer a0c1b4c05d Align instanceId calculation with the one done on the client
The Angel client has an idiosyncratic way of calculating an instance
id, and the Brixton client aligned with that already, but the
Brixton server did not. This change should make Brixton Eureka
Servers work with Angel clients.

See gh-978
2016-05-18 17:32:26 +02:00
Dave Syer d5252375e1 Add back versions for deprecated *-amqp jars 2016-05-17 17:41:13 +01:00
Dave Syer 880efd1843 Remove @AliasFor from @FeignClient.serviceId()
The way it was being used internally means that we didn't need the
annotation anyway. It would be nice to have it back if the Spring
issue gets resolved, because then we could actually use it as
intended.

Fixes gh-1025
2016-05-17 15:33:42 +01:00
Dave Syer 9823d07817 Revert "Add support in SpringMvcContract for query string in Class @RequestMapping"
This reverts commit 2c502e3997.
2016-05-17 15:26:34 +01:00
Dave Syer 2b58487ad7 Fix typo Sream->Stream 2016-05-17 12:10:18 +01:00
Dave Syer 32d481df26 Be defensive about classpath in eureka auto config
Before this change we were seeing test failures in
spring-cloud-netflix-eureka-server (but only with Spring Boot 1.4)
caused by annotation processing explosion when
RefreshScopeAutoConfiguration is not on the classpath.
2016-05-16 12:46:03 +01:00
Dave Syer b084eb03ff Re-instate .settings.xml for Travis 2016-05-12 11:34:36 +01:00
Dave Syer 043a965db3 Update README and remove .settings.xml where appropriate 2016-05-12 10:47:36 +01:00
Dave Syer 5d50a773e7 Make test more robust by creating feign clients and validating them
This test should run with Spring Boot 1.4.0.M2 now.

See https://github.com/spring-projects/spring-boot/issues/5870
2016-05-11 10:22:57 +01:00
Dave Syer c399f1117b Revert to snapshots 2016-05-10 17:09:04 +01:00
Dave Syer d9327a02a2 Update for 1.1.0.RELEASE 2016-05-10 17:00:17 +01:00
Dave Syer 617ecf11ec Track customization of sensitive headers so route can be cleared
When the users explicitly sets the sensitive headers of a rroute to
empty, it means they should be empty, not the global defaults.

Fixes gh-1012
2016-05-09 11:47:41 +01:00
Dave Syer cbd398d7f6 Add explicit release disabled flag for artifactory for plugins 2016-05-06 18:09:41 +01:00
Dave Syer 12f3edd4ab Add explicit release disabled flag for artifactory in dependencies 2016-05-06 17:59:37 +01:00
Dave Syer e4f3428344 Add explicit release disabled flag for artifactory 2016-05-06 17:47:14 +01:00
Dave Syer c4e879ea96 Switch parent of docs poms 2016-05-06 17:40:09 +01:00
Dave Syer 83235b13c1 Update parent to 1.1.0.RELEASE 2016-05-06 17:13:33 +01:00
Dave Syer 5de52b96f4 Some changes to help with Spring Boot 1.4 compatibility
The jackson version needs to be explicit (not in parent potentially)
and there is a weirdness with @RequestMapping in Spring 4.3
2016-05-05 16:55:09 +01:00
Dave Syer 88864153eb Test for default ribbon client configuration 2016-05-04 08:50:57 +01:00
Dave Syer 9ad3d21b75 Tidy up more compiler warnings for generics 2016-05-03 11:53:22 +01:00
Dave Syer 1c9d11de23 Add note to clarify that zuul starter does not include discovery
Fixes gh-992
2016-05-03 10:05:44 +01:00
Dave Syer 3a251e2a38 Revert "Use the original query string when forwarding the request"
This reverts commit 8952cff24d.
2016-04-28 12:03:10 +01:00
Dave Syer c7c191c01e Ensure Servo metrics are exported the same as default metrics
Adds an `@ExportMetricReader` which was missing before and
led to people losing their metric exports when they had Servo
on the classpath.

Also allow servo metrics autoconfiguration to be disabled via
a flag netflix.metrics.servo.enabled=false (as an alternative to
excluding the class in `@EnableAutoConfiguration`).
2016-04-28 11:57:00 +01:00
Dave Syer e0bc9d11f1 Update docs for Turbine AMQP -> Stream 2016-04-27 14:21:05 +01:00
Dave Syer 6087bc755a Use eureka.instance zone data consistently determining client zone
The zone for a remote server comes from its
eureka.instance.metadataMap.zone, but we didn't (until this change)
apply the same logic to the client. If the client is registering
itslef with eureka then it will have a metadataMap itself and
we should be able to just reverse the logic.

Fixes gh-991
2016-04-27 09:10:42 +01:00
Dave Syer 314d229ccf Add @ConditionalOnEnabledHealthIndicator("hystrix")
Users will have to switch from health.hystrix.enabled to
management.health.* for consistency with other health
indicators.

Fixes gh-985
2016-04-26 09:13:06 +01:00
Dave Syer 8b306df132 Use @PropertySource instead of @Bean for http encoder properties
Protects us against changes in Spring Boot 1.4 where the naming
convention changes.
2016-04-20 14:34:44 +01:00
Dave Syer 8a4fb82b98 Remove reference to 'parent' poms in BOM 2016-04-20 14:20:29 +01:00
Dave Syer 5fc76aaa72 Fix javadocs in @FeignClient
The descriptions of name/serviceId/value and url were out of date
(name is mandatory now and can be mixed with url).
2016-04-19 14:58:59 +01:00
Dave Syer 24579f67e2 Revert to snapshots 2016-04-18 14:07:42 +01:00
Dave Syer d99196aeb1 Update to RC2 2016-04-18 14:02:49 +01:00
Dave Syer fcd0feb61e Ensure whitespace is stripped from appConfig in turbine
Fixes gh-948
2016-04-04 16:59:44 +01:00
Dave Syer 5d2065b3e7 Add some javadocs to ZuulProperties 2016-03-24 12:31:51 +00:00
Dave Syer c57a758e91 Update to Eureka 1.4.5 2016-03-24 09:58:21 +00:00
Dave Syer 371edbf827 Prevent possible memory leak with archaius 2016-03-09 16:58:31 +00:00
Dave Syer 2670890845 Whitespace 2016-03-08 08:18:38 +00:00
Dave Syer 8375e3b444 Adapt to changes in commons that put onus on user with @LoadBalanced 2016-03-07 18:04:10 +00:00
Dave Syer 1d1ad75afb Allow double-encoded JSON (as sent by Angel clients) in turbine
Fixes gh-873
2016-03-04 17:42:33 +00:00
Dave Syer 5bd18e4567 Mostly whitespace 2016-03-04 14:30:11 +00:00
Dave Syer bda11adfd5 Ensure content type is application/json
For compatiblity with Angel streams we only need to set the content
type explicitly.

Fixes gh-873
2016-03-04 13:28:40 +00:00
Dave Syer 000fee96aa Use "=" as separator in @RequestMapping(headers=...)
Consistent with Spring MVC (and untested up to now apparently).

Fixes gh-874
2016-03-04 09:38:31 +00:00
Dave Syer 718cafcd04 Add X-Forwarded-Port explicitly for Tomcat (and other servers)
Fixes gh-872
2016-03-03 11:29:30 +00:00
Dave Syer 908dcc0ec8 Support for multivalued map of file uploads
i.e. user sends multiple files with the same parameter name.

Fixes gh-870
2016-03-03 09:33:07 +00:00
Dave Syer a5d839fe44 Fix mvnw script for milestones 2016-03-02 17:34:26 +00:00
Dave Syer 9ea64308cb Add Authorize to sensitive headers in zuul proxy 2016-03-02 16:17:01 +00:00
Dave Syer d2e004dc68 Add support for "sensitiveHeaders" in zuul.routes
By default we now discard all Set-Cookie and Cookie headers. User
can manipulate it per route via zuul.routes.*.sensitiveHeaders, or
globally via zuul.ignoredHeaders.
2016-02-25 16:51:22 +00:00
Dave Syer 40361f1b8e Add whitelist hosts and sensitive headers 2016-02-25 12:57:33 +00:00
Dave Syer 17eb2f8d91 Refer to correct config props object in docs 2016-02-25 11:53:38 +00:00
Dave Syer ca81f5671a Add HTTP basic back to Eureka client
Latest Eureka from Netflix uses a different HTTP client, and it
ignores the HTTP basic credentials in a service URL. This change
partially restores the old behaviour by providing an interceptor
(ClientFilter) that has a single, global username/password
taken from the first serviceUrl that contains credentials.

Fixes gh-849
2016-02-24 17:57:52 +00:00
Dave Syer bc0eef9ae2 Exclude jackson XML from eureka client by default
Any client that wants to can include it back again, but generally
it only causes problems (XML returned from apps instead of
JSON by Spring MVC for instance). In general it only causes problems
for services whose clients use "Accept: application/xml,*/*", for
instance (like a browser).

See gh-306
2016-02-24 09:34:12 +00:00
Dave Syer 093354e231 Check if client is in bootstrap and default to not register
Eureka now has the option (maybe always there) to not register
and that's a sensible default in the bootstrap phase (when we
might not know the port yet).
2016-02-24 09:14:29 +00:00
Dave Syer d5f6dbe118 Revert "Add Feign expanders based on Spring conversion service"
This reverts commit 3f34ccc8fb. We
need to discuss a bit more (that thread local is probably unavoidable
given the design of Feign, but I don't like it yet).

See gh-841
2016-02-23 17:21:45 +00:00
Dave Syer 41c364002f Encode query params in Zuul filter
Some slightly tricky manipulation involved here, but hopefully
UriTemplate to the rescue.

Fixes gh-682
2016-02-23 15:19:23 +00:00
Dave Syer c3efcbabb8 Fix links to client code 2016-02-23 10:28:51 +00:00
Dave Syer 79b7480f4f Move servlet detection filter to ZuulConfiguration
It seems like a generic feature to me (not specific to the proxy),
so logically it should live in the base class.

Fixes gh-844
2016-02-23 10:02:54 +00:00