Commit Graph
92 Commits
Author SHA1 Message Date
Ryan Petrello 95ea370e5e add API versioning for /api/v2/ 2017-03-30 15:11:12 -04:00
Ryan Petrello f9b5b9aa91 property filter no_log for item event loops
see: #5691
2017-03-22 11:15:33 -04:00
Ryan Petrello a69dfced74 Merge remote-tracking branch 'origin/release_3.1.2' into devel 2017-03-21 10:39:16 -04:00
Ryan Petrello ba0e9ab775 copy extra_vars when relaunching ad-hoc commands
see: #1744
2017-03-21 09:45:30 -04:00
Ryan Petrello d0ae818685 show extra variables (if any) in the adhoc command results UI
see: #1744
2017-03-21 09:45:25 -04:00
Ryan Petrello 6a7743b274 fix a callback bug that causes a task_args leak between job events
see: #5802
2017-03-20 12:05:41 -04:00
Ryan Petrello 999a304c3b add no_log filtering for runner_item_on_xyz events
see: #5691
2017-03-17 09:54:46 -04:00
Ryan Petrello 75ba0208ad output logs to /logstash.conf in our default compose file 2017-03-16 13:20:33 -04:00
Ryan Petrello 98ad2684d3 when async log shipping fails, log an explanation 2017-03-15 17:23:44 -04:00
Ryan Petrello b3733d233e always use async http logging - even in celery workers
additionally, add a timeout to requests to avoid thread starvation

see: #5718
see: #5729
2017-03-15 13:17:01 -04:00
Ryan Petrello ba9ce56c35 add callback plugin tests to CI 2017-03-14 14:07:56 -04:00
Ryan Petrello 66c786b971 simplify memcache patching in our callback plugin tests 2017-03-14 14:07:53 -04:00
Ryan Petrello a5ea468bfe add a test to ensure that job events properly strip out environment vars
see: #5601
2017-03-14 12:56:44 -04:00
Ryan Petrello 5bbb824865 add tests for no_log filtering
see: #5691
2017-03-14 12:56:44 -04:00
Ryan Petrello 1005782ee9 add tests for our custom ansible callback plugin 2017-03-14 12:56:40 -04:00
Ryan Petrello 6af9638d81 job event data marked with _ansible_no_log should be censored
see: #5691
2017-03-10 15:47:39 -05:00
Ryan Petrello d4cd9d355f add ui support for specifying extra vars for ad-hoc commands
see: #1744
2017-03-10 15:29:42 -05:00
Ryan Petrello bad9670a0b Merge remote-tracking branch 'origin/release_3.1.2' into devel 2017-03-10 10:57:03 -05:00
Ryan Petrello f4d4c43d94 prohibit order_by= for sensitive fields
see: #5526
2017-03-10 08:49:59 -05:00
Ryan Petrello 9bc162cada start a CHANGELOG 2017-03-09 16:29:40 -05:00
Ryan Petrello 8c1de7f109 add an API endpoint for testing external log aggregrator connectivity
see: #5164
2017-03-09 13:19:56 -05:00
Ryan Petrello 9a6913f184 don't toggle the dropdown when removing items from multiselect fields
see: #5466
2017-03-08 17:37:16 -05:00
Ryan Petrello 255d6afb49 fix a traceback if tower doesn't have LOG_AGGREGATOR_TOWER_UUID set
see: #5527
2017-03-07 16:48:51 -05:00
Ryan Petrello ec52e18be8 allow is_system_auditor with AUTH_LDAP_USER_FLAGS_BY_GROUP
see: #4959
2017-03-07 16:48:51 -05:00
Ryan Petrello ae321536cd fix a regex that doesn't properly strip certain environment variables
see: #5601
2017-03-07 16:48:48 -05:00
Ryan Petrello ed5a01c0cf strip ansible_env from job event callback data
this often contains sensitive details, and the data is already filtered
and stored on the job itself

see: #5601
2017-03-07 16:48:48 -05:00
Ryan Petrello d97ff57cda prohibit API payloads that represent something other than a JSON object
The JSON serializer for our API uses ``json.loads``, which permits *any*
valid JSON (including bare integers, boolean values, etc).  Lots of our
code, however, assumes that inbound JSON content will be a dict.

