Commit Graph
100 Commits
Author SHA1 Message Date
Chris Church d76fd9b860 Merge pull request #3525 from cchurch/tower-db-settings
Configure Tower in Tower
2016-09-27 23:17:14 -04:00
Chris Church 41d05b0ae8 Flake8 fixes. 2016-09-26 22:15:26 -04:00
Chris Church 5ed59a4c52 For #3529, show trial in /api/v1/config/ even when false. 2016-09-26 22:15:20 -04:00
Chris Church 16a7c1e493 Based on customer config example, entity ID doesn't have to be a URL. 2016-09-26 22:15:12 -04:00
Chris Church 6ebe45b1bd Configure Tower in Tower:
* Add separate Django app for configuration: awx.conf.
* Migrate from existing main.TowerSettings model to conf.Setting.
* Add settings wrapper to allow get/set/del via django.conf.settings.
* Update existing references to tower_settings to use django.conf.settings.
* Add a settings registry to allow for each Django app to register configurable settings.
* Support setting validation and conversion using Django REST Framework fields.
* Add /api/v1/settings/ to display a list of setting categories.
* Add /api/v1/settings/<slug>/ to display all settings in a category as a single object.
* Allow PUT/PATCH to update setting singleton, DELETE to reset to defaults.
* Add "all" category to display all settings across categories.
* Add "changed" category to display only settings configured in the database.
* Support per-user settings via "user" category (/api/v1/settings/user/).
* Support defaults for user settings via "user-defaults" category (/api/v1/settings/user-defaults/).
* Update serializer metadata to support category, category_slug and placeholder on OPTIONS responses.
* Update serializer metadata to handle child fields of a list/dict.
* Hide raw data form in browsable API for OPTIONS and DELETE.
* Combine existing licensing code into single "TaskEnhancer" class.
* Move license helper functions from awx.api.license into awx.conf.license.
* Update /api/v1/config/ to read/verify/update license using TaskEnhancer and settings wrapper.
* Add support for caching settings accessed via settings wrapper.
* Invalidate cached settings when Setting model changes or is deleted.
* Preload all database settings into cache on first access via settings wrapper.
* Add support for read-only settings than can update their value depending on other settings.
* Use setting_changed signal whenever a setting changes.
* Register configurable authentication, jobs, system and ui settings.
* Register configurable LDAP, RADIUS and social auth settings.
* Add custom fields and validators for URL, LDAP, RADIUS and social auth settings.
* Rewrite existing validator for Credential ssh_private_key to support validating private keys, certs or combinations of both.
* Get all unit/functional tests working with above changes.
* Add "migrate_to_database_settings" command to determine settings to be migrated into the database and comment them out when set in Python settings files.
* Add support for migrating license key from file to database.
* Remove database-configuable settings from local_settings.py example files.
* Update setup role to no longer install files for database-configurable settings.

