108 Commits

Author SHA1 Message Date
AlanCoding
90f63774f4
flake8: comply with new E722 rule 2017-10-23 14:36:48 -04:00
Matthew Jones
6fa283fc98
Merge branch 'release_3.2.0' into devel
* release_3.2.0: (66 commits)
  fix workflow maker lookup issues
  adding extra logic check for ansible_facts in smart search
  adding "admin_role" as a default query param for insights cred lookup
  changing insights cred lookup to not use hard coded cred type
  fix rounding of capacity percentage
  Catch potential unicode errors when looking up addrinfo
  fixing typo with adding query params for instance groups modal
  move percentage capacitty to variable
  Add unit test for inventory_sources_already_updated
  Check for inventory sources already updated from start args
  Fixed inventory completed jobs pagination bug by setting default page size
  Remove the logic blocking dependent inventory updates on callbacks
  fix instance group percentage
  Remove host-filter-modal import
  Fix partial hover highlight of host filter modal row
  Removed leading slash on basePath
  Fixed host nested groups pagination
  Added trailing slash to basePath
  Fixed nested groups pagination
  Fixed host_filter searching related fields
  ...
2017-10-10 16:09:43 -04:00
Wayne Witzel III
ba23f1728a
add --comment-only option to the migrate_to_database_settings mgmt command 2017-09-26 14:51:59 -04:00
Chris Meyers
26d393e5c2 2-level memoize
* Allows for invalidating an entire function from the memoizer
2017-09-21 15:34:51 -04:00
Chris Meyers
062ff7153d resurrect cchurch's license feature caching 2017-09-20 14:57:24 -04:00
Chris Meyers
c265ed2722 Revert "use request response cache for license checks"
This reverts commit 93acae9367023fec153aa7980f2edd9f96822ba2.
2017-09-20 13:47:44 -04:00
Matthew Jones
64415872a0
Merge branch 'release_3.2.0' into devel 2017-09-18 10:55:45 -04:00
Chris Meyers
28a26e6e81 Merge pull request #408 from chrismeyersfsu/7500_process_workflow_cornercase_for_user_capability
memoize workflow license feature check
2017-09-14 08:29:41 -04:00
Chris Meyers
1ce3c7937b use request response cache for license checks 2017-09-13 13:34:39 -04:00
Ryan Petrello
4cc58a221b
fix busted conf unit tests 2017-09-11 11:28:43 -04:00
Aaron Tan
42bbd7d47a Merge pull request #18 from jangsutsr/wrap_up_ctint_unit_tests
Wrap up Tower configuration unit tests
2017-09-07 09:49:14 -04:00
Ryan Petrello
44702c5cfd
fix broken shippable test suite 2017-09-06 16:12:43 -07:00
Aaron Tan
64b6b18a81
Wrap up Tower configuration unit tests 2017-09-05 15:16:51 -04:00
AlanCoding
5cc5d4deff
allow cache storing of non-DB settings 2017-08-25 13:59:31 -04:00
Ryan Petrello
0b68ad9b10
properly sanitize conf.settings debug logs
cache.set() and cache.get() arguments are logged when the log level is
DEBUG; this _may_ include plaintext secrets; strip sensitive values
before logging them

see: https://github.com/ansible/ansible-tower/issues/7476
2017-08-21 10:23:39 -04:00
AlanCoding
9254bcaf16
Make cache compatible with encrypted settings
This saves the id value of the setting into the cache
if the setting is encrypted. That can then be combined
with the secret_key in order to decrypt the setting,
without having to make an additional query to the database.
2017-08-17 17:18:41 -04:00
AlanCoding
f114c01a6a force log test to be DEBUG level 2017-08-13 08:46:31 -04:00
Ryan Petrello
4bc5858ab4 replace PyCrypto usage w/ crytography; ansible no longer bundles it
see: https://github.com/ansible/ansible-tower/issues/7395
2017-08-07 12:19:51 -04:00
Ryan Petrello
b4d69cb5c7 don't delete settings that are marked as read_only 2017-08-04 10:06:35 -04:00
AlanCoding
59be2796be include read_only settings in list for special case 2017-08-04 08:29:57 -04:00
Ryan Petrello
b34adcb10d add special case read-only support for isolated public/private keys
We recently made AWX_ISOLATED_PRIVATE_KEY and AWX_ISOLATED_PUBLIC_KEY
read-only so that they're not inadvertently modified and/or deleted
(which would cause isolated task execution to break).  Tower's notion of
a read-only setting, though, is really more like "hard-coded in a .py
file".  What we really need is support for settings that are not
user configurable/changeable, but that we still want to display to users
from the DB.

In leiu of a complicated change to `awx.conf.settings`, this change
provides special support to these two settings so they behave in the
manner we expect.