see: #4756
2017-02-28 13:23:03 -05:00
Ryan Petrello 45819f6b9a requeue websocket messages that don't (yet) have an established user
There's a race between our `ws_connect` and `ws_receive` methods;
it's possible to fall into a scenario where we're handling a legitimate
message *before* django-channels is able to persist the `user_id` into
the channel session.  This results in a scenario where a user can open
a browser tab and never receive new websocket messages.  In this
scenario, we should just toss the message back into the queue and try
again later (up to a reasonable limit of retries).
2017-02-28 11:12:59 -05:00
Ryan Petrello e8ecc4226b use Unicode apostrophes - not single quotes - for French i18n strings
see: #5536
2017-02-27 12:23:07 -05:00
Ryan Petrello 30a3439aa9 pin appdirs==1.4.2
setuptools requires appdirs >= 1.4.0
https://github.com/pypa/setuptools/commit/ff371f18f0076bc63da05334f7e551c1cc29e10d#diff-2eeaed663bd0d25b7e608891384b7298
2017-02-27 12:06:35 -05:00
Ryan Petrello 5dfdef6e6b retain the default interstitial value for TOWER_URL_BASE
to support #5470, check for the presence of this special interstitial
value and replace it with the request hostname for settings OPTIONS
requests
2017-02-23 16:38:16 -05:00
Ryan Petrello b7e48c437d always refetch license config
see: #4931
2017-02-23 12:22:44 -05:00
Ryan Petrello 0c0f3b236f allow idempotent save when editing an inventory script
see: #5094
2017-02-23 11:34:04 -05:00
Ryan Petrello fc583ead21 allow AD_HOC_COMMANDS to be set to [] in the settings ui
see: #4975
2017-02-23 10:51:54 -05:00
Ryan Petrello 6b75ed3dcb move a tall tooltip's placement on the credentials UI to avoid cutoff
when browser text size is increased, this tooltip gets cut off at the
top of the browser window

see: #4979
2017-02-23 09:48:52 -05:00
Ryan Petrello 94ad12ab0d set the default in OPTIONS for TOWER_URL_BASE to the request hostname
see: #5470
2017-02-22 11:16:08 -05:00
Ryan Petrello c8d943ccb1 mark ON/OFF i18n for certain toggle switches 2017-02-21 16:32:12 -05:00
Ryan Petrello 73a5a1e61e mark i18n strings for denied API search parameters 2017-02-21 16:18:06 -05:00
Ryan Petrello d24fb32358 blacklist certain sensitive fields and relations as search arguments
see: #5465
see: #5478
2017-02-21 16:18:02 -05:00
Ryan Petrello 8abf084211 disable the on/off toggle button for hosts from dynamic inventory.
see: #5420
2017-02-21 16:15:47 -05:00
Ryan Petrello e36cd17c16 fix a minor bug in survey_spec password field handling
see: #5477
2017-02-20 16:50:07 -05:00
Ryan Petrello 46fdc123f4 more i18n string marking for host forms
see: #5476
2017-02-20 16:12:58 -05:00
Ryan Petrello e13e817984 mark i18n strings for the inventory host form
see: #5453
2017-02-20 16:03:01 -05:00
Ryan Petrello e4e599c891 mark i18n strings for the dashboard host list
see: #5453
2017-02-20 16:03:01 -05:00
Ryan Petrello 176a0aa84b mark i18n strings for the dashboard host form
see: #5453
2017-02-20 16:02:55 -05:00
Ryan Petrello d08fd82260 fix a visual bug for limited screen widths on the job view UI
see: #5431
2017-02-17 17:13:08 -05:00
Ryan Petrello bda089e3f5 properly count hosts based on job event task state
the intention of the host summary view is that each host belongs in at
most *one* state - determined by the state of the tasks that ran on it.
this change examines each host for a job and determines its state based
on whether tasks passed, resulted in changes, were skipped, failed,
etc...

see: #5407
2017-02-17 11:36:52 -05:00
Ryan Petrello 689dd45c28 don't trim newlines from custom inventory scripts; they may be relevant
see: #5387

angular defaults ngTrim to `true` for <textarea>:
https://docs.angularjs.org/api/ng/directive/textarea