f 94ff6ee More settings work.
f af4c4e0 Even more db settings stuff.
f 96ea9c0 More settings, attempt at singleton serializer for settings.
f 937c760 More work on singleton/category views in API, add code to comment out settings in Python files, work on command to migrate settings to database.
f 425b0d3 Minor fixes for sprint demo.
f ea402a4 Add support for read-only settings, cleanup license engine, get license support working with DB settings.
f ec289e4 Rename migration, minor fixmes, update setup role.
f 603640b Rewrite key/cert validator, finish adding social auth fields, hook up signals for setting_changed, use None to imply a setting is not set.
f 67d1b5a Get functional/unit tests passing.
f 2919b62 Flake8 fixes.
f e62f421 Add redbaron to requirements, get file to database migration working (except for license).
f c564508 Add support for migrating license file.
f 982f767 Add support for regex in social map fields.
2016-09-26 22:14:47 -04:00
Chris Church b7a6aa01a3 Fixes to get flake8 and unit/functional tests passing. 2016-09-18 19:11:29 -04:00
Chris Church eb70d8d32e Merge pull request #3255 from cchurch/my-saml-done-froze-up
Initialize xmlsec once to prevent SAML auth from hanging.
2016-08-25 23:32:19 -04:00
Chris Church ff9945037f Initialize xmlsec once to prevent SAML auth from hanging. 2016-08-15 14:50:53 -04:00
Chris Church 146e724930 Merge pull request #1018 from cchurch/redis-cache
Use Redis as cache backend.
2016-08-08 14:19:56 -04:00
Chris Church 3bb14e2f72 Clear cache between tests or when license is updated. 2016-08-08 11:59:55 -04:00
Chris Church 0687168e5e Don't use Redis as cache when running tests. 2016-08-08 11:58:54 -04:00
Chris Church 891e06d6ef Add config for using Redis as cache, add memoize function to store results in cache. 2016-08-08 11:58:54 -04:00
Chris Church 3850b96da2 Re-enable API settings URLs. 2016-08-03 14:56:09 -04:00
Chris Church 1caa5d01b8 Prevent populate_user from being registered multiple times. 2016-07-25 17:39:19 -04:00
Chris Church 574462b4f2 Fix for populating teams for LDAP user. 2016-07-25 17:39:19 -04:00
Chris Church cb98d0674d Prevent populate_user from being registered multiple times. 2016-07-15 16:24:41 -04:00
Chris Church 62562afd0d Fix for populating teams for LDAP user. 2016-07-15 13:17:25 -04:00
Chris Church 2387ef0d3a Merge pull request #2850 from wenottingham/wording-tweak
Tweak system job template wording
2016-07-07 16:18:33 -04:00
Chris Church ab0fd8ddb1 Escape content of browsable API response. 2016-07-02 01:41:28 -04:00
Chris Church 71bc88450f Merge pull request #2443 from cchurch/credential_create_fixes
Update validation and supported fields for creating credentials.
2016-06-17 12:05:53 -04:00
Chris Church c2285f1a4c Split up the credential xfail tests. 2016-06-17 11:42:20 -04:00
Chris Church 59361f5151 Fixes suggested by @AlanCoding. 2016-06-17 09:56:27 -04:00
Chris Church cf7102bc49 Move validation of credential creation to the serializer. Use SubListCreateAPIView for creating a credential under another object, and remove fields from serializer and API docs that aren't valid when creating a credential under another object. 2016-06-17 09:56:27 -04:00
Chris Church 45264c2009 Hide write-only fields from results in API docs. 2016-06-15 17:27:41 -04:00
Chris Church 5cf17eb360 Fix browsable API styles in wide mode. 2016-06-15 17:27:41 -04:00
Chris Church 2cb69ffce0 Fixed assertion error for inventory tree serializer. 2016-06-06 16:48:47 -04:00
Chris Church 6191cd6683 re #1740 Update API colors. 2016-05-09 12:01:26 -04:00
Chris Church fc5d497ce6 Merge pull request #1329 from cchurch/take-me-back-to-the-good-old-ways-of-pagination
Keep page number in previous link for page 1.
2016-03-29 19:05:44 -04:00
Chris Church 16ff69af0f Merge pull request #1330 from cchurch/go-away-you-stinking-tooltips
Do you have to let it linger? Not anymore.
2016-03-29 16:37:45 -04:00
Chris Church c1c444fd3c Flake8 fix. 2016-03-29 15:19:17 -04:00
Chris Church e0bd2fee1b Merge pull request #1326 from cchurch/openssh-key-newline
Add trailing newline to key data for OpenSSH formatted keys.
2016-03-29 15:17:39 -04:00
Chris Church 40738b3055 Merge pull request #1325 from cchurch/fix-help-text-for-common-fields
Fix help text in OPTIONS for common, read-only fields.
2016-03-29 15:17:26 -04:00
Chris Church 615f7b50dc Fix browsable API tooltips that linger. 2016-03-29 14:26:43 -04:00
Chris Church 1b9c5ef55b Keep page number in previous link for page 1. 2016-03-29 13:56:41 -04:00
Chris Church 77f064d728 Keep model meta around in base serializer. 2016-03-29 13:27:49 -04:00
Chris Church 3660b04d62 Add trailing newline to key data for OpenSSH formatted keys. 2016-03-29 11:03:56 -04:00
Chris Church 895e082e08 Damn you, flake8. 2016-03-29 11:03:16 -04:00
Chris Church aedf1d87ab Fix help text in OPTIONS for common, read-only fields. Also fix display of None for foreign key fields in browsable API help. 2016-03-29 11:03:16 -04:00
Chris Church d51f56af9c Merge pull request #1327 from cchurch/no-scan-for-you
Remove scan as an option for job type on ad hoc commands.
2016-03-29 11:01:54 -04:00
Chris Church e248937595 Remove scan as an option for job type on ad hoc commands. 2016-03-28 18:42:03 -04:00
Chris Church 51cb262a84 Merge pull request #1125 from cchurch/job-template-callback-parser-fix
Fix job template callback view to accept URL-encoded form data.
2016-03-05 12:22:15 -05:00
Chris Church 8ae639d165 Merge pull request #1124 from cchurch/system-jobs-migration
Add migration to create system job templates for a new database.
2016-03-05 11:23:45 -05:00
Chris Church 60b6b6bfea Fix job template callback view to accept URL-encoded form data. 2016-03-04 16:36:02 -05:00
Chris Church f1c13e0837 Add migration to create system job templates for a new database. 2016-03-04 15:41:40 -05:00
Chris Church 3228b41eea Merge pull request #1020 from cchurch/ad-hoc-check-mode-fixes
Fix error with ad hoc command events when running in check mode.
2016-02-25 16:45:25 -05:00
Chris Church 60c3eeaef3 Include @anoek's changes from #1029. 2016-02-25 15:01:29 -05:00
Chris Church 460c7e852a Merge pull request #1038 from cchurch/no-more-500-errors
API fixes for 500 errors
2016-02-25 01:05:20 -05:00
Chris Church a2595dcf12 API fixes for 500 errors. 2016-02-24 18:38:04 -05:00
Chris Church 5b89c5e126 Merge pull request #1016 from cchurch/fix-job-template-launch-fields
Remove write-only fields from GET response for job template launch.
2016-02-24 18:12:47 -05:00
Chris Church 2f763d0ff5 Fix error with ad hoc command events when running in check mode. 2016-02-23 18:26:38 -05:00
Chris Church 90d1a3d020 Remove write-only fields from GET response for job template launch, update raw data form to show any fields/passwords needed to launch the job. 2016-02-23 14:04:30 -05:00
Chris Church 6f988452c3 Merge pull request #977 from cchurch/api-raw-data-form-fixes
API Raw Data Form & Validation Fixes
2016-02-23 12:23:14 -05:00
Chris Church 9f44888c00 Update existing settings migration with minor field change. 2016-02-23 12:15:39 -05:00
Chris Church 718f70af23 Merge pull request #987 from AlanCoding/conn_err
Step 1 to allow jobs to run in dev server again
2016-02-23 12:04:07 -05:00
Chris Church d8ae1115f0 Fix extra_vars/survey handling since request.data is now an OrderedDict. 2016-02-17 00:04:28 -05:00
Chris Church 8b2e699ea7 Merge pull request #972 from AlanCoding/755_related_job_templates
Add job_template related list to inventory endpoint
2016-02-16 23:04:11 -05:00
Chris Church 99150b5a05 Flake8 fixes. 2016-02-16 20:02:52 -05:00
Chris Church 4873e2413f * Populate browsable API raw data form with submitted request data in response to an update.
* Remove fields from browsable API raw data that are set implicitly based on URL / parent object.
* Fix issue where a group/host could be assigned to a different inventory.
* Update validation to load values from existing instance if not present in new data; allows PATCH requests to succeed.
* Remove job_args, job_cwd, job_env, result_stdout and result_traceback fields from job listings.
2016-02-16 17:49:34 -05:00
Chris Church ce5989ba31 Update browsable API styling based on UI feedback. 2016-02-12 00:07:15 -05:00
Chris Church f68329bd58 Merge pull request #885 from cchurch/more-serializer-fixes
More DRF 3.3 Serializer Fixes
2016-02-11 23:15:17 -05:00
Chris Church dc298daeb4 Update settings serializer to allow empty/blank values. 2016-02-11 18:11:41 -05:00
Chris Church a8fec62095 Flake8 fix. 2016-02-11 18:11:41 -05:00
Chris Church 1f290ed940 Add custom serializer char/bool fields to accept null and coerce to appropriate type. Update validation for unique constraints so that error messages remain the same as before. Update key used in error response for non-field errors. Should address #791, #794, #809, #812 and #816. 2016-02-11 18:11:41 -05:00
Chris Church abc8da4531 Allow null/blank input for boolean fields on projects. Fixes #791. 2016-02-05 05:14:48 -05:00
Chris Church da0f87c325 Remove unified_job_template and description fields for ad hoc commands. Fixes #789. 2016-02-05 04:55:40 -05:00
Chris Church 23feccdbf3 Check if view has a get_serializer method before trying to call it. Fixes OPTIONS issue in #788. 2016-02-05 04:45:14 -05:00
Chris Church da7d4f4c67 Include api.css and api.js under awx/static/. Fixes #788. 2016-02-05 04:41:10 -05:00
Chris Church 7a0574e6f3 Quick fix for select related error with unified job templates and jobs. Fixes #793 and #795. 2016-02-05 04:30:08 -05:00
Chris Church 217fd383b3 Don't show playbooks under project detail. Fixes #792. 2016-02-05 04:09:17 -05:00
Chris Church ab8e37eeaa Minor fixes based on comments. 2016-02-03 13:18:49 -05:00
Chris Church b08a2d1d88 Update default error pages. 2016-02-02 23:00:07 -05:00
Chris Church 4f3dea92fe Remove dev dependency on django-devserver. 2016-02-02 22:55:58 -05:00
Chris Church 60224cdbe4 Update Django to 1.8 and DRF to 3.3, add new Django migrations, update serializers/pagination/metadata, update browsable API styling. 2016-02-02 17:48:04 -05:00
Chris Church 8552ea91a8 Add sample config for LDAP connection options, disable referrals by default, prefetch user groups to reduce LDAP queries when checking group memberships. 2015-12-11 15:00:20 -05:00
Chris Church b2a187e3a3 Merge pull request #507 from nitzmahone/pywinrm_version_bump
update vendored pywinrm version
2015-11-17 19:35:01 -05:00
Chris Church dde71a3b28 Remove social auth user fields settings that don't have any effect. 2015-11-17 15:18:40 -05:00
Chris Church 89c6a7a9d1 Merge pull request #499 from cchurch/social_auth_updates
Social Auth and SSO Updates
2015-11-13 11:56:39 -05:00
Chris Church cd447bed96 Social auth and SSO updates:
* Move auth backends into sso app.
* Add support for mapping social auth users into organizations and teams.
* Return social auth backends in a consistent order in the API.
* Remove custom SAML attribute mapping and use options provided by PSA.
* Add pipeline function to raise an exception if no user has been found or created; added comments on how to disable new user creation.
* Add comments for defining a custom social auth pipeline function.
2015-11-13 11:30:55 -05:00
Chris Church 908b1b4094 Update default scopes requested for github social auth. 2015-11-12 12:27:19 -05:00
Chris Church 51fd41da2c Merge pull request #458 from jlmitch5/plugAuthUIAPIIntegration
inegration of ui with api on pluggable auth
2015-10-02 17:29:58 -04:00
Chris Church 8d2f6eaf06 Merge pull request #459 from cchurch/slammin-saml
OAuth2/SAML/RADIUS Authentication
2015-10-02 17:29:45 -04:00
Chris Church 32604f1338 Fix for 500 error at /api/v1/me. 2015-10-02 17:29:16 -04:00
Chris Church 84e89ab6f8 Fix auth-related errors breaking unit tests. 2015-10-02 16:16:30 -04:00
Chris Church 0c7a4b9f60 Disable flake8 checks in settings. 2015-10-02 15:24:49 -04:00
Chris Church b5512e23bf Flake8 fixes, remove stray print. 2015-10-02 15:13:16 -04:00
Chris Church 2ba5e06e2c Add support for single-sign on using python-social-auth (with Google/Github OAuth2 and SAML support). Add support for RADIUS as another authentication backend. 2015-10-02 14:57:27 -04:00
Chris Church 6128ab3ff4 Add an error message when running a job and trying to use an OpenSSH formatted key on an older version of OpenSSH. 2015-08-11 16:54:54 -04:00
Chris Church 2cd8e00bcf Add an error message when running a job and trying to use an OpenSSH formatted key on an older version of OpenSSH. 2015-08-11 16:30:27 -04:00
Chris Church 6c409404ba Incorporate OpenStack inventory changes from https://github.com/ansible/ansible/pull/11447 back into Tower. 2015-08-10 15:49:25 -04:00
Chris Church 139a072afa Don't create a group that is its own parent when an EC2 tag has an empty value. Fixes https://trello.com/c/2zc0odvX 2015-08-06 21:31:56 -04:00
Chris Church 001127f8bd Limit max depth when building mapping of group depths to avoid hitting recursion limit. Fixes https://trello.com/c/2zc0odvX 2015-08-06 21:31:42 -04:00
Chris Church 0633d4c672 Don't create a group that is its own parent when an EC2 tag has an empty value. Fixes https://trello.com/c/2zc0odvX 2015-08-06 15:03:54 -04:00
Chris Church 3560e5a2eb Limit max depth when building mapping of group depths to avoid hitting recursion limit. Fixes https://trello.com/c/2zc0odvX 2015-08-06 14:59:04 -04:00
Chris Church f0010cc574 Add support for detecting encrypted openssh format private keys. Fixes https://trello.com/c/ZeVOXN5U 2015-08-05 22:03:20 -04:00
Chris Church 4a1b5070b5 Merge pull request #357 from cchurch/make_honcho
Add support for honcho as alternative to tmux
2015-08-04 19:06:17 -04:00
Chris Church b647811456 Add support for detecting encrypted openssh format private keys. Fixes https://trello.com/c/ZeVOXN5U 2015-08-04 18:59:25 -04:00
Chris Church 71c2fd7f8d Add support for honcho as alternative to tmux for running development servers. 2015-08-04 15:26:27 -04:00
Chris Church 5b16934459 Set azure inventory cache defaults before reading settings. 2015-06-30 16:41:22 -04:00
Chris Church e217ab00c0 Fix azure inventory to set ['_meta']['hostvars'] instead of just ['meta']. 2015-06-30 16:35:07 -04:00
Chris Church b7b5293fed Include vmware inventory updates from https://github.com/ansible/ansible/pull/11300 2015-06-30 14:00:06 -04:00