Commit Graph

214 Commits

Author SHA1 Message Date
Ryan Petrello
f887aaa71f Merge pull request #637 from ryanpetrello/fix-django-settings-bug
undo an optimization in django.conf.settings that breaks awx settings
2017-11-14 11:56:24 -05:00
Ryan Petrello
38f893c124 undo an optimization in django.conf.settings that breaks awx settings 2017-11-14 11:03:50 -05:00
Wayne Witzel III
f118e27047 Flake8 fixes and URL updates 2017-11-10 17:04:33 -05:00
Wayne Witzel III
6d6bbbb627 Update URL strucuture, fixed string based calls 2017-11-09 17:24:04 -05:00
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
AlanCoding
2fb67a3648 prevent OrderedDict syntax in error message 2017-10-10 14:38:49 -04:00
Aaron Tan
a11e33458f Include Tower configurations into activity stream
Relates #7386 of ansible-tower.

Due to the uniqueness of Tower configuration datastore model, it is not
fully compatible with activity stream workflow. This PR introduced
setting field for activitystream model along with other changes to make
Tower configuration a special case for activity streams.

Signed-off-by: Aaron Tan <jangsutsr@gmail.com>
2017-10-10 14:38:45 -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