override this for the custom inventory script form
2017-02-15 16:26:08 -05:00
Ryan Petrello 4cbdeb0d30 don't allow private key passphrases for unencrypted private ssh keys
see: #5311
2017-02-15 12:27:27 -05:00
Ryan Petrello 28f3f178f0 only allow single selection for LOG_AGGREGATOR_TYPE
see: #5000
2017-02-14 17:06:44 -05:00
Ryan Petrello 045994a472 properly detect the backend name in failed social_auth callbacks
don't assume that the callback URL contains the correct social_auth
backend name; instead, store it temporarily in the session at
`/login/sso/`

see: #5324
2017-02-14 16:19:39 -05:00
Ryan Petrello ee8c82df4a fix a test that fails due to a race between async logging requests 2017-02-14 15:18:03 -05:00
Ryan Petrello cae8950723 don't cache social-auth-core backends
social-auth-core uses a global variable to cache backend settings:
https://github.com/python-social-auth/social-core/blob/78da4eb201dd22fd2d8a4e38a1d17a73beabad24/social_core/backends/utils.py#L9

when loading backends, forcibly ignore this behavior to avoid
a thread-safety issue that causes #4788 #4045
2017-02-14 11:35:42 -05:00
Ryan Petrello 5a8a647cf0 default log aggregator username and password to an empty string
other configuration options seem to follow this pattern; the UI code
seems to expect that it can send across an empty string

see: #5276
2017-02-13 16:09:31 -05:00
Ryan Petrello 64a973ae02 work around a unicode handling bug in python-memcached that affects py2
see: https://github.com/linsomniac/python-memcached/issues/79
see: #5276
2017-02-13 16:09:31 -05:00
Ryan Petrello 2c7cb4a370 add utf-8 support to utils.common.encrypt_field/decrypt_field 2017-02-13 16:09:31 -05:00
Ryan Petrello 1ebb641c1e work around a DRF issue that causes CharField to cast None to "None"
see: #5322
2017-02-13 12:43:13 -05:00
Ryan Petrello a69815faa0 fix a typo in a log handler test 2017-02-09 15:50:28 -05:00
Ryan Petrello cee0b29fef clarify a logging handler docstring 2017-02-09 15:16:58 -05:00
Ryan Petrello 1b9a2e4a36 correctly set the Authorization header for non-async log handling
see: #5276
2017-02-09 15:14:39 -05:00
Ryan Petrello 4932310ad1 map docker container ports to allow access easier to memcache
this eases memcached interaction from your host, e.g.,
$ echo "get :1:LICENSE" | nc localhost 11211
2017-02-09 11:00:06 -05:00
Ryan Petrello 56433fd2ca move log handling tests from functional -> unit 2017-02-08 16:34:06 -05:00
Ryan Petrello 669012138e refactor utils.handlers.HTTPSHandler's usage of django settings 2017-02-08 16:34:00 -05:00
Ryan Petrello 2c447942d5 add tests for our custom log aggregator/handler 2017-02-08 14:19:32 -05:00
Ryan Petrello 34492d677d remove unnecessary hashes included in "CUSTOM_LOGO" help text
see: #5239
2017-02-08 13:46:55 -05:00
Ryan Petrello 866fe7e265 only loop over project OPTIONS response if the response is valid
see: #5194
2017-02-07 16:15:03 -05:00
Ryan Petrello 52ff35ab3f fix a CTinT bug in static config parsing
see: #5223
2017-02-07 14:42:04 -05:00
Ryan Petrello f4d55659f0 enforce a sane default OPT_NETWORK_TIMEOUT for LDAP connections
see: #5208
2017-02-07 12:37:05 -05:00
Ryan Petrello ea4682e782 catch and log LDAP auth plugin misconfigurations
see: #5204
2017-02-06 16:27:22 -05:00
Ryan Petrello 8615c1e999 add the max_page_size value to the OPTIONS response for list views
see: #4356
2017-02-06 15:18:42 -05:00
Ryan Petrello 80ac25f26b only hide scm revision for manual projects if the key already exists
see: #5141
2017-02-06 12:16:23 -05:00
Ryan Petrello 5bd670291b default certain LDAP settings to None instead of an empty string
Related: #5148 #4678
2017-02-02 13:06:59 -05:00
Ryan Petrello afc0f16e58 add a field to OPTIONS that tells if the setting came from a .py file
additionally, update help_text with a helpful message about this