see: https://github.com/ansible/ansible-tower/issues/7375
2017-08-03 16:41:23 -04:00
Aaron Tan
e8bd477f1e Make up default values for tower configurations 2017-07-27 15:02:25 -04:00
Ryan Petrello
60da24d82f fix a few activity stream bugs related to setting creation/update
* when a setting is created, only create *one* activity stream record
  for the creation, not one for create and another for update (similar
  to https://github.com/ansible/tower/pull/53)
* add code to hide `$encrypted$` activity stream content

see: https://github.com/ansible/ansible-tower/issues/7320
2017-07-27 11:51:10 -04:00
Aaron Tan
faa244da8c Prevent DB changes for read_only tower configurations 2017-07-26 10:48:37 -04:00
Wayne Witzel III
822aa65207 Squash migrations 3.1 / 3.2 2017-07-21 13:24:14 -04:00
Ryan Petrello
937e90d342 force PENDO_TRACKING_STATE to be readonly for the open source license
see: #6890
2017-07-14 16:39:13 -04:00
Matthew Jones
891f26c850 Fix an issue where an unlicensed system would throw errors
In the case where the license was entirely not present but the tower
license module was present
2017-07-14 10:21:26 -04:00
Matthew Jones
8e8324983b Merge branch 'license_module_switch' into devel
* license_module_switch:
  Hide eula if stub license is used
  Fix up some issues on feature validation for licenses
  Remove any references to internal licensing utilities
  Switch out existing obfuscated license with external module
2017-07-13 11:08:47 -04:00
Matthew Jones
8486944eaa Switch out existing obfuscated license with external module
This creates a new fallback license module called StubLicense that
will be used in the event that the tower_license module is not
installed.

All existing license mechanisms are routed through the get_licenser()
util method
2017-07-11 12:01:24 -04:00
Ryan Petrello
6996b16d5a add additional field validation to AWX_TASK_ENV
AWX_TASK_ENV should only allow simple key-value assignment (since we're
using it to set environment variables).

see: #3508
2017-07-10 17:29:38 -04:00
Aaron Tan
3e3c11433d Remove named URL setting category from API V1 2017-07-05 11:04:44 -04:00
Ryan Petrello
1c066d478b substitute "$encrypted$" for actual password on logging config test
see: #6780
2017-07-03 12:14:43 -04:00
Aaron Tan
f40182fef8 Apply accumulated validation for CTinT all endpoint. 2017-06-29 16:56:55 -04:00
Aaron Tan
d9d5fb38b8 Merge pull request #6732 from jangsutsr/6719_aggregate_service_restart_attempts
Aggregate Tower service restart attempts
2017-06-29 12:13:01 -04:00
Aaron Tan
92f5025817 Aggregate Tower service restart attempts. 2017-06-28 16:49:36 -04:00
AlanCoding
c1ff41fa45 get logging test endpoint to work again
The handler and formatter classes are expecting an object
and the previous method passed a dict, so this change converts
the data into a mock settings object.
2017-06-28 15:10:18 -04:00
Ryan Petrello
65ace1f446 fix a bug in AES -> fernet encryption migration
see: #6747
2017-06-27 15:07:44 -04:00
Aaron Tan
f1869a2f70 Merge pull request #6220 from jangsutsr/6188_enable_ctint_category_specific_validation
Enable Tower configuration category-specific validation
2017-06-26 09:45:12 -04:00
Wayne Witzel III
bd52e4bb22 allow conf.settings to fallback to old encryption methods so settings work during migrations 2017-06-20 10:38:34 -04:00
Wayne Witzel III
7111d9232f Fix should_decrypt_field to work with non-str fields (return False) 2017-06-20 10:37:44 -04:00
Wayne Witzel III
f9b412419c update encryption migration checks and tests 2017-06-15 12:06:18 -04:00
Wayne Witzel III
af7762e417 Fix typo and update tests to catch other typos 2017-06-12 14:14:46 -04:00
Wayne Witzel III
861d6a659c Update conf.Settings migration 2017-06-12 13:00:01 -04:00
Wayne Witzel III
8d96d08510 Add Re-Encryption migrations, helpers, and tests 2017-06-12 09:54:12 -04:00
Wayne Witzel III
b5d61c3c53 Relocate encryption helpers, update settings, tests, and imports 2017-06-12 09:54:12 -04:00
Aaron Tan
69dc56c5a1 Enable CTinT category-specific validation. 2017-05-22 17:13:38 -04:00
Matthew Jones
e1e83598e9 Merge branch 'release_3.1.3' into devel
* release_3.1.3: (52 commits)
  ack fact scan messages
  making ldap user/group search fields into codemirror instances
  removing UI parsing for LDAP User and Group Search fields
  Allow exception view to accept all valid HTTP methods.
  Restore ability of parsing extra_vars string for provisioning callback.
  Fix up backup/restore role broken in f7a8e45809758322d9ee41c5305850dd70ed5faf
  Stop / start ansible-tower-service during restores
  value_to_python should encode lookup fields as ascii
  fix brace interpolation on standard out pane
  Adjust some hardcoded usages of 'awx' to use 'aw_user' and 'aw_group'.
  Pull Spanish updates from Zanata
  Temporarily grant awx user createdb role
  Stop giving ownership of backups to postgres
  don't display chunked lines'
  Add dropdown li truncation with ellipsis
  CTiT -> adhoc modules should allow the user to add new modules
  Remove task that was replacing the supervisor systemd tmp file
  Fix failing supervisorctl commands on RH-based distros
  Give ownership of the supervisor socket to awx
  Setting for external log emissions cert verification
  ...
2017-04-28 13:57:04 -04:00
Aaron Tan
b0a8e8c332 Update CTiT serializer integer field to handle html cornercase. 2017-04-07 16:53:35 -04:00
Ryan Petrello
95ea370e5e add API versioning for /api/v2/ 2017-03-30 15:11:12 -04:00
Ryan Petrello
8c1de7f109 add an API endpoint for testing external log aggregrator connectivity
see: #5164
2017-03-09 13:19:56 -05:00