Commit Graph

315 Commits

Author SHA1 Message Date
Jean-Sébastien Pédron f8c73b653a Update rabbitmq-components.mk 2018-11-22 09:19:31 +01:00
kjnilsson f2966043d7 Update rabbitmq-components.mk 2018-10-29 12:43:15 +00:00
Michael Klishin 96bc073c7b Correct a typo
Primarily to trigger the pipeline to sync newly pushed tags.
2018-10-26 13:24:22 +03:00
Michael Klishin ecc3989407 README updates 2018-10-26 01:32:29 +03:00
Michael Klishin d5463be5e6 Bump EC2 API endpoint request timeout to 10s
100ms is unreasonably low.

Reported in [1]. Per discussion with @lukebakken.

1. https://groups.google.com/d/msg/rabbitmq-users/FyzJpxADz1s/h3U8r2BEBwAJ
2018-10-25 22:50:04 +03:00
Jean-Sébastien Pédron b868e26077 Update rabbitmq-components.mk 2018-09-19 10:38:11 +02:00
Jean-Sébastien Pédron 695867ea60 Update rabbitmq-components.mk 2018-09-11 14:22:24 +02:00
Jean-Sébastien Pédron ca72e64134 Update rabbitmq-components.mk 2018-08-09 17:44:10 +02:00
Jean-Sébastien Pédron 29363168d1 Update rabbitmq-components.mk 2018-08-09 12:16:57 +02:00
Jean-Sébastien Pédron 314b4c6ff4 Update rabbitmq-components.mk 2018-06-07 11:31:32 +02:00
Jean-Sébastien Pédron ace6ea08a0 Update erlang.mk 2018-04-11 10:52:43 +02:00
Jean-Sébastien Pédron 514ce316cb Update rabbitmq-components.mk 2018-04-11 10:51:17 +02:00
Jean-Sébastien Pédron c44f413505 Update rabbitmq-components.mk 2018-04-11 10:09:59 +02:00
Jean-Sébastien Pédron a1f935568c Travis CI: Update config from rabbitmq-common 2018-04-10 13:06:12 +02:00
Michael Klishin 720ba1b463 Compute API endpoint TLD from configured region
Closes #23.