See: #4876
2017-02-02 12:47:53 -05:00
Ryan Petrello 58d19ea654 add tests for encryption/decryption in awx.main.utils.common 2017-02-01 16:24:18 -05:00
Ryan Petrello 9d98ac5e37 clean up a few complicated mocks 2017-02-01 12:56:20 -05:00
Ryan Petrello 557bc8006d automatically encrypt/decrypt CTinT settings that are stored in memcached
addresses #4246
2017-02-01 12:53:10 -05:00
Ryan Petrello f4a21a2650 don't stringify source_vars['private'] for Openstack inventory updates
shade's OS_CLIENT_CONFIG_FILE expects the generated YAML value to be
a boolean, not a stringified boolean

Addresses #5030
2017-01-31 14:57:12 -05:00
Ryan Petrello 51b50ce735 map docker container ports to allow usage of celery.contrib.rdb
http://docs.celeryproject.org/en/latest/reference/celery.contrib.rdb.html
allows you to remotely debug running celery tasks with:

    from celery.contrib import rdb
    rdb.set_trace()

this will bind a remote Python debugger on a random TCP port between
6899-6999, which you can telnet into for remote task debugging
2017-01-31 09:13:07 -05:00
Ryan Petrello 73cbcc2de0 add awx.conf tests to our various test run environments 2017-01-30 12:37:17 -05:00
Ryan Petrello d6857cf65a add some more inline comments and minor refactoring to awx.conf 2017-01-30 12:37:17 -05:00
Ryan Petrello 836ca21b7e add unit tests for awx.conf 2017-01-30 12:37:11 -05:00
Ryan Petrello 4fcc74012d display read-only settings in the API settings endpoint
References #4665
2017-01-30 10:09:15 -05:00
Ryan Petrello f061505895 move the uwsgi master FIFO from /tmp/awxfifo to /var/lib/awx/awxfifo
Resolves #4900
2017-01-25 16:37:11 -05:00
Ryan Petrello f347bc5ae4 fix a typo that results in a NameError
Resolves #4861
2017-01-25 14:08:49 -05:00
Ryan Petrello e7c5dfeaa4 fix a bug which causes activitystream actor assignment to be invalid
Resolves #4660
2017-01-25 11:45:12 -05:00
Ryan Petrello 0bcbaa5c86 allow certain LDAP settings fields to be nullable
necessary to completely resolve #4678
2017-01-24 09:31:44 -05:00
Ryan Petrello 40a5c6cc0b fix an LDAP settings bug which can cause LDAP auth to fail
django-ldap-auth expects the "unset/empty" state of certain LDAP DN
settings (such as AUTH_LDAP_REQUIRE_GROUP and
AUTH_LDAP_USER_DN_TEMPLATE) to be NULL/None (not an empty string).

Resolves #4678
2017-01-23 15:35:23 -05:00
Ryan Petrello afe3f1f8af fix non-prettified extra vars on the Hosts Edit UI
this seems to be a duplicate of #3333, only in a different
location.

Resolves #4700
2017-01-19 13:49:21 -05:00
Ryan Petrello da66c3f2b8 Revert "add a test for maximum page size enforcement"
This reverts commit af8e6f939ff2d3ecf4658e82777dcd35c0d288a8.

This test seems to leak django.conf.settings between tests (causing the
suite to fail periodically).  Rolling this back until I can figure out
why.
2017-01-19 13:08:44 -05:00
Ryan Petrello a42216f5e2 add a test for maximum page size enforcement
Resolves #4356
2017-01-18 16:52:22 -05:00
Ryan Petrello d418e41f7e Properly encode prev/next pagination links when URL contains unicode chars.
Resolves #4767
2017-01-18 12:43:27 -05:00
Ryan Petrello 9e09fd38a7 Properly parse subversion revision info.
The ansible subversion module returns revision info in an unanticipated format:

https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/source_control/subversion.py#L194-L199

Parse out the revision number we actually care about.

Resolves #4654
2017-01-17 10:04:30 -05:00