Commit Graph

54 Commits

Author SHA1 Message Date
Andreas Jaeger 8c881bcbe5 Retire repository
See
http://lists.openstack.org/pipermail/openstack-discuss/2019-July/007708.html

Change-Id: If97f10290c16903d550c66163b082bd23357fca2
2020-05-08 13:51:25 +02:00
Michael Dong 8930d98a26 Custom root configuration option
Instead of syntribos taking in ``--custom_install_root` during init and
``--syntribos-custom_root`` during run, which sometimes led to the custom root
option not being set correctly, the redundant config options have been
deprecated.

Change-Id: I95f4d345fe8a8608ff6d1daaf06ff49912917a3f
2018-12-10 16:03:19 -06:00
Michael Dong 6cf7bdab87 Bug fixes and error message updates
Fixes:
1) Crashes in runner and file_utils
2) Binary strings being read in as payloads

Updates:
1) Clarified error messages in parser
2) Confusing variable names in test cases vs issues

Adds:
1) A `syntribos root` CLI sub command to display the current syntribos root dir

Change-Id: I22edf7a1f3d39724522aee88d08b00d299b67248
2018-11-28 12:32:24 -06:00
Michael Dong feb3a59c95 YAML support, basicauth extension, bugfixes
1) Allows for YAML body in request templates. If a content-type
    is specified for a request template, Syntribos will validate the
    body against the header. This is to prevent templates from silently
    failing to parse and sending unintended data to the target.
 2) Added extension to support basicauth
 3) Lowered confidence ratings for various tests

Change-Id: I672b0e0aa3da1aa6dd7e9a8456da73f0a15759b7
2018-10-09 15:55:53 -05:00
Michael Dong c4586a374b Improve performance by multithreading test calls
This change:
1) rewrites the runner to spawn a thread pool for each template
   and assigns a worker for each test case
2) makes the output colorized by default
3) makes minor changes to the output

Change-Id: I49906f5daaa339ca9429913680203c762a0ad9fe
2017-09-18 13:23:00 -05:00
Ngo Quoc Cuong 1f1b7be594 Remove translation of log messages
The i18n team has decided not to translate the logs because it
seems like it not very useful; operators prefer to have them in
English so that they can search for those strings on the internet.

Change-Id: I84b1a2397f424430ed332aa7d4d874379abd0357
2017-06-16 15:42:45 +07:00
Rahul Nair 5787563d80 Changing default template URL
As the templates have been moved to official repo, changing the
default URL in config to reflect the same.

Change-Id: If1050470947248f6c46a33bcaf1054dad3431b62
2017-03-14 16:31:49 -05:00
Rahul Nair 38eb9f2a77 Adding i18n support to Syntribos
Adding i18n support to syntribos log messages and prompts.

Change-Id: If9914447ccbf3ac2f9c88c3460756f4b682630ec
2017-03-13 01:51:50 -05:00
Jenkins abc1f50c04 Merge "Bug fix for user defined tests" 2016-12-06 22:03:51 +00:00
Rahul Nair 1c7804a5c5 Changing payload URI to official one
As payloads have been uploaded to the official repo, this change
updates the remote uri for payloads.

Change-Id: I074f1568e17e3b6192c439f1fcb3de98095ba351
2016-12-06 12:20:20 -06:00
Rahul Nair 7ec6d7450f Bug fix for user defined tests
A bug was introduced in the user defined test, this change attempts
to fix it.

Change-Id: I29d4af97e89bab3245f3a3b1c75519023f0ca43e
2016-12-06 11:49:53 -06:00
Rahul Nair fb7320a8d9 Bug fix
Recent changes in exception handling, introduced a bug, this patch
fixes it.

Change-Id: I840122ede269ada2fac2aa2b812531d36975759e
2016-11-30 17:21:11 -06:00
Rahul Nair 94d0205b8e Pylint changes update
Updated the enabled tests and edited set of files to pass present
enabled tests.

Change-Id: I369166bacbd816b4d85732d476158468ed271d49
2016-11-22 16:10:50 -06:00
Jenkins 8757ff2234 Merge "Better exception messages" 2016-11-21 23:43:59 +00:00
Rahul Nair d44f0e58d6 Better exception messages
Messages displayed for some exceptions are too vague and have
stack traces, cleaning up a few messages and the way they are
handled.

Change-Id: I7b134844e8a9cfa21a119cd5b5b6c37871d0381a
2016-11-21 20:06:59 +00:00
Rahul Nair f5d039f765 Adding ability to do User defined fuzz test
During the first set of tests we did, it became clear that we
would need a way to test specific user provided string and check
them against user defined failure keys.

This test adds that functionality to the suite.

Change-Id: I53833c2ab11813d746d9fc97355adaf51eb6096e
2016-11-15 15:05:43 -06:00
michael.dong@rackspace.com 46d5ba400b Introduced payload and template downloading
Syntribos now downloads payloads as part of the initialization process, and
also can download payloads and templates as part of the 'syntribos download'
command.

Change-Id: I17501535e5fd341c2705e07e3797643dc2d4a7df
2016-10-28 14:42:12 -05:00
Charles Neill 18781c37cd Add additional runner and env utils tests
Adds several tests to exercise more of runner and the env utils.

Makes several modifications to config.py, runner.py, and utils/env.py,
with the aim of making them more testable.

Change-Id: I708df9e5315f3dadd028c8107ac6416c707e90a0
Closes-Bug: #1634296
2016-10-26 19:43:33 -05:00
Charles Neill dabac296a7 Creates syntribos 'init' command
This command will set up the basics needed for a syntribos environment
(i.e. template folder, payload folder, log folder, default config file)

Some modifications have also been made to Runner to facilitate these
changes. These changes will (hopefully) allow us to better unit test
components of the runner.

Change-Id: I001e798b89539468cfbd92d5df301f7e59f1f33d
2016-10-26 17:44:15 -05:00
Rahul Nair 8faed09ebe Fixing unicode error
When syntribos attempts to download templates, it fails with
unicode error. This patch fixes it.

Closes-Bug: #1636609

Change-Id: Id62e9ed70d1b4501fe531587947c1f6d88bf034a
2016-10-26 17:33:27 -05:00
Vinay Potluri 34091d3599 Changing payloads_dir to payloads
Changing the payloads_dir variable to payloads

Change-Id: I55ae283d1b4b92d397c1cd85acd7c88f9bbe87fd
2016-10-26 02:04:28 +00:00
Rahul Nair b7b925cf4d Loading payload from remote URI
POC on loading payloads using remote URI. This is part of a larger
effort in packaging syntribos to ensure that the project would
work without much configuration post install from pypi.

Change-Id: Id61e840d4f49d5b6deb72bce2e8bcc0e1096fa52
2016-10-25 10:28:25 -05:00
Rahul Nair 0e116be551 Documentation updates and styling changes
Updates to the syntribos official docs to reflect the present
state of the tool and also few styling changes.

Adding details about different tests
Fixing headings
Fixing typos
Adding links to source code and documentation

Change-Id: I99be3d150db72e88cdc9dcaf08668df7c831fec6
2016-10-24 12:47:19 -05:00
Luong Anh Tuan 0d1d7b4436 TrivialFix: Remove default=None when set value in Config
By default oslo.cfg sets the default values as None [1], There is
no need to explicitly do this.

[1] https://github.com/openstack/oslo.config/blob/master/oslo_config/cfg.py#L829

Change-Id: I22481e64c262d59fb78eb7c040f95d3fb211ccee
2016-09-27 11:30:30 +07:00
Rahul Nair 69c06f1644 Minor changes to memoize
Modifying memoize to accept user defined ttl from config and
changing the way unique id is calculated.

Change-Id: Icda4e105bb9ead8edeaef089b677a83d1fa6f9d4
2016-09-09 19:58:37 -05:00
Rahul Nair 1740edacd4 Adding capability to retrieve scoped tokens
Services other than OpenStack requires scoped tokens.
Added methods to retrieve scoped tokens from keystone.

Change-Id: I171beabf62de3e27f13906bcd6e193ccc71e6c9d
2016-09-02 13:43:57 -05:00
Charles Neill af7d10c305 Adds relative paths for templates
This change allows us to keep track of what subdirectory a template is
in relative to the templates root (e.g. admin/test.template),
rather than just the filename (test.template)

Change-Id: I884f5e4eef9b4d58e80d02a1e33c1ca5b463bf40
2016-08-29 16:39:17 -05:00
michael.dong@rackspace.com 4876101b55 Added config file improvements
1) renamed "user" section for clarity
2) Added option to exclude defect type from output
3) modified default time_diff_percentage and length_diff_percentage values
4) added sample default values to config for oslo-config-generator

Change-Id: I4f88c255f8d4e6edfe3df3a4e463aee0cdd9c26b
2016-08-26 17:46:54 -05:00
Jenkins 6ba669eefe Merge "Adding sub commands to Syntribos" 2016-08-16 22:38:43 +00:00
Jenkins f820a158ba Merge "Overwriting config options from CLI" 2016-08-16 21:58:31 +00:00
Rahul Nair d3123057c3 Adding sub commands to Syntribos
This change adds some commands to syntribos

sub commands:

- list_tests
- run
- dry_run

Also, refactoring runner.py and added utils/cli.py
to add all utility methods used for cli output.
Change-Id: Ieed2e06e0fb6eec34be640ae1db86785403546df
2016-08-16 16:15:14 -05:00
Vinay Potluri 89372255f9 Overwriting config options from CLI
Overwriting config values with command line arguments for templates and
payload directory

Change-Id: Ief0b1374f50086012c5b1bbae43bcd08be1f7304
2016-08-16 13:38:11 -05:00
zhangyanxian 8174930cd4 Another patch to fix the typo
Change-Id: I580230e036f156577e559118ba5c6a48dbdbd921
2016-08-16 02:23:57 +00:00
Rahul Nair ea1021f657 Logger not registered bug fixed
As logger was not getting registered before config options
were parsed, the call to logger in the exception handling
block on config.py failed with the error message "no handler
found", when it was unable to read the config file,
this fix resolves it.

Change-Id: I8001141d061adc6dd9d3bca4b3e8930309252163
Closes-Bug: #1610752
2016-08-07 18:52:52 -05:00
Rahul Nair 0009bf49ce Adding unique_id to tests
Adding a simple counter based id to tests to track them in debug
log and results log. Also, this patch improves the result output
like adding a progress bar and uniform test names..

Change-Id: Ib83181b25a0c18c7993f491cde98d73555b01404
2016-08-04 20:22:17 +00:00
Aastha Dixit d7d6d477ed List available test types in --help output
Change-Id: I1feac23ea3f1569cf572891d99b9f325e16b6094
2016-07-30 16:08:13 +00:00
Rahul Nair 8c0b3bd948 Adding request/response content compression
Adding request/response content compression and
modifying the print_log method to display the update log_dir

This is part of the change to update th overall structure of the
debug log. Adding a logger options to config.

Added compression to request params and headers as well, this has
helped in reducing avg log size to abt 50 percent, without loss of
information.

Updated config file to reflect this change
Change-Id: Ifac7a671607945a4ca15d2e87b28b4b2718f0ee1
2016-07-25 18:36:23 -05:00
Rahul Nair ce1bfbdfc4 Changing debug log format
This is part of multiple patches to change the way we do
debug logging.

comments on some of the changes:
base_http_client looks cluttered with the debug_log decorator
and the HttpClient class, so split it into two and now the
logger is in its on file.

Change-Id: I49faa0a0ab92b25446e5047dfa039ecbdf400b6a
2016-07-20 17:00:20 -05:00
Jenkins 009c19dbde Merge "added CLI option to exclude tests from runner" 2016-07-19 17:12:42 +00:00
Rahul Nair 17f35e72d5 Adding missing checks
Added max_length check to length check

Change-Id: I3f9aed8e132ec160b0b1f3e8fb320852ca3db0d4
2016-07-18 18:44:55 -05:00
michael.dong@rackspace.com eb4d01d766 Refactored Auth test
Significantly refactored test for improper authorization checks to match the
new style of tests.

Change-Id: Idfcb2a995857b4be0aaf5d78c06b546751062c8f
2016-07-18 21:53:13 +00:00
michael.dong@rackspace.com 55efe61f98 added CLI option to exclude tests from runner
-e, --excluded-types is now a CLI option to do the opposite of -t. That is,
syntribos -e SQL will now exclude all SQL injection tests from being run.

Change-Id: I2f9a0da9792e17bfb8777e9497fc9c5dcbfe9660
2016-07-18 15:07:52 -05:00
michael.dong@rackspace.com 77699b1f96 Removed openCAFE dependencies from identity extension
Change-Id: Iec38c57673b1b48818c26ae2ff19ba81c9057d1f
2016-07-18 14:58:15 -05:00
Charles Neill a8a9ac6e37 Converting to oslo.config for configuration
- Merges arguments.py and and existing config.py files into one file
- Removes dependencies on cafe.* config file / CLI parsing
- Adds "register_opts" to BTC to allow Tests to specify config options
- Moves us completely from cclogging to Python logging

Change-Id: I0d4a84563d54307c94c0064be429919f9d91d67b
2016-07-11 11:52:51 -05:00
Charles Neill 679cfd5d2f Docstrings for more Syntribos components
Adding a few more docstrings, populating code-docs page, modifying
Sphinx documentation generation.

Implements: blueprint docstring-add-to-framework
Change-Id: I9506c9fdeab19d9b4bf52ee3a51c27e38476e82e
2016-05-02 17:00:24 -05:00
Charles Neill 921157a4d6 Change license from block quotes to '#'s (Sphinx)
We are currently using block quotes for license comments, which means
that Sphinx pulls this into every module, which is bad. Hash-prefixed
comments for licenses seem to be the standard for OpenStack as well.

Change-Id: Iabc60228c1201a960f672e1b0c7ab3c5312c9d8e
Implements: blueprint docstring-add-to-framework
2016-04-14 18:17:40 -05:00
Charles Neill 9eca39e127 Updating doc strings for core pieces of Syntribos
This PR adds docstrings to a number of important components of
Syntribos, and adds this documentation to our Sphinx doc structure. It
also removes copyrights from __init__.py files with no other content,
in line with OpenStack style guidelines.

Set 2: Fixed PEP8 failure.

Change-Id: Ic57b31f451ec3ecf7f5b308da4544f808c9c9a5d
Implements: blueprint docstring-add-to-framework
2016-04-05 16:20:56 -05:00
Jenkins a188cdc30a Merge "Wrote docstrings" 2016-03-02 22:06:23 +00:00
Henry Yamauchi 0369024089 Check if user A can access user B's resource
This test uses two users, generates their tokens
and tries to use token B to access the user A's
profile.  If it succeeds this shows a security
vulnerability exists.

Change-Id: I67c89f74985e598999080f6bd89b55934df686ef
Implements: blueprint test-unauthed
2016-02-16 18:08:21 -06:00
michael.dong@rackspace.com a7b22cf4e4 Wrote docstrings
Change-Id: I804b3fbb50cb0ec835b50984881d14976a41784b
2016-02-09 12:54:42 -06:00