[#155865527]
2018-03-10 02:58:18 +03:00
Jean-Sébastien Pédron 7ba3c82c3c Update erlang.mk 2018-03-02 19:04:19 +01:00
Jean-Sébastien Pédron df33a8822c Update rabbitmq-components.mk 2018-01-30 15:23:31 +01:00
Luke Bakken cf98260aa7 Update rabbitmq-components.mk 2018-01-29 16:22:10 -08:00
Jean-Sébastien Pédron 3ff2ecbcbd Update rabbitmq-components.mk 2018-01-23 17:21:22 +01:00
Jean-Sébastien Pédron 775bab44b6 Update rabbitmq-components.mk 2018-01-23 15:31:12 +01:00
Diana Corbacho 98c884bd2f Update rabbitmq-components.mk 2018-01-22 22:13:18 +00:00
Michael Klishin 0aaf46fb45 Clarify a confusing log message
While at it, introduce a rabbitmq_aws:has_credentials/0 useful for
debugging.

References rabbitmq/rabbitmq-peer-discovery-aws/issues/6.
2017-12-13 21:15:49 +03:00
Jean-Sébastien Pédron 0932175d2a Update rabbitmq-components.mk 2017-12-01 11:06:17 +01:00
Jean-Sébastien Pédron 4a27b57762 Update rabbitmq-components.mk 2017-11-28 14:00:39 +01:00
Jean-Sébastien Pédron d6a9fe2493 Update rabbitmq-components.mk 2017-11-28 13:38:28 +01:00
Jean-Sébastien Pédron 6db9cfdd04 Merge branch 'stable' 2017-10-13 15:05:27 +02:00
Jean-Sébastien Pédron 4581fbab22 Update rabbitmq-components.mk 2017-10-13 14:33:05 +02:00
Jean-Sébastien Pédron 047e5e63c9 Update rabbitmq-components.mk 2017-10-13 14:12:58 +02:00
Jean-Sébastien Pédron e11045f7dd Update rabbitmq-components.mk 2017-10-13 12:15:40 +02:00
Jean-Sébastien Pédron 05c92ea6be rabbitmq_aws_urilib: Replace edoc_uri by http_uri
This allows us to remove the dependency to edoc.

[#151251475]
2017-09-26 17:14:09 +02:00
Jean-Sébastien Pédron 9d7bb11cfa rabbitmq_aws_json: Revert to the old proplist-based API
... instead of using maps.

The problem was that rabbitmq_aws_xml was producing lists too. And
callers still expect lists. So it's easier to only fix the call to
rabbit_json:decode() and convert the result to the previous list format.

[#151251475]
2017-09-26 11:24:58 +02:00
Jean-Sébastien Pédron d3a6bf6cca rabbitmq_aws_config_tests: Replace erlang:now() by erlang:timestamp()
[#151251475]
2017-09-26 11:24:09 +02:00
Jean-Sébastien Pédron c2c6bcaae7 rabbitmq_aws_sign: Use crypto:hmac() directly
... instead of the hmc_init()+hmac_update()+hmac_final().

Furthermore, the use of hmac_update() was wrong because the updated
context was ignored and the initial empty context was passed to
hmac_final().

[#151251475]
2017-09-26 11:22:24 +02:00
Jean-Sébastien Pédron d95af8e84a rabbitmq_aws_sign: Remove support for integers in header's value
The code doesn't produce them, so no need to support and test this case.

[#151251475]
2017-09-26 11:21:25 +02:00
Jean-Sébastien Pédron 94db1b71cb rabbitmq_aws_config: Fix indent of parse_body_response()
[#151251475]
2017-09-26 11:20:06 +02:00
Jean-Sébastien Pédron 770234e690 Fix all -spec()
[#151251475]
2017-09-26 11:18:56 +02:00
Jean-Sébastien Pédron 333f9c4940 rabbitmq_aws: No need to rewrite unchanged record fields
[#151251475]
2017-09-26 11:15:39 +02:00
Jean-Sébastien Pédron fe0ffe45d8 Makefile: Add edoc and xmerl to LOCAL_DEPS
Reported by Dialyzer.

[#151251475]
2017-09-26 11:12:45 +02:00
Jean-Sébastien Pédron 5ace16ebf8 Switch to rabbit_json:decode()
... instead of rabbit_misc:json_decode() which doesn't exist anymore for
several months.

The new function returns a map instead of a proplist. Several modules in
the application and the testsuite are updated to handle those maps.

The testsuite passes again. However, other places may require some
changes to expect maps.
2017-09-20 19:38:36 +02:00
Jean-Sébastien Pédron 448a38bda1 Makefile: Add meck to TEST_DEPS 2017-09-20 19:37:50 +02:00
Jean-Sébastien Pédron 071ab54120 Merge branch 'stable' 2017-09-20 12:05:11 +02:00
Jean-Sébastien Pédron df846deb2c Remove build.config to use default Erlang.mk content
The copy of `erlang.mk` doesn't change after that because we were
already using the same `build.config`.
2017-09-20 12:04:02 +02:00
Michael Klishin 5cbed3296b Update rabbitmq-components.mk 2017-09-13 17:54:09 -04:00
Michael Klishin be5d7095ff Update rabbitmq-components.mk 2017-09-13 17:45:25 -04:00
Michael Klishin 3f0476ad51 Update rabbitmq-components.mk 2017-09-12 12:41:46 -04:00
Daniil Fedotov 7cd54ff63b Merge branch 'stable' 2017-09-12 10:01:11 +01:00
Daniil Fedotov e1fbb75a89 Fix fetch-deps.
Add rabbit_common to BUILD_DEPS, because it is used to build an app
2017-08-31 11:09:21 +01:00
Daniil Fedotov 5eabf0da14 Fix fetch-deps.
Add rabbit_common to BUILD_DEPS, because it is used to build the app
2017-08-31 11:07:37 +01:00
Daniil Fedotov 9a92466c0c Merge branch 'stable' 2017-08-30 19:20:18 +01:00
Daniil Fedotov 791545c1cd Update erlang.mk 2017-08-30 18:46:44 +01:00
Michael Klishin 1fd1dcc7e0 Erlang/OTP 19.2 is now the minimum supported version.
Part of rabbitmq/rabbitmq-server#1305.

[#149563549]
2017-07-26 19:02:42 +03:00
Michael Klishin c685cd7855 Update rabbitmq-components.mk 2017-07-26 03:48:17 +03:00
Michael Klishin 7b333494b7 Update rabbitmq-components.mk 2017-07-26 02:48:14 +03:00
Michael Klishin 289832ad04 Update rabbitmq-components.mk 2017-07-26 02:27:01 +03:00
Michael Klishin 22e8b520b9 Update rabbitmq-components.mk 2017-06-12 18:35:35 +03:00
Michael Klishin b8b42cb9db Update rabbitmq-components.mk 2017-06-02 17:51:23 +03:00
Michael Klishin afa09314d6 Sync erlang.mk with rabbit_common 2017-05-24 17:17:26 +03:00
Diana Corbacho 2de17d5b21 Initialise credentials on demand
Avoids requesting AWS credentials when the AWS backend is not used and
only included as a dependency
2017-05-22 12:11:07 +01:00
Diana Corbacho ea6f7a80d9 Add local deps 2017-04-12 15:06:33 +01:00
Michael Klishin a85c315277 Use Make variables to produce application descriptor
Like we do in other projects, including (now) rabbitmq/rabbitmq-autocluster.
2017-04-11 19:23:45 +03:00
Diana Corbacho 3932c15c17 Handle response errors
Related to aweber/rabbitmq-autocluster#104
2017-04-10 12:17:24 +01:00
Diana Corbacho dad1edbed6 Handle URIs without fragments
Reported in aweber/rabbitmq-autocluster#104
2017-04-10 12:16:34 +01:00
Diana Corbacho 55df8a99fa Flatten text lists
* Strings that contain <> in XML text are split in several xmlText elements
  which failed to flatten

aweber/rabbitmq-autocluster#124
[#142676591]
2017-03-29 11:36:04 +01:00
Gavin M. Roy b6d5825c54 Bump the version 2016-08-01 10:24:36 -04:00
Alexey Lebedeff 4794f65462 Updated rabbitmq-components.mk
Otherwise travis builds fails
2016-07-29 19:37:13 +03:00
Alexey Lebedeff 44195b7264 Fix some type specs
I've touched only those types as I'm trying to make dialyzer completely happy
with `rabbitmq_autocluster`.
2016-07-29 19:29:08 +03:00
Gavin M. Roy 760abacaa4 Dont rely on edoc_lib 2016-05-23 23:55:20 -04:00
Gavin M. Roy 474c69c4a7 Merge branch 'master' of github.com:gmr/rabbitmq-aws 2016-05-23 21:17:15 -04:00
Gavin M. Roy 1f6f6e9bf7 Fix query arg encoding 2016-05-23 21:17:00 -04:00
Gavin M. Roy 095d2a28c9 Update README.md 2016-05-19 20:54:22 -04:00
Gavin M. Roy 1136ed35d5 Remove rebar3, etc, not needed 2016-05-19 20:45:29 -04:00
Gavin M. Roy e1f3765c14 update travis config 2016-05-19 20:38:56 -04:00
Gavin M. Roy 71e52fb874 Dont crash on startup when region cant be loaded 2016-05-19 20:35:09 -04:00
Gavin M. Roy 53cfaf49e4 Travis updates 2016-05-19 19:51:51 -04:00
Gavin M. Roy 388eae36b6 Get the build/test working 2016-05-19 19:40:33 -04:00
Gavin M. Roy 08d1f6a5a9 WIP first change after renaming all the things 2016-05-19 17:04:53 -04:00
Gavin M. Roy daecdfe2cf Update rebar3 & config for hex 2016-05-19 16:41:01 -04:00
Gavin M. Roy 304da8a9fa Fix the packaging info 2016-05-19 16:27:30 -04:00
Gavin M. Roy 8a382179df Update the tagline 2016-05-19 16:20:37 -04:00
Gavin M. Roy 45cdfef96d Add minimal API documentation to the README 2016-05-19 16:19:29 -04:00
Gavin M. Roy ccffab5051 Increase coverage to include handle_call/3 2016-05-19 15:51:37 -04:00
Gavin M. Roy 851a0f0cbe Update information about the ordering precedence 2016-05-19 15:34:21 -04:00
Gavin M. Roy ccca6f901d Implement the full request logic 2016-05-19 15:34:03 -04:00
Gavin M. Roy a75d224306 Return the parsed expiration timestamp 2016-05-19 15:32:05 -04:00
Gavin M. Roy 8d646f0e88 Add another error response format 2016-05-19 15:31:45 -04:00
Gavin M. Roy ea13561798 Increate httpc_aws test coverage 2016-05-17 16:48:43 -04:00
Gavin M. Roy 424d6a0669 Unused functions/code paths 2016-05-17 16:42:19 -04:00
Gavin M. Roy eac8113cfa Correctly handle single node XML as well 2016-05-17 16:27:25 -04:00
Gavin M. Roy 723bcdcb75 Increase JSON conversation coverage 2016-05-17 14:39:43 -04:00
Gavin M. Roy 9708fb23c8 Increase test coverage 2016-05-17 14:36:33 -04:00
Gavin M. Roy eec30f0e9d Ignore ContentType in this function 2016-05-17 14:36:26 -04:00
Gavin M. Roy 2d54ff562e See if we can get 18.3 coverage 2016-05-17 14:26:04 -04:00
Gavin M. Roy b438963efc Increase test coverage and documentation of httpc_aws 2016-05-17 14:25:11 -04:00
Gavin M. Roy f0d64cb8e5 Move tests from binary() strings to string()s 2016-05-17 14:11:26 -04:00
Gavin M. Roy cddc055889 Use httpc_aws_json:decode/1 2016-05-17 14:10:17 -04:00
Gavin M. Roy 613c55bced Remove binary conversion 2016-05-17 14:10:00 -04:00
Gavin M. Roy 0604eec73b Break out JSON parsing 2016-05-17 14:09:48 -04:00
Gavin M. Roy ea45c68e7e WIP improvements in content parsing logic 2016-05-17 01:53:17 -04:00
Gavin M. Roy acfd7c687e Add query_string(undefined) back 2016-05-17 01:53:00 -04:00
Gavin M. Roy 5b5522b617 Fix XML parser for nested docs 2016-05-17 01:52:50 -04:00
Gavin M. Roy 0c46d74550 Start httpc_aws tests 2016-05-17 00:10:22 -04:00
Gavin M. Roy 9bbef647c3 API updates 2016-05-17 00:08:25 -04:00
Gavin M. Roy 9836e15311 IDE config updates 2016-05-17 00:08:19 -04:00
Gavin M. Roy 5fe5179e38 Reflect the change in typing/records 2016-05-17 00:08:12 -04:00
Gavin M. Roy e911075e17 Revert the encoding method 2016-05-17 00:07:54 -04:00
Gavin M. Roy 8977375f52 Update the hrl, streamline, add more typing 2016-05-17 00:07:46 -04:00
Gavin M. Roy 40bb9c97af Trivial test updates 2016-05-17 00:07:14 -04:00
Gavin M. Roy 9880a7e816 Update rebar config with more things 2016-05-17 00:06:54 -04:00
Gavin M. Roy e67fbb5639 Change headers to be all lowercase
And fix the header merging behavior
2016-05-16 22:19:18 -04:00
Gavin M. Roy 1e41b63305 Use http_uri:encode/1
edoc_lib:escape_uri/1 uses uppercase hex encoding causing = to map to %3D instead of %3d. This causes a problem with AWS.
2016-05-16 22:12:29 -04:00
Gavin M. Roy d132e485fe Fix the doc for httpc_aws_xml 2016-05-16 01:02:21 -04:00
Gavin M. Roy 715ace9517 Add auto-endpoint creation, response parsing 2016-05-16 01:01:23 -04:00
Gavin M. Roy 051157c6eb Dont overwrite pre-specified headers 2016-05-16 01:01:01 -04:00
Gavin M. Roy 16ea14fff1 Add a simple XML parser
Looks like some AWS APIs dont speak JSON. \o/
2016-05-16 01:00:39 -04:00
Gavin M. Roy 5aba93f50d Add case-insensitive sorting of request headers 2016-05-15 23:22:58 -04:00
Gavin M. Roy 974935fec6 Initial implementation of the httpc_aws:request method 2016-05-15 23:22:46 -04:00
Gavin M. Roy 52e15f6f97 Move security_credentials() to the include 2016-05-15 23:19:44 -04:00
Gavin M. Roy 66ab4fe131 Fix application startup 2016-05-15 23:19:26 -04:00
Gavin M. Roy 9406947a42 Fix signing header sorting to be case insensitive 2016-05-15 23:17:46 -04:00
Gavin M. Roy 5ca7ecf2cf Move to calendar:local_time_to_universal_time_dst/1 2016-05-15 20:56:40 -04:00
Gavin M. Roy 2b7af6b390 IntelliJ configuration settings 2016-05-15 20:40:37 -04:00
Gavin M. Roy bb3285709b Remove the initial tests for now
Will re-add when API stabilizes
2016-05-15 19:52:43 -04:00
Gavin M. Roy 055fb5ea5c Updated application cleanup and base app 2016-05-15 19:51:59 -04:00
Gavin M. Roy 5522a3ef5c AWS Request Signing module
Builds headers the signed request
2016-05-15 19:51:45 -04:00
Gavin M. Roy dcfba354bf Minor cleanup of rebar config 2016-05-15 19:51:15 -04:00
Gavin M. Roy 4324abb33b Add v4request record/type 2016-05-15 19:51:01 -04:00
Gavin M. Roy 8859630c72 Add build_query_string/1 method 2016-05-15 19:50:48 -04:00
Gavin M. Roy 27ae3a16b5 Refactor the urilib tests to match the rest of the project 2016-04-15 12:01:00 -04:00
Gavin M. Roy a12aebba24 Remove cleanup for 17.5, no gen_server:stop/1 2016-04-15 00:48:24 -04:00
Gavin M. Roy e3a50579c6 Maybe fix this in 17.5 2016-04-15 00:35:00 -04:00
Gavin M. Roy 58365970b5 Additional test coverage 2016-04-15 00:32:25 -04:00
Gavin M. Roy b4aef6f3ea Additional test coverage 2016-04-12 00:27:09 -04:00
Gavin M. Roy 306f34a2a3 Increase test coverage 2016-04-12 00:23:53 -04:00
Gavin M. Roy fe7c8ced41 Doh, that's why the test failed 2016-04-12 00:15:31 -04:00
Gavin M. Roy 631a29a8dc See if the path changed 2016-04-12 00:11:41 -04:00
Gavin M. Roy 83935d46f5 Refactor to consistently use the #uri{} record 2016-04-12 00:09:00 -04:00
Gavin M. Roy 2231ad85c9 Implement specs for each function, additional cleanup 2016-04-11 22:21:35 -04:00
Gavin M. Roy a0692a2086 Cleanup and refactoring
- Strip down httpc_aws_urllib
- WIP cleanup of doc strings and specs
- Add some types to the include
- Start to model out the static API that invokes gen_server
- Clean up all dialyzer warnings
- Update tests to reflect changes
2016-04-08 01:45:34 -04:00
Gavin M. Roy ada51d69b6 Setup the OTP side of the API
- To remove the need to send configuration data for each request, setup a gen_server structure for keeping configuration state.
- Move constants and record info into a hrl file to recode per-file definition overhead.
- Update file headers to be consistent
2016-04-07 20:59:52 -04:00
Gavin M. Roy 74d29a37e8 Add erlang.mk support 2016-04-07 20:22:04 -04:00
Gavin M. Roy 48a150051b Headers are unused 2016-04-07 20:20:16 -04:00
Gavin M. Roy e35342cf75 Look at the http response status code 2016-03-31 18:11:54 -04:00
Gavin M. Roy d72b3aed99 Working credentials from instance metadata 2016-03-31 18:06:31 -04:00
Gavin M. Roy bb737a0a56 Work in process on httpc_aws_config:credentials/1
Works for local files, need to implement the request to the EC2 metadata instance service
2016-03-31 17:22:20 -04:00
Gavin M. Roy 6aa9406ac7 Documentation and API updates 2016-03-31 14:50:55 -04:00
Gavin M. Roy ab1e7338a6 Update precedence documentation 2016-03-31 00:44:26 -04:00
Gavin M. Roy 2e12047a16 Add httpc_aws_config:value/2
- Rename httpc_aws_config:config_data/2 to httpc_aws_config:valus/1
- Add test coverage
2016-03-31 00:32:27 -04:00
Gavin M. Roy a5bcfb5fe8 Change config_data/1 to public 2016-03-31 00:16:52 -04:00
Gavin M. Roy eeca3dcd47 Drop older erlang versions 2016-03-31 00:13:11 -04:00
Gavin M. Roy 470015e1b2 Add httpc_aws_config:region and supporting things
- Copy in urilib as a module in httpc_aws for building URIs
- Add logic to get region from env var, config, or EC2 instance metadata service
2016-03-31 00:11:39 -04:00
Gavin M. Roy 03c2118f99 Add badges 2016-03-30 21:44:18 -04:00
Gavin M. Roy 235a98fade Remove -spec 2016-03-30 13:34:26 -04:00
Gavin M. Roy b663731662 Refactor to remove nested cases 2016-03-30 13:33:15 -04:00
Gavin M. Roy c32141b397 Increase test coverage of existing functions 2016-03-30 10:49:02 -04:00
Gavin M. Roy c9014ebb9c Ignore a few things 2016-03-29 17:11:42 -04:00
Gavin M. Roy 395f5ed464 Add coverage options to rebar config 2016-03-29 17:10:56 -04:00
Gavin M. Roy 8b9806277e Add covertool for code coverage reporting 2016-03-29 17:06:54 -04:00
Gavin M. Roy a47f340425 Fix the tests for travis 2016-03-29 17:04:20 -04:00
Gavin M. Roy 9ef32c7940 Add some output for debugging in travis 2016-03-29 16:55:17 -04:00
Gavin M. Roy ce4f3cce16 Enumerate the env vars (stub) 2016-03-29 00:18:04 -04:00
Gavin M. Roy 2f45aee4a4 Initial WIP commit 2016-03-29 00:14:17 -04:00
Gavin M. Roy 8fd2844112 Add rebar3 for testing 2016-03-29 00:13:05 -04:00
Gavin M. Roy 953da0868a Add .editorconfig settings 2016-03-28 20:42:33 -04:00
Gavin M. Roy 48c464b938 Add description 2016-03-28 20:40:23 -04:00
Gavin M. Roy 6df38694ac Initial setup from rebar3 lib template 2016-03-28 20:39:45 -04:00