Commit Graph

909 Commits

Author SHA1 Message Date
dcorbacho 723133f493 POST /login endpoint
Closes #764
2020-01-17 12:50:33 +01:00
Michael Klishin 2e4255c1e7 (c) bump 2019-12-29 05:50:30 +03:00
Michael Klishin f7bb072b4b Merge pull request #753 from rabbitmq/mgmt-less-improvements
Display queue replicas and totals in metrics-less UI
2019-11-27 08:31:20 +03:00
Michael Klishin 93f051ad77 A follow-up to f502aa7f34, rabbitmq/rabbitmq-server#2171 2019-11-27 08:00:03 +03:00
Michael Klishin f502aa7f34 Adapt another test for rabbitmq/rabbitmq-server#2171 2019-11-27 07:30:38 +03:00
Michael Klishin 965ac8440d Adapt a test for rabbitmq/rabbitmq-server#2171 2019-11-22 20:56:33 +03:00
dcorbacho aef931f750 Option to list queue totals when statistics are disabled
[#169802101]
2019-11-18 11:41:42 +00:00
dcorbacho 9576aaf43c Reintroduce replicas information 2019-11-15 12:04:27 +00:00
Michael Klishin 258e2b84f2 Definition import: refactor for future ctl command 2019-11-15 07:15:22 +03:00
Michael Klishin 045f9775f4 Move definition import machinery to core
Part of #749.
2019-11-12 03:30:48 +03:00
Luke Bakken fcd83bc287 Add test that fails for rabbitmq-management#739
fixup
2019-10-01 10:12:54 -07:00
Michael Klishin 33082f2d2d Two more management.ssl.* options
The options are not very useful for HTTPS clients but we should support
them for consistency and completeness.

Closes #735.
2019-09-16 19:36:32 +03:00
Diana Corbacho 046d89864e Handle vhost description and tags fields
[#166298298]
2019-08-30 11:53:43 +02:00
Gerhard Lazu c5b1d07ada Ensure that a request without auth header does not return a basic auth prompt
When basic auth is disabled, we don't want to display the basic auth
prompt just to return the same 401 that we would because basic auth is
disabled.

rabbitmq/rabbitmq-management#724

[#158496849]
2019-08-08 18:30:42 +01:00
Diana Corbacho ebabd54fae Validate flags to disable features on runtime
[#167754496]
2019-08-07 17:32:51 +01:00
Michael Klishin 7b47850015 Merge branch 'master' into disable-basic-http-auth 2019-08-02 19:58:33 +03:00
Michael Klishin f1ade9c9a6 Merge pull request #722 from rabbitmq/mgmt-oauth
Management UI can obtain an OAuth 2 token from UAA/CF SSO service
2019-08-02 19:19:18 +03:00
Diana Corbacho c9d054ea66 Disable basic auth for definitions
[#158496849]
2019-07-30 16:19:33 +01:00
Diana Corbacho 3260db87f5 Disable basic HTTP auth
Config parameter: {disable_basic_auth, <bool>}
Defaults to 'false'

[#158496849]
2019-07-30 16:19:20 +01:00
Michael Klishin ceea3f9589 Update tests 2019-07-27 15:23:12 +03:00
Michael Klishin 2e0b6146d0 Parse routing keys with values of `null` and `undefined` to their respective atoms
See #723 for background.

Currently there are three main ways to declare a binding:

 * Use an AMQP 0-9-1 client
 * Use an HTTP API client
 * Definition import

For the sake of this change we will fold the latter two options into
one as they are effectively identical as far as data formats go.

An HTTP API client can do things that an AMQP 0-9-1 would not be able
to because of framing/parser/generator restrictions, and vice versa.

With HTTP API and definition import the following importance

 * When a binding is added, routing key can be omitted or set to `null` 
(or `undefined`)
 * When a binding is deleted, a blank routing key can only be specified
   using a convention since an empty URI path arguments are not 
supported
   by Cowboy REST and would make no sense to the developer.

Omitted or `null` `routing_key` values are parsed to their respective 
atoms.
Those atoms are then stored in binding records. When a binding is 
retrieved
or deleted (the case in #723), the conventionally encoded routing key 
that
contained "null" for name was parsed to "null" (a string). This 
discrepancy
led to false 404 responses from the API.

Note that this solution is merely a band aid over a fundamental 
difference
in two APIs. Rejecting `null` or undefined values might be a better 
option
but we cannot adopt it in 3.7.x. It remains to be discussed whether that
would improve user experience.

Another problematic scenario is routing keys with the value of "null"
(a string) used at binding time. This change would break deletion for
those. We'll assume that no developer would intentionally use such
routing key as the confusion and risk are more or less obvious.
2019-07-27 10:22:51 +03:00
Diana Corbacho 9732fb54be Minor fixes
[#158496811]
2019-07-25 16:28:58 +01:00
Diana Corbacho 10a8c61c2b Test /auth endpoint
[#158496811]
2019-07-24 12:31:39 +01:00
Michael Klishin b02243523f Update exports and tests for 4960f0117d
References #711, #715.
2019-07-16 20:14:57 +03:00
Michael Klishin 83d48bd36d Merge branch 'master' into management-only-api 2019-07-08 18:41:37 +03:00
Michael Klishin 33a93d7a93 Merge pull request #711 from rabbitmq/definitions_import_timeout
Definitions import timeout
2019-06-18 15:59:54 +03:00
Michael Klishin 521da23dba Prefer assertMatch over pattern matching for better failure reporting 2019-06-18 15:29:57 +03:00
Michael Klishin ec1cdc9a86 Use fewer vhosts in this test 2019-06-18 00:45:47 +03:00
Daniil Fedotov a0d7382b80 Report definitions import progress to the client.
This does not address the idle_timeout issue, but may
prevent clients from timing out and closing connection
when importing definitions.
2019-06-17 16:31:47 -04:00
Daniil Fedotov dc54d87a75 Test long definitions import 2019-06-17 16:31:19 -04:00
Daniil Fedotov 6083eb0bef Propagate validation error when importing definitions from a directory.
When definitions import fails it returns {error, Reason}, which is ignored
when importing multiple definitions and fails silently.
Fix that by checking result of every import.
2019-06-17 11:19:58 -04:00
Diana Corbacho 83d4fd71b3 Test disabling the stats on the HTTP API using the query string
?disable_stats=true

[#166445368]
2019-06-11 13:24:25 +01:00
Diana Corbacho cadc15856e Management only UI and HTTP API
Slimmed down version of the API without metrics.
Stats can be disabled from app config or in the HTTP request.
rabbitmq_management.disable_management_stats = true

Disabling the collectors in the agent now allows the management
application to start, but strictly in management-only mode.

[#166445368]
2019-06-10 22:09:41 +01:00
Luke Bakken e9ed88277d Allow but ignore charset if set for HTTP request
Fixes #703
2019-05-14 12:46:41 -07:00
Michael Klishin 47650d2908 Merge sendfile default using maps 2019-04-29 22:22:56 +03:00
Daniil Fedotov 26e01b365b Disable sendfile in cowboy by default.
Kernel sendfile can behave weirdly sometimes:
https://groups.google.com/forum/#!msg/rabbitmq-users/jyqVkwP_a24/qwWectTcCgAJ
Sendfile functionality should not impact performance much and
may be disabled by default.
It still can be enabled via cowboy_options.

[#164633826]
2019-04-25 17:30:40 -04:00
Gerhard Lazu 84641f59c8 Add stats HTTP redirect test 2019-04-24 10:24:39 +01:00
Michael Klishin ac7ab8c9e8 Update a test to be forward compatible with rabbit:status/0 format changes
See rabbitmq/rabbitmq-cli#340.
2019-04-12 13:14:02 +04:00
Daniil Fedotov 8762881b0b Fix function clause in bindings when using CORS headers. Enable OPTIONS method for bulk delete.
Bug reported in https://groups.google.com/forum/#!topic/rabbitmq-users/AtGYGGhxODc
When using CORS headers, bindings endpoint was failing with function clause.
rabbit_mgmt_wm_bindings module is using non-standard handler state, which was
unmatched with undefined.
2019-04-04 10:46:26 -07:00
Spring Operator 5ffa1fd9a9 URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# HTTP URLs that Could Not Be Fixed
These URLs were unable to be fixed. Please review them to see if they can be manually resolved.

* http://blog.listincomprehension.com/search/label/procket (200) with 1 occurrences could not be migrated:
   ([https](https://blog.listincomprehension.com/search/label/procket) result ClosedChannelException).
* http://dozzie.jarowit.net/trac/wiki/TOML (200) with 1 occurrences could not be migrated:
   ([https](https://dozzie.jarowit.net/trac/wiki/TOML) result SSLHandshakeException).
* http://dozzie.jarowit.net/trac/wiki/subproc (200) with 1 occurrences could not be migrated:
   ([https](https://dozzie.jarowit.net/trac/wiki/subproc) result SSLHandshakeException).
* http://e2project.org (200) with 1 occurrences could not be migrated:
   ([https](https://e2project.org) result AnnotatedConnectException).
* http://erik.eae.net/archives/2007/07/27/18.54.15/ (200) with 1 occurrences could not be migrated:
   ([https](https://erik.eae.net/archives/2007/07/27/18.54.15/) result SSLHandshakeException).
* http://javascript.nwbox.com/IEContentLoaded/ (200) with 1 occurrences could not be migrated:
   ([https](https://javascript.nwbox.com/IEContentLoaded/) result SSLHandshakeException).
* http://nitrogenproject.com/ (200) with 2 occurrences could not be migrated:
   ([https](https://nitrogenproject.com/) result ConnectTimeoutException).
* http://proper.softlab.ntua.gr (200) with 1 occurrences could not be migrated:
   ([https](https://proper.softlab.ntua.gr) result SSLHandshakeException).
* http://sammyjs.org (200) with 2 occurrences could not be migrated:
   ([https](https://sammyjs.org) result SSLHandshakeException).
* http://sammyjs.org/docs/plugins (200) with 2 occurrences could not be migrated:
   ([https](https://sammyjs.org/docs/plugins) result SSLHandshakeException).
* http://sammyjs.org/docs/routes (200) with 2 occurrences could not be migrated:
   ([https](https://sammyjs.org/docs/routes) result SSLHandshakeException).
* http://webfx.eae.net/dhtml/boxsizing/boxsizing.html (200) with 1 occurrences could not be migrated:
   ([https](https://webfx.eae.net/dhtml/boxsizing/boxsizing.html) result SSLHandshakeException).
* http://yaws.hyber.org (200) with 1 occurrences could not be migrated:
   ([https](https://yaws.hyber.org) result AnnotatedConnectException).
* http://choven.ca (503) with 1 occurrences could not be migrated:
   ([https](https://choven.ca) result ConnectTimeoutException).

# Fixed URLs

## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* http://fixprotocol.org/ (301) with 1 occurrences migrated to:
  https://fixtrading.org ([https](https://fixprotocol.org/) result SSLHandshakeException).
* http://jsperf.com/getall-vs-sizzle/2 (301) with 1 occurrences migrated to:
  https://jsperf.com/getall-vs-sizzle/2 ([https](https://jsperf.com/getall-vs-sizzle/2) result ReadTimeoutException).
* http://erldb.org (UnknownHostException) with 1 occurrences migrated to:
  https://erldb.org ([https](https://erldb.org) result UnknownHostException).
* http://some-host-that-does-not-exist:15672/ (UnknownHostException) with 1 occurrences migrated to:
  https://some-host-that-does-not-exist:15672/ ([https](https://some-host-that-does-not-exist:15672/) result UnknownHostException).
* http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ (301) with 1 occurrences migrated to:
  https://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ ([https](https://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/) result 404).
* http://www.JSON.org/js.html (404) with 1 occurrences migrated to:
  https://www.JSON.org/js.html ([https](https://www.JSON.org/js.html) result 404).

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://bugs.jquery.com/ticket/12359 with 1 occurrences migrated to:
  https://bugs.jquery.com/ticket/12359 ([https](https://bugs.jquery.com/ticket/12359) result 200).
* http://bugs.jquery.com/ticket/13378 with 1 occurrences migrated to:
  https://bugs.jquery.com/ticket/13378 ([https](https://bugs.jquery.com/ticket/13378) result 200).
* http://cloudi.org/ with 27 occurrences migrated to:
  https://cloudi.org/ ([https](https://cloudi.org/) result 200).
* http://code.quirkey.com/sammy/ with 1 occurrences migrated to:
  https://code.quirkey.com/sammy/ ([https](https://code.quirkey.com/sammy/) result 200).
* http://erlware.org/ with 1 occurrences migrated to:
  https://erlware.org/ ([https](https://erlware.org/) result 200).
* http://inaka.github.io/cowboy-trails/ with 1 occurrences migrated to:
  https://inaka.github.io/cowboy-trails/ ([https](https://inaka.github.io/cowboy-trails/) result 200).
* http://jquery.com/ with 3 occurrences migrated to:
  https://jquery.com/ ([https](https://jquery.com/) result 200).
* http://jsperf.com/thor-indexof-vs-for/5 with 1 occurrences migrated to:
  https://jsperf.com/thor-indexof-vs-for/5 ([https](https://jsperf.com/thor-indexof-vs-for/5) result 200).
* http://ninenines.eu with 6 occurrences migrated to:
  https://ninenines.eu ([https](https://ninenines.eu) result 200).
* http://ninenines.eu/ with 1 occurrences migrated to:
  https://ninenines.eu/ ([https](https://ninenines.eu/) result 200).
* http://sizzlejs.com/ with 2 occurrences migrated to:
  https://sizzlejs.com/ ([https](https://sizzlejs.com/) result 200).
* http://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ with 1 occurrences migrated to:
  https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ ([https](https://web.archive.org/web/20100324014747/https://blindsignals.com/index.php/2009/07/jquery-delay/) result 200).
* http://www.actordb.com/ with 2 occurrences migrated to:
  https://www.actordb.com/ ([https](https://www.actordb.com/) result 200).
* http://www.cs.kent.ac.uk/projects/wrangler/Home.html with 1 occurrences migrated to:
  https://www.cs.kent.ac.uk/projects/wrangler/Home.html ([https](https://www.cs.kent.ac.uk/projects/wrangler/Home.html) result 200).
* http://www.enhanceie.com/ie/bugs.asp with 1 occurrences migrated to:
  https://www.enhanceie.com/ie/bugs.asp ([https](https://www.enhanceie.com/ie/bugs.asp) result 200).
* http://www.rabbitmq.com/amqp-0-9-1-reference.html with 1 occurrences migrated to:
  https://www.rabbitmq.com/amqp-0-9-1-reference.html ([https](https://www.rabbitmq.com/amqp-0-9-1-reference.html) result 200).
* http://www.rabbitmq.com/configure.html with 1 occurrences migrated to:
  https://www.rabbitmq.com/configure.html ([https](https://www.rabbitmq.com/configure.html) result 200).
* http://www.rabbitmq.com/confirms.html with 1 occurrences migrated to:
  https://www.rabbitmq.com/confirms.html ([https](https://www.rabbitmq.com/confirms.html) result 200).
* http://www.rabbitmq.com/consumers.html with 1 occurrences migrated to:
  https://www.rabbitmq.com/consumers.html ([https](https://www.rabbitmq.com/consumers.html) result 200).
* http://www.rabbitmq.com/github.html with 1 occurrences migrated to:
  https://www.rabbitmq.com/github.html ([https](https://www.rabbitmq.com/github.html) result 200).
* http://www.rabbitmq.com/ha.html with 3 occurrences migrated to:
  https://www.rabbitmq.com/ha.html ([https](https://www.rabbitmq.com/ha.html) result 200).
* http://www.rabbitmq.com/management-cli.html with 1 occurrences migrated to:
  https://www.rabbitmq.com/management-cli.html ([https](https://www.rabbitmq.com/management-cli.html) result 200).
* http://www.rabbitmq.com/management.html with 7 occurrences migrated to:
  https://www.rabbitmq.com/management.html ([https](https://www.rabbitmq.com/management.html) result 200).
* http://www.rabbitmq.com/memory-use.html with 3 occurrences migrated to:
  https://www.rabbitmq.com/memory-use.html ([https](https://www.rabbitmq.com/memory-use.html) result 200).
* http://www.rabbitmq.com/memory.html with 3 occurrences migrated to:
  https://www.rabbitmq.com/memory.html ([https](https://www.rabbitmq.com/memory.html) result 200).
* http://www.rabbitmq.com/nettick.html with 1 occurrences migrated to:
  https://www.rabbitmq.com/nettick.html ([https](https://www.rabbitmq.com/nettick.html) result 200).
* http://www.rabbitmq.com/partitions.html with 2 occurrences migrated to:
  https://www.rabbitmq.com/partitions.html ([https](https://www.rabbitmq.com/partitions.html) result 200).
* http://www.rabbitmq.com/persistence-conf.html with 2 occurrences migrated to:
  https://www.rabbitmq.com/persistence-conf.html ([https](https://www.rabbitmq.com/persistence-conf.html) result 200).
* http://www.rabbitmq.com/services.html with 1 occurrences migrated to:
  https://www.rabbitmq.com/services.html ([https](https://www.rabbitmq.com/services.html) result 200).
* http://www.rebar3.org with 1 occurrences migrated to:
  https://www.rebar3.org ([https](https://www.rebar3.org) result 200).
* http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html with 1 occurrences migrated to:
  https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html ([https](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html) result 200).
* http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html with 1 occurrences migrated to:
  https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html ([https](https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html) result 200).
* http://www.w3.org/TR/2011/REC-css3-selectors-20110929/ with 2 occurrences migrated to:
  https://www.w3.org/TR/2011/REC-css3-selectors-20110929/ ([https](https://www.w3.org/TR/2011/REC-css3-selectors-20110929/) result 200).
* http://www.w3.org/TR/CSS21/syndata.html with 2 occurrences migrated to:
  https://www.w3.org/TR/CSS21/syndata.html ([https](https://www.w3.org/TR/CSS21/syndata.html) result 200).
* http://www.w3.org/TR/DOM-Level-3-Events/ with 1 occurrences migrated to:
  https://www.w3.org/TR/DOM-Level-3-Events/ ([https](https://www.w3.org/TR/DOM-Level-3-Events/) result 200).
* http://www.w3.org/TR/selectors/ with 4 occurrences migrated to:
  https://www.w3.org/TR/selectors/ ([https](https://www.w3.org/TR/selectors/) result 200).
* http://code.google.com/p/stringencoders/ with 1 occurrences migrated to:
  https://code.google.com/p/stringencoders/ ([https](https://code.google.com/p/stringencoders/) result 301).
* http://code.google.com/p/stringencoders/source/browse/ with 2 occurrences migrated to:
  https://code.google.com/p/stringencoders/source/browse/ ([https](https://code.google.com/p/stringencoders/source/browse/) result 301).
* http://contributor-covenant.org with 1 occurrences migrated to:
  https://contributor-covenant.org ([https](https://contributor-covenant.org) result 301).
* http://contributor-covenant.org/version/1/3/0/ with 1 occurrences migrated to:
  https://contributor-covenant.org/version/1/3/0/ ([https](https://contributor-covenant.org/version/1/3/0/) result 301).
* http://dev.w3.org/csswg/cssom/ with 1 occurrences migrated to:
  https://dev.w3.org/csswg/cssom/ ([https](https://dev.w3.org/csswg/cssom/) result 301).
* http://inaka.github.com/apns4erl with 1 occurrences migrated to:
  https://inaka.github.com/apns4erl ([https](https://inaka.github.com/apns4erl) result 301).
* http://inaka.github.com/edis/ with 1 occurrences migrated to:
  https://inaka.github.com/edis/ ([https](https://inaka.github.com/edis/) result 301).
* http://jquery.org/license with 2 occurrences migrated to:
  https://jquery.org/license ([https](https://jquery.org/license) result 301).
* http://lasp-lang.org/ with 1 occurrences migrated to:
  https://lasp-lang.org/ ([https](https://lasp-lang.org/) result 301).
* http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx with 1 occurrences migrated to:
  https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx ([https](https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx) result 301).
* http://msdn.microsoft.com/en-us/library/ie/ms536648 with 1 occurrences migrated to:
  https://msdn.microsoft.com/en-us/library/ie/ms536648 ([https](https://msdn.microsoft.com/en-us/library/ie/ms536648) result 301).
* http://rabbitmq.com with 5 occurrences migrated to:
  https://rabbitmq.com ([https](https://rabbitmq.com) result 301).
* http://rabbitmq.com/ae.html with 1 occurrences migrated to:
  https://rabbitmq.com/ae.html ([https](https://rabbitmq.com/ae.html) result 301).
* http://rabbitmq.com/consumers.html with 1 occurrences migrated to:
  https://rabbitmq.com/consumers.html ([https](https://rabbitmq.com/consumers.html) result 301).
* http://rabbitmq.com/dlx.html with 2 occurrences migrated to:
  https://rabbitmq.com/dlx.html ([https](https://rabbitmq.com/dlx.html) result 301).
* http://rabbitmq.com/maxlength.html with 2 occurrences migrated to:
  https://rabbitmq.com/maxlength.html ([https](https://rabbitmq.com/maxlength.html) result 301).
* http://rabbitmq.com/passwords.html with 1 occurrences migrated to:
  https://rabbitmq.com/passwords.html ([https](https://rabbitmq.com/passwords.html) result 301).
* http://rabbitmq.com/priority.html with 1 occurrences migrated to:
  https://rabbitmq.com/priority.html ([https](https://rabbitmq.com/priority.html) result 301).
* http://rabbitmq.com/ttl.html with 2 occurrences migrated to:
  https://rabbitmq.com/ttl.html ([https](https://rabbitmq.com/ttl.html) result 301).
* http://saleyn.github.com/erlexec with 1 occurrences migrated to:
  https://saleyn.github.com/erlexec ([https](https://saleyn.github.com/erlexec) result 301).
* http://support.microsoft.com/kb/186063 with 1 occurrences migrated to:
  https://support.microsoft.com/kb/186063 ([https](https://support.microsoft.com/kb/186063) result 301).
* http://technet.microsoft.com/en-us/sysinternals/bb896655 with 2 occurrences migrated to:
  https://technet.microsoft.com/en-us/sysinternals/bb896655 ([https](https://technet.microsoft.com/en-us/sysinternals/bb896655) result 301).
* http://www.erlang.org/doc/man/sasl_app.html with 1 occurrences migrated to:
  https://www.erlang.org/doc/man/sasl_app.html ([https](https://www.erlang.org/doc/man/sasl_app.html) result 301).
* http://www.mozilla.org/MPL/ with 86 occurrences migrated to:
  https://www.mozilla.org/MPL/ ([https](https://www.mozilla.org/MPL/) result 301).
* http://www.mozilla.org/mpl/ with 3 occurrences migrated to:
  https://www.mozilla.org/mpl/ ([https](https://www.mozilla.org/mpl/) result 301).
* http://www.rabbitmq.com/man/rabbitmq-plugins.1.man.html with 1 occurrences migrated to:
  https://www.rabbitmq.com/man/rabbitmq-plugins.1.man.html ([https](https://www.rabbitmq.com/man/rabbitmq-plugins.1.man.html) result 301).
* http://www.w3.org/TR/css3-selectors/ with 1 occurrences migrated to:
  https://www.w3.org/TR/css3-selectors/ ([https](https://www.w3.org/TR/css3-selectors/) result 301).
* http://www.whatwg.org/specs/web-apps/current-work/ with 1 occurrences migrated to:
  https://www.whatwg.org/specs/web-apps/current-work/ ([https](https://www.whatwg.org/specs/web-apps/current-work/) result 301).
* http://zhongwencool.github.io/observer_cli with 1 occurrences migrated to:
  https://zhongwencool.github.io/observer_cli ([https](https://zhongwencool.github.io/observer_cli) result 301).
* http://developer.mozilla.org/en/docs/Canvas_tutorial:Drawing_shapes with 1 occurrences migrated to:
  https://developer.mozilla.org/en/docs/Canvas_tutorial:Drawing_shapes ([https](https://developer.mozilla.org/en/docs/Canvas_tutorial:Drawing_shapes) result 302).
* http://javascript.crockford.com/jsmin.html with 1 occurrences migrated to:
  https://javascript.crockford.com/jsmin.html ([https](https://javascript.crockford.com/jsmin.html) result 302).
* http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx with 2 occurrences migrated to:
  https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx ([https](https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx) result 302).
* http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context with 1 occurrences migrated to:
  https://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context ([https](https://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context) result 302).

# Ignored
These URLs were intentionally ignored.

* http://localhost with 2 occurrences
* http://localhost/ with 2 occurrences
* http://localhost:15672/ with 1 occurrences
* http://localhost:15672/api/channels?sort=message_stats.publish_details.rate&amp;sort_reverse=true&amp;columns=name,message_stats.publish_details.rate,message_stats.deliver_get_details.rate with 2 occurrences
* http://localhost:15672/api/exchanges/%2F/my-new-exchange with 4 occurrences
* http://localhost:15672/api/vhosts with 2 occurrences
* http://localhost:15672/api/vhosts/foo with 2 occurrences
2019-03-20 03:17:48 -05:00
Michael Klishin c57092db42 Add some tests for #665 2019-03-12 04:30:39 +03:00
Josh Soref b1b5213896 spelling: integer 2019-02-12 23:51:50 -05:00
Michael Klishin 4aaf086ebe Consume request body in full
Closes #657.
2019-02-11 02:49:04 +03:00
Jean-Sébastien Pédron a3cc3755a4 rabbit_mgmt_http_SUITE: Skip quorum queue tests if quorum queues are unsupported 2019-02-01 17:55:06 +01:00
Arnaud Cogoluègnes 7f41cc17fd Add consumer activity status column
[#163298456]

References rabbitmq/rabbitmq-server#1838
2019-01-24 10:53:30 +01:00
Arnaud Cogoluègnes 7b14a5b77d Add help and link to explain active consumer flag
[#163298456]

References rabbitmq/rabbitmq-server#1838
2019-01-18 15:49:54 +01:00
kjnilsson 1d24f05f60 fix consumer_created test setup 2019-01-17 16:26:10 +00:00
Arnaud Cogoluègnes 7f977fce14 Add column for single active consumer in consumers view
[#163089472]

References #649
2019-01-15 15:18:55 +01:00
Luke Bakken cadf37bff5 Modify test so generated ciphers are in the expected order 2018-12-31 12:04:48 -08:00
Michael Klishin 611341a50c Support cipher suites and more TLS listener options 2018-12-27 03:04:59 +03:00
Michael Klishin f235493955 Use more realistic hash values in tests
References #641.
2018-12-25 12:56:09 +03:00
Michael Klishin 6fbfab1449 declare user: support --hashing_algorithm, improve mandatory option formatting, more tests
References #641.
2018-12-25 12:49:28 +03:00
John W Higgins bb18616744 Allow for password_hash instead of password when declaring users 2018-12-24 12:01:47 -08:00
Michael Klishin 0432ec1369 Add a basic definition import case that includes a vhost connection limit param
References #628.
2018-11-23 19:05:06 +08:00
Daniil Fedotov 840f22d2e2 Add parameters to vhost definitions export/import.
There are more parameters than just policies and they were missing
from the vhost-specific definitions.

Fixes #628
[#161790576]
2018-11-22 11:17:58 +00:00
Michael Klishin 2fd3e8d3aa Merge pull request #626 from rabbitmq/plugin-disable-ordering
Test that listeners are removed from mnesia when web dispatch is disabled
2018-11-03 08:50:35 +03:00
Diana Corbacho 6cc71c8c22 Test that listeners are removed from mnesia when web dispatch is disabled
web dispatch and management have to be disabled in the right order
[#161558295]
2018-11-02 16:00:18 +00:00
Michael Klishin 39bbfd83e1 Configuration schema keys for CSP and HSTS
References #263, #264.

[#161584215]
2018-10-30 15:54:14 +03:00
kjnilsson 5c5b0dfad6 Ensure connection is closed for quorum queue test 2018-10-26 12:43:48 +01:00
Diana Corbacho f20374ada4 Test metrics removal on queue delete for quorum queues 2018-10-26 12:43:48 +01:00
Michael Klishin 62bb884f58 Support advanced Cowboy options via management.{tcp,ssl}.*
References #563.

[#156776853]
2018-10-22 16:36:27 +03:00
Michael Klishin 5b21ad09ef Introduce new configuration settings for separate TCP and TLS listeners
To make it possible to serve both HTTPS and HTTP-only clients at the same time.
Consistent with web-stomp and web-mqtt plugins.

References #563.

[#156776853]
2018-10-18 17:01:25 +03:00
Diana Corbacho d4f1752521 Add connection/queue/channel churn rates tests
[#160943831]
2018-10-09 15:35:50 +01:00
Gerhard Lazu a72baa5108 Add tests for /cli & /api redirects 2018-09-07 23:48:21 +01:00
Michael Klishin 16014616e2 Expose more Cowboy listener options in Cuttlefish schema
Part of #596.

[#159556318]
2018-08-06 20:32:23 +03:00
Michael Klishin d17ed87781 Expose more Cowboy listener options in Cuttlefish schema
Closes #596.

[#159556318]
2018-08-06 20:06:32 +03:00
Michael Klishin 1e475ae965 Expose more Cowboy listeners in Cuttlefish schema (WIP)
Part of #596.

[#159556318]
2018-08-06 13:40:29 +03:00
Michael Klishin ff41f7d91e Expose Cowboy listeners in Cuttlefish schema (WIP)
Part of #596.

[#159556318]
2018-08-06 09:20:11 +03:00
Michael Klishin 9e87cd6876 Switch management.login_session_timeout to minutes
Login session timeout in seconds doesn't really make sense.
2018-06-22 00:18:46 +03:00
Luke Bakken dc9810a45d Add test to config_schema_SUITE for new management.login_session_timeout setting 2018-06-21 07:48:57 -07:00
Daniil Fedotov 201fa7815e Make login session expiration configurable
Add new configuration parameter login_session_timeout.
Add login_session_timeout to whoami response.
Use it as an expiration timeout for auth cookie.

[#157940664]
2018-06-21 15:25:23 +01:00
Jean-Sébastien Pédron daf3811cdc rabbit_mgmt_http_SUITE: Percent-encode `^` in URLs
This character is neither reserved nor unreserved and thus is an unsafe
character according to RFC 1738 and RFC 3986. Therefore it should be
percent-encoded.

Many implementations accept and/or produce URLs with raw `^`. However,
the URI parser in Erlang 21 is strict and will refuse that character.
Therefore, we now percent-encode it in the testsuite.

[#157964874]
2018-06-12 11:39:20 +02:00
Jean-Sébastien Pédron 673c6135cf Use %2F instead of %2f to percent-encode the `/` vhost
The meaning is the same. However, the RFC recommends to use uppercase in
percent-encoded characters. Morever, the new URI normalization in Erlang
21 would transform the percent-encoded characters to uppercase.

And because our `rabbit_web_dispatch_util:relativise()` uses exact
matches, it will consider e.g `%2f` and `%2F` to be different
characters. Therefore when we use Erlang 21, the relative redirection
returned by the management plugin will be different than the one
returned with Erlang 20 if we use lowercase percent-encoded `/`.

Thus the easy fix is to use uppercase.

A better fix would be to improve `relativise()` and the testsuite to
compare percent-decoded components.

[#157964874]
2018-06-12 11:34:34 +02:00
Michael Klishin e00a5adb58 Update tests to fail in more informative ways
[#157817330]
2018-05-24 09:23:11 +01:00
Michael Klishin 5aba2e8221 Use assertEqual in rabbitmqadmin tests
Otherwise failures are not as informative.
References #568.
2018-05-04 04:53:56 -05:00
Michael Klishin 6dbf6686e6 Make sure import failures trigger Common Test failures
[#157045132]
2018-04-24 13:37:37 +02:00
Michael Klishin 83371434f5 Add a test case for #565.
[#157045132]
2018-04-24 13:21:26 +02:00
Michael Klishin 6be80e45a3 Don't depend on transient metrics; use the same counter as everywhere else 2018-03-08 01:40:58 +03:00
Michael Klishin ad1e5962ff Bump stats incremention timeouts 2018-03-07 19:57:29 +03:00
Michael Klishin 85697bd477 Support both python2 and python2.7 in this test 2018-03-07 19:56:54 +03:00
Michael Klishin 95f5426c83 Wait longer for stats here 2018-03-07 17:52:42 +03:00
Michael Klishin 60e76dfe31 Rework clustering_SUITE
* Use Erlang client connections more
 * Improve assertions
 * Allow for more time for stats emission
 * Improve naming
2018-03-07 09:37:12 +03:00
Michael Klishin b95502e71e Accept 201 and 204 responses 2018-03-07 06:46:31 +03:00
Michael Klishin e6285cb722 Don't mind leftover messages in this test 2018-03-07 06:45:42 +03:00
Michael Klishin ef06256914 Revert "Assert on consumer stats before closing the channel"
This reverts commit c751703441.

It wasn't the root cause of the failures.
2018-03-07 05:59:10 +03:00
Michael Klishin c751703441 Assert on consumer stats before closing the channel
Troubleshooting a Concourse failure.
2018-03-07 04:54:48 +03:00
Michael Klishin 29f05e08d3 Wait longer for stats refresh
Because underpowered Concourse workers.
2018-03-07 04:47:24 +03:00
Luke Bakken 9a97054e4a Ensure definition value is passed as proplist, not map
Fixes #552

Related to rabbitmq/rabbitmq-federation#67
2018-02-13 14:36:51 -08:00
Loïc Hoguin de014de9cb Remove unnecessary call to xmerl_ucs:from_utf8
This commit removes a call to xmerl_ucs:from_utf8 which was used
for two purposes: converting the binary payload into an Erlang
Unicode string (a list of integer code points), and validating
that the payload is indeed utf8.

The call was necessary when it was introduced because mochijson
only supported Unicode strings. Nowadays JSON libraries also
support utf8 binaries so converting is not necessary.

The function also starts by doing a binary_to_list/1 call which
creates a lot of garbage and can lead to OOM situations when the
queue is large. We ended up with the payload binary, the temporary
list and the final Unicode string in memory. With this patch we
only ever have the binary in memory and the memory consumption
is divided by more or less 3.

To validate that the payload is utf8 and keep the functionality
intact a small function was added that makes use of the /utf8
binary matching specifier.

Since this was the only xmerl function used in the management
plugin I have also removed xmerl from the LOCAL_DEPS.

I have added a test for the different encodings that can be
requested to make sure that nothing was broken when doing
the change.

(cherry picked from commit 6a08e3d1f8)
2018-02-06 21:13:51 +01:00
Michael Klishin ad79856f0b Add management.path_prefix to Cuttlefish schema
Closes #547.

[#154880285]
2018-02-02 17:27:00 +01:00
Michael Klishin de29085013 Update user tags when password is cleared
or not provided.

Fixes #533.

[#153436163]

(cherry picked from commit 47d08c5fc3)
2018-01-10 17:32:22 +03:00
Michael Klishin c636862e18 Definition import: coerce maps to proplists
Because rabbitmqctl set_global_parameter does.

Part of #528.

[#153990873]
2018-01-03 03:49:00 +08:00
Michael Klishin 86e64555a7 As of rabbitmq/rabbitmq-server#1459 amq.rabbitmq.log is no longer declared by default
(cherry picked from commit a9a9cb67cf)
2017-12-30 05:01:07 +08:00
Michael Klishin f99f9b489b rabbit_mgmt_http_SUITE: compute number of pages here
(cherry picked from commit 43e583d5df)
2017-12-30 04:37:34 +08:00
Michael Klishin 91b6b5e97b More rabbit_mgmt_http_SUITE stability improvements
* Ask the node how many objects there are total where we can
 * Wait for stats event propagation in more places

(cherry picked from commit b97dba53b8)
2017-12-30 04:14:06 +08:00
Michael Klishin d5e1f3a57e As of rabbitmq/rabbitmq-server#1459 amq.rabbitmq.log is no longer declared by default
The user has to opt-in.
2017-12-30 03:48:29 +08:00
Michael Klishin 1c612f5076 Give stats a chance to refresh in this test, too
(cherry picked from commit 4aa250c9f6)
2017-12-30 03:33:00 +08:00
Michael Klishin dd652e5808 Increase the margin some more 2017-11-05 01:47:45 +02:00
Michael Klishin eb597d9254 Allow for a safety marging in this fragile test 2017-11-04 06:21:17 +02:00
Michael Klishin bd305dbc3a Compile on OTP 20 2017-10-31 14:12:43 +03:00
Luke Bakken 61c7c53866 fixup 2017-10-30 18:19:57 -07:00
Luke Bakken dffde95b82 Merge branch 'stable' 2017-10-30 17:59:00 -07:00
Luke Bakken 2e49c203c1 Add path_prefix tests and fixup existing test suite to pass 2017-10-26 15:33:08 -07:00
Luke Bakken a9c91adcd3 Add new test group to run all tests with path_prefix setting 2017-10-26 15:33:07 -07:00
Daniil Fedotov 6ea84f7e19 Merge branch 'stable' 2017-10-26 17:11:19 +01:00
Daniil Fedotov 64b6473b78 Report unused memory in different color.
If `rss` or `allocator` memory calculation strategy is used,
show the unallocated and unused memory using other color then
system memory.
2017-10-25 16:45:56 +01:00
Michael Klishin e0efa5c1dc Merge branch 'stable'
Conflicts:
	priv/www/css/main.css
	priv/www/js/tmpl/paths.ejs
2017-10-19 01:07:34 +03:00
Michael Klishin 778e7f9dd5 Add CORS settings to Cuttlefish schema 2017-10-18 02:06:26 +03:00
Michael Klishin cd1a9964d5 Squash a couple of warnings 2017-10-17 16:55:33 +03:00
Michael Klishin 6f25d78681 Two more test cases 2017-09-28 09:31:20 +03:00
Michael Klishin 504da8c360 Initial definitions import test 2017-09-27 12:21:39 +03:00
Daniil Fedotov 7f54319279 API to restart a crashed vhost.
Administrator should be able to restart vhosts if they believe
it can be recovered.
Added buttons to vhost status tables and
the new HTTP API endpoint: /vhosts/:vhost/start/:node

Part of rabbitmq/rabbitmq-server#1321
[#149484305]
2017-08-04 11:34:39 +01:00
Michael Klishin 7928309de7 Ditto 2017-08-03 18:29:25 +03:00
Michael Klishin 1113095d49 Update test expectations 2017-08-03 16:59:51 +03:00
Michael Klishin a0ce2d5140 Grant administrators access to all policies, update test suite
References #461.
2017-08-02 19:29:26 +03:00
Michael Klishin fdb1cbf5d5 Authorize users tagged with 'administrator' can perform vhost-scoped operations
This way an administrator without any permissions can access every form
on pages such as user permission management. Some users and RabbitMQ team
members administrators should have unconditional access to all vhosts.

Closes #461 as well as a number of similar issues.
2017-08-01 18:31:19 +03:00
Michael Klishin ff67545867 Merge branch 'master' into rabbitmq-server-1303 2017-07-28 14:03:03 -07:00
Daniil Fedotov a9ba921d3f Test stopped queue deletion 2017-07-27 14:40:48 +01:00
kjnilsson 4fd5c4563e merge from master 2017-07-27 09:30:50 +01:00
kjnilsson f25f0c2e1d Change users bulk delete to use a deletion resource.
DELETE with a payload doesn't have prescribed semantics and at least
older version of the HTTP spec prescribe that the request uri should
full identify the resource to be deleted.

This change introduces a /users/bulk-delete resource to which we POST the
users that are to be deleted.

[#149484991]
2017-07-27 09:25:50 +01:00
Daniil Fedotov bf4ef76557 Test stopped queues in management. 2017-07-26 17:05:17 +01:00
Diana Corbacho ba383af81f Rename orphan -> without-permissions 2017-07-26 14:52:14 +02:00
Michael Klishin e9e46cd850 Merge branch 'master' into rabbitmq-management-447
Conflicts:
	src/rabbit_mgmt_wm_users.erl
	test/rabbit_mgmt_http_SUITE.erl
2017-07-26 15:40:48 +03:00
Diana Corbacho 8ace0f9909 Introduce an endpoint that lists orphaned users
rabbitmq-management#447
[#149484841]
2017-07-26 13:47:30 +02:00
Karl Nilsson 1c052baa40 Merge pull request #449 from rabbitmq/rabbitmq-management-446
Report down vhosts in UI
2017-07-25 18:39:24 +01:00
Michael Klishin 5002e77371 Merge pull request #450 from rabbitmq/rabbitmq-management-448
Introduce an endpoint for bulk delete users
2017-07-25 20:20:19 +03:00
Diana Corbacho 27f3e7eeac Test endpoint for bulk delete users
rabbitmq-management#448
[#149484991]
2017-07-25 17:52:36 +01:00
Diana Corbacho 89da9aa193 Fix tests that check vhost permissions
rabbitmq-management#444
2017-07-25 17:28:46 +01:00
Diana Corbacho 3fedc28c1f Introduce an endpoint for bulk delete users
rabbitmq-management#448
[#149484991]
2017-07-25 16:46:40 +01:00
Diana Corbacho c319bc23c6 Check vhost state on tests
rabbitmq-management#446
2017-07-25 14:10:44 +01:00
Michael Klishin cc4c5dca20 Merge branch 'stable'
Conflicts:
	src/rabbit_mgmt_db.erl
	src/rabbit_mgmt_wm_user.erl
	test/rabbit_mgmt_http_SUITE.erl
2017-07-22 13:48:35 +03:00
Luke Bakken f575deecf0 Merge pull request #442 from rabbitmq/rabbitmq-management-441
Allow permissions to be "preconfigured" when user is created
2017-07-20 14:37:41 -07:00
Michael Klishin 5737e884f0 Allow permissions to be "preconfigured" when user is created
Closes #441.

[Finishes #149174229]
2017-07-20 22:29:22 +03:00
Michael Klishin 2086756812 Merge pull request #436 from rabbitmq/rabbitmq-server-1294
Revert "rabbit_mgmt_http_SUITE: Comment out test on memory breakdow values"
2017-07-20 17:53:23 +03:00
Michael Klishin 74e507ab1e More tests for user creation 2017-07-20 14:29:54 +03:00
Michael Klishin 9a3db89902 Merge branch 'master' into rabbitmq-management-423
Conflicts:
	test/rabbit_mgmt_http_SUITE.erl
2017-07-19 20:53:01 +03:00
Michael Klishin d5bfc50c24 Don't use ports in --base-uri tests as test runner already specifies one
and that port is non-standard.
2017-07-19 19:34:57 +03:00
Michael Klishin 122525358c Don't use ports in --base-uri tests as test runner already specifies one
and that port is non-standard.
2017-07-19 19:34:16 +03:00
Michael Klishin 2ef40ad07c Merge branch 'stable'
Conflicts:
	test/rabbit_mgmt_http_SUITE.erl
2017-07-19 04:25:39 +03:00
Michael Klishin bd0397ff5d rabbitmqadmin: add --base-uri
When specified, hostname, port, username and password
are taken from the URI. URI path is intentionally ignored
because AMQP(S) URIs use path to configure target virtual host
but HTTP APIs typically use URI paths to specify an endpoint
prefix (--path-prefix in rabbitmqadmin).

To avoid confusion we log a warning and ask the user to
specify --vhost and/or --path-prefix explicitly.

Closes #437.
2017-07-19 01:01:53 +03:00
Daniil Fedotov dfcb144b17 Revert "rabbit_mgmt_http_SUITE: Comment out test on memory breakdown values"
This reverts commit ed1c106a39.
The assertion can be uncommented because the bug has been fixed.
[related to rabbitmq/rabbitmq-server#1294]
[#149066379]
2017-07-18 12:44:42 +01:00
Karl Nilsson 4456b6afea Merge pull request #435 from rabbitmq/rabbitmq-management-383
Allow users w/o password or password hash to be created
2017-07-18 09:43:15 +01:00
Jean-Sébastien Pédron d90a441d25 Merge branch 'stable' 2017-07-18 10:16:39 +02:00
Jean-Sébastien Pédron ed1c106a39 rabbit_mgmt_http_SUITE: Comment out test on memory breakdown values
This is a temporary measure.

Since rabbitmq/rabbitmq-server@0872a15a05,
`total` has no relationship with the other counters: total is the
resident memory footprint of the OS process (so pages in physical
memory), but the other counters are based on what was actually
allocated. Those counters should be compared to the total reported by
erlang:memory() instead.
2017-07-18 10:12:51 +02:00
Jean-Sébastien Pédron 00eda66815 rabbit_mgmt_http_SUITE: Use spaces to indent 2017-07-18 10:04:38 +02:00
Michael Klishin 49a9bb93a7 Allow users w/o password or password hash to be created
* This is a valid case for environments where external
   authn mechanisms (x509 certificates) or backends (e.g. HTTP) are used.
 * We already allow this for existing users.

Closes #383.
2017-07-17 18:56:23 +03:00
Luke Bakken 47b70d8a8a Add TODO for queue limit validation
Validation code in place, how to display?

Take existing queue count into consideration

Server-side validation takes existing queue count into consideration. Improve error message sent back to web application.

Improve messaging, remove unused template

Take existing queues into account when importing definitions for all vhosts. Fix test suite.
2017-07-10 07:58:34 -07:00
Jean-Sébastien Pédron 7e8b67feed Merge branch 'stable' 2017-07-10 12:00:56 +02:00
Jean-Sébastien Pédron 142c5e90c4 rabbit_mgmt_http_SUITE: Wait in a loop for the connection to disappear
... instead of polling it once after 200 ms. This was failing from time
to time because of that timer:sleep() was sometimes too short.

Signed-off-by: Karl Nilsson <knilsson@pivotal.io>
2017-07-10 11:52:03 +02:00
Michael Klishin b7b324e213 Adapt this test for master (maps and all) 2017-06-19 23:59:34 +03:00
Michael Klishin 3dc76ea712 Merge branch 'stable' 2017-06-19 18:41:26 +03:00
Gabriele Santomaggio ca12fae27c Add unit test for columns filter with pagination 2017-06-19 11:39:53 +02:00
Daniil Fedotov acb7703910 Use rabbit_mgmt_format:args_hash to get args hash in bindings API and in tests.
args_hash changed in 3.7 to avoid incompatibilities in term_to_binary
2017-06-13 15:35:34 +01:00
Michael Klishin 632b51801a Merge branch 'master' into rabbitmq-management-405 2017-06-06 20:22:15 +03:00
Diana Corbacho bc76cff78c Manage topic permissions from the UI in user and vhost tabs
Added endpoint /topic-permissions/:vhost/:user/:exchange to
delete individual permissions

rabbitmq-management#405
[#146603709]
2017-06-05 19:20:29 +01:00
Daniil Fedotov 14d7805f1a Merge branch 'stable' 2017-05-31 14:28:12 +01:00
Daniil Fedotov adef9990ba Follow up to db928bceb5
Do not assume args hash in tests, because different erlang versions can
generate different hashes.
2017-05-31 14:25:31 +01:00
Daniil Fedotov d8e41a0083 Remove cleanup of non-existent option.
conn option is not added anywhere in the test suite.
OTP-20 tests will fail if end_per_testcase fails.
2017-05-31 14:01:54 +01:00
Daniil Fedotov db928bceb5 Do not assume bindings args hash in test.
Bindings args hash is using term_to_binary, which can change from
version to version in Erlang.
2017-05-31 13:40:59 +01:00
Daniil Fedotov f2b29af708 Do not assume bindings args hash in test.
Bindings args hash is using term_to_binary, which can change from
version to version in Erlang.
2017-05-31 12:07:22 +01:00
Daniil Fedotov 995fd236c8 Remove failing end_per_testcase clause.
There is no `conn` setting in test config, so `close_connection` will fail.
In Erlang-20 testsuite will fail if end_per_testcase fails.
2017-05-31 11:31:44 +01:00
Michael Klishin 4fa752acb6 Remove a few redundant includes 2017-05-09 13:34:50 +03:00
Michael Klishin 4adecc359f Merge branch 'stable'
Conflicts:
	src/rabbit_mgmt_util.erl
	src/rabbit_mgmt_wm_cluster_name.erl
	src/rabbit_mgmt_wm_global_parameter.erl
	src/rabbit_mgmt_wm_permission.erl
	src/rabbit_mgmt_wm_policy.erl
	src/rabbit_mgmt_wm_queue_get.erl
	src/rabbit_mgmt_wm_user.erl
	src/rabbit_mgmt_wm_vhost.erl
2017-05-09 13:22:22 +03:00
Michael Klishin 489edbffa9 Merge pull request #391 from rabbitmq/rabbitmq-management-377
Ensure cowboy Req is returned from `with_decode`
2017-05-04 10:38:40 +02:00
Jean-Sébastien Pédron a5afa86728 test/*_SUITE.erl: Include amqp_client.hrl in various testsuites
This header is required for its `amqp_msg` record.

rabbit_framing.hrl should be included too, for all the AMQP method
records, but it is already included from amqp_client.hrl and
rabbit_framing.hrl doesn't protect itself against multiple inclusions.

This commit fixes the build of the testsuite after the move of
rabbit_mgmt_test.hrl to rabbitmq-ct-helpers.
2017-05-04 10:32:46 +02:00
kjnilsson e36d77de72 Ensure cowboy Req is returned from `with_decode`
Reversing initial fix in 47a5ea7b1c

Usages of `with_decode` closed over the ReqData and returned the
instance before the bode decode. This had the effect of causing an error
after a  POST or PUT request had been issues on the same keep-alive
connection.
2017-05-04 08:09:39 +01:00
Daniil Fedotov 0ba32c914d Post-merge fixes 2017-05-03 13:55:45 +01:00
Daniil Fedotov 8cbffc8561 Merge branch 'stable' 2017-05-03 11:38:38 +01:00
Michael Klishin f64f808b7b Merge branch 'rabbitmq-management-384' into stable 2017-04-30 23:19:57 +02:00
Diana Corbacho d567370d56 Calculate average time per operation samples and averages
Samples didn't match averages as were reporting total times. Also,
rates do not make sense on time per operation so are all replaced
by the average.

rabbitmq-management#384
[#144393857]
2017-04-28 14:30:05 +01:00
Daniil Fedotov d0766f9a17 Move rabbit_mgmt_test_util to rabbitmq_ct_helpers to use in mgmg plugins tests 2017-04-28 12:42:21 +01:00
Michael Klishin b6982875de Merge branch 'stable' 2017-04-02 22:01:27 +03:00
Michael Klishin e5c921b4ae (c) year 2017-04-02 21:48:21 +03:00
Michael Klishin d3934be04b Merge branch 'stable'
Conflicts:
	src/rabbit_mgmt_util.erl
2017-03-24 22:21:03 +03:00
Alexey Lebedeff d61078d6d6 Add support for non-JSON encoding of replies
One of the low-hanging fruits in HTTP API optimization.
E.g. serializing information about 10000 queues:
- For JSON it takes 2 seconds on my machine and more than 1GB of RAM
- For BERT it takes 0.2 seconds and negligible amount of RAM
2017-03-24 11:57:03 +03:00
Daniil Fedotov 7845e06794 Config schema test for plugin
Part of [#141481501]
Moved from rabbitmq-server
2017-03-17 11:08:34 +00:00
kjnilsson 256563afb7 merge from stable 2017-03-02 16:23:23 +00:00
kjnilsson cb1d504128 Fix timing dependent test
[#140662033]
2017-03-01 15:14:28 +00:00
Jean-Sébastien Pédron 413ebdf92d Merge branch 'stable' 2017-02-24 11:03:34 +01:00
Jean-Sébastien Pédron 9118370dad cache_SUITE: Set log messages importance to ?LOW_IMPORTANCE 2017-02-24 11:00:17 +01:00
Jean-Sébastien Pédron a54bd12032 rabbit_mgmt_rabbitmqadmin_SUITE: Hard-code UTF-8-encoded queue name
... instead of using binary_to_list() on <<<"ööö"/utf8>>.

Erlang R16B03 took the "ö" individual bytes (from the two-byte encoded
UTF-8 character) and converted them to UTF-8. The queue was created with
the correct name because the correct UTF-8 string was passed to Python
and later to the management API. But because of the wrong conversion of
the expected queue name, the verification failed.
2017-02-24 10:48:30 +01:00
Michael Klishin 22d494463f Merge branch 'stable' 2017-02-07 16:33:44 +03:00
Gabriele Santomaggio 6be009edef Add unicode test for list queues 2017-02-07 12:10:11 +01:00
Michael Klishin 76a54f03f3 Merge pull request #333 from rabbitmq/rabbitmq-server-1085
Add read to topic permissions
2017-02-06 01:22:39 +03:00
Diana Corbacho 8e65173f4c Merge branch 'stable' 2017-02-02 12:10:13 +00:00
Gerhard Lazu 9cdca8a949 Merge pull request #342 from rabbitmq/rabbitmq-management-341
Report empty channel details if the information is missing during deletion
2017-02-02 11:43:18 +00:00
Diana Corbacho c27c14f19b Report empty channel details if the information is missing during deletion 2017-02-02 11:28:50 +00:00
Michael Klishin 82f38ce980 Provide no options to JSX just like we did here before 2017-02-01 18:11:45 +03:00
Michael Klishin e0cab9a540 A typo 2017-02-01 18:07:54 +03:00
Michael Klishin 0bb7ed6aea Switch to rabbit_json:decode/1 2017-02-01 17:53:32 +03:00
Michael Klishin a12dc17289 latin1 is sufficient (and safer) here 2017-02-01 16:07:43 +03:00
Michael Klishin 021b909fb9 merge branch 'master' 2017-02-01 15:42:06 +03:00
Jean-Sébastien Pédron 8cfa914395 rabbit_mgmt_http_SUITE: Fix incorrectly encoded URLs
`>` is unallowed in URI path segments according to RFC 3986. This
character must be percent-encoded.

Newer versions of Cowboy are stricter about this.

[#136779967]

(cherry picked from commit 85128761eb)
2017-02-01 12:45:07 +01:00
Jean-Sébastien Pédron 87e64f448a rabbit_mgmt_http_SUITE: Fix include directive
We must use `-include().` for a local file, not `-include_lib().`. Also,
fix the path to the header itself.

Reported by Syntastic.

(cherry picked from commit e09f94efc9)
2017-02-01 12:41:53 +01:00
Jean-Sébastien Pédron 85128761eb rabbit_mgmt_http_SUITE: Fix incorrectly encoded URLs
`>` is unallowed in URI path segments according to RFC 3986. This
character must be percent-encoded.

Newer versions of Cowboy are stricter about this.

[#136779967]
2017-02-01 12:25:11 +01:00
Jean-Sébastien Pédron 54df36fdc9 rabbit_mgmt_http_SUITE: rabbit_misc:pget/3 is unused
Reported by Syntastic.
2017-02-01 12:24:56 +01:00
Jean-Sébastien Pédron e09f94efc9 rabbit_mgmt_http_SUITE: Fix include directive
We must use `-include().` for a local file, not `-include_lib().`. Also,
fix the path to the header itself.

Reported by Syntastic.
2017-02-01 12:24:52 +01:00
Arnaud Cogoluègnes d9e0bb2dd9 Merge branch 'master' into rabbitmq-server-1085 2017-01-31 17:26:28 +01:00
Gabriele Santomaggio a5b1c8ffcb Replace the native call jsx with rabbit_json 2017-01-26 15:10:41 +01:00
Gabriele Santomaggio 60be1da071 Change latin1 to utf8 2017-01-26 14:31:43 +01:00
Gabriele Santomaggio b701f29ad1 Change the calls that uses the rabbit_json module
See :https://github.com/rabbitmq/rabbitmq-common/issues/164
2017-01-25 17:33:07 +01:00
Michael Klishin 1ad99a2f1b Merge branch 'stable'
Conflicts:
	src/rabbit_mgmt_wm_user.erl
	test/rabbit_mgmt_http_SUITE.erl
2017-01-24 01:01:16 +03:00
Arnaud Cogoluègnes 82dc7b950e Add read to topic permissions
Part of rabbitmq/rabbitmq-server#1085
2017-01-23 11:04:11 +01:00
Michael Klishin 6cefc447fa Test listing exchanges 2017-01-20 20:16:30 +03:00
Michael Klishin a6fa8a3c12 Merge branch 'master' into rabbitmq-event-exchange-10 2017-01-17 20:28:11 +03:00
Daniil Fedotov fe5cb85b36 Use cleaner vhost limit listing API 2017-01-17 13:04:06 +00:00
Diana Corbacho f6b67bbb21 Pass username from HTTP requests to all entities that notify events 2017-01-15 21:01:31 +00:00
Michael Klishin e6123b7782 Merge pull request #316 from rabbitmq/rabbitmq-server-505
Add topic permissions endpoints
2017-01-13 15:07:04 +03:00
Gabriele Santomaggio 122c38faa0 Change JSON format for Limits API 2017-01-12 17:58:39 +01:00
Michael Klishin 24fab88db4 Merge branch 'master' into rabbitmq-server-505 2017-01-12 12:58:35 +03:00
Michael Klishin 476ed02f55 More tests 2017-01-09 19:06:58 +08:00
Michael Klishin bfa7a766ec Wire credential validation into PUT /api/users/{user}; fix a bug as a drive-by
Previously when no password or password hash were provided, a user with
generated credentials was created with the intent to later update
the user's credentials. Should anything fail after that, the user record
would be "leaked." The tests we had turned a blind eye on that scenario.
2017-01-09 18:41:47 +08:00
Arnaud Cogoluègnes 73e34e707f Use exchange instead of name in topic permission
References rabbitmq/rabbitmq-server#505
2017-01-03 12:15:26 +01:00
Michael Klishin 3bf0f02306 Switch operator policies and vhost limit endpoints to use dashes
Like we already do with aliveness-check and a few other things.
These endpoints are new in 3.7.0/master and we should unify them while
we can.

Per suggestion from @acogoluegnes.

References rabbitmq/rabbitmq-server#500, rabbitmq/rabbitmq-server#501,
rabbitmq/rabbitmq-server#930.
2017-01-03 18:58:18 +08:00
Arnaud Cogoluègnes aecb9b5470 Add topic permissions endpoints
References rabbitmq/rabbitmq-server#505
2016-12-27 12:18:23 +01:00
Arnaud Cogoluègnes 6869be6543 Merge branch 'stable'
Conflicts:
	src/rabbit_mgmt_util.erl
	test/rabbit_mgmt_http_SUITE.erl
2016-12-16 11:37:42 +01:00
Arnaud Cogoluègnes d4a5ca2ab1 Fix global parameters test
References rabbitmq/rabbitmq-mqtt#73
2016-12-14 16:25:34 +01:00
Arnaud Cogoluègnes 0e97a331ff Support global parameters in HTTP API
Part of rabbitmq/rabbitmq-mqtt-73.
2016-12-14 12:18:52 +01:00
Jean-Sébastien Pédron bd59e8ed61 Merge branch 'stable' 2016-12-08 17:06:35 +01:00
Jean-Sébastien Pédron 0b43d76365 rabbit_mgmt_test_db_SUITE: Double first timer in queue_coarse_test()
It is an arbitrary factor but it makes CI happy.
2016-12-08 17:04:27 +01:00
Jean-Sébastien Pédron 8070e8ca8a Merge branch 'stable' 2016-12-08 10:12:14 +01:00
Diana Corbacho 5f1e0a3103 Merge remote-tracking branch 'origin/rabbitmq-management-236' 2016-12-05 17:18:57 +00:00
kjnilsson cb2ae13d04 reset collector old_aggr_stats after each tests in clustering_SUITE 2016-12-02 12:36:56 +00:00
kjnilsson 9ac32d3be6 Test tidy up 2016-11-30 12:35:57 +00:00
Michael Klishin cc70930bd7 Merge pull request #303 from rabbitmq/rabbitmq-management-301
Fix CORS preflight requests
2016-11-29 16:41:46 +03:00
Loïc Hoguin 16e023000e Fix CORS preflight requests
Credentials are never sent with preflight requests, and preflight
requests are only accepted if they return successfully (eg 200).
We returned a 401 when credentials were missing so browsers rejected
the response.
2016-11-29 14:20:25 +01:00
kjnilsson b43169db94 Move collectors and related modules to rabbitmq_management_agent 2016-11-29 13:16:13 +00:00
Loïc Hoguin 15192b6978 Fix CORS preflight requests
Credentials are never sent with preflight requests, and preflight
requests are only accepted if they return successfully (eg 200).
We returned a 401 when credentials were missing so browsers rejected
the response.
2016-11-29 13:47:50 +01:00
kjnilsson 643ced5f15 Tidy up removal of the old_aggr_stats table 2016-11-25 12:06:26 +00:00
kjnilsson 7a3a2ef89b Reduce GC operations by keeping the old stats in each collector
process instead of ETS.
2016-11-25 11:22:43 +00:00
Loïc Hoguin 50977a15cd Rename mochiweb_util 2016-11-24 16:27:13 +01:00
kjnilsson dcf0a407de Increase range for mgmt_test_db time-sensitive tests 2016-11-23 14:41:09 +00:00
kjnilsson 4f445a400e Fix issue where the slide would occasionally zero pad incorrectly 2016-11-23 14:41:09 +00:00
kjnilsson 9394a08ca4 Delay slide summing until formatting to avoid normalizing twice. Now uses ceil as only normalization strategy.
Dialyzer fixes and refactoring
2016-11-23 14:41:09 +00:00
kjnilsson fba335de39 Set last timestamp when summing slides 2016-11-23 14:40:40 +00:00
kjnilsson ce5f699d0c Ensure drop expansion is bounded 2016-11-23 14:40:40 +00:00
kjnilsson bab9beeb3d Padding fixes and test adjustments 2016-11-23 14:40:40 +00:00
kjnilsson 2f96ab8236 Remove problematic clause from maybe_add_last_sample 2016-11-23 14:40:40 +00:00
kjnilsson 4f4064c589 exometer_slide:to_list should realise the last sample 2016-11-23 14:40:18 +00:00
kjnilsson 41d507d550 Fix issue with summing non-incremental slides as well as recording the first timestamp
Don't arbitrarily extend the query range
2016-11-23 14:40:05 +00:00
kjnilsson 7f7d489561 Solidify the behaviour of exometer_slide:to_normalized_list to only pad values that are possible to deduce.
Dialyzer fixes
2016-11-23 14:40:05 +00:00
kjnilsson e8655442b4 Refactor exometer_slide:normalize into to_normalized_list 2016-11-23 14:40:05 +00:00
Diana Corbacho 8561c18146 Make rabbit_mgmt_stats time independent 2016-11-23 14:40:05 +00:00
Diana Corbacho b1af85530a Remove unused code, simplify tests 2016-11-23 14:40:05 +00:00
Diana Corbacho df23b1f001 Fix sliding window 2016-11-23 14:40:05 +00:00
Diana Corbacho 80c289462d Fill with zeros samples previous to the beginning of the slide 2016-11-23 14:40:05 +00:00
kjnilsson c685b9b54c exometer_slide fixes 2016-11-23 14:39:47 +00:00
Diana Corbacho 35085496e0 Verify increment is all 0s before applying drop 2016-11-23 14:39:47 +00:00
Diana Corbacho c3cfc4ace4 More exometer:foldl fixes. Run parallel tests in parallel 2016-11-23 14:39:47 +00:00
kjnilsson 3ac4cb80a5 exometer_slide:foldl fixes 2016-11-23 14:39:47 +00:00