Commit Graph

3532 Commits

Author SHA1 Message Date
Ryan Petrello
def2034883 add a new vault_credential relationship to Job/JobTemplate
additionally, properly assign vault credentials to Jobs and JobTemplates
as they're migrated to the new split model

see: #5807
see: #5878
2017-04-28 15:00:01 -04:00
AlanCoding
0246b6bdcd bump migration versions after 313 merge 2017-04-28 14:40:08 -04:00
Wayne Witzel III
64982461ac Merge pull request #6124 from wwitzel3/devel
Add inventory_id to websocket data
2017-04-28 14:02:40 -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
Chris Meyers
d14a55911b ack fact scan messages
* Fixes a bug where fact rabbit messages would build up because we never
explicitly ack them.
2017-04-28 13:46:54 -04:00
Wayne Witzel III
b651983045 also add inventory_source_id to websocket data 2017-04-28 12:22:49 -04:00
Wayne Witzel III
1248be9b7c Add inventory_id to websocket data 2017-04-28 11:50:07 -04:00
Ryan Petrello
03460b311e treat tower as a reserved field name for custom CredentialTypes 2017-04-28 11:26:18 -04:00
Aaron Tan
89f239ce66 Merge pull request #6119 from jangsutsr/5658_enforce_org_dependency_of_notification_template
Enforce org dependency of notification template
2017-04-28 11:08:21 -04:00
Aaron Tan
d0d201863b Enforce org dependency of notification template. 2017-04-28 10:14:21 -04:00
Aaron Tan
209acc3278 Merge pull request #6121 from jangsutsr/6118_allow_drf_parser_to_accept_trailing_commas
Allow DRF parser to accept trailing commas
2017-04-28 09:37:23 -04:00
AlanCoding
1169d19f8c Make Credential Type validator aware of "tower" var 2017-04-28 07:56:49 -04:00
Aaron Tan
c2d26c918a Allow DRF parser to accept trailing commas. 2017-04-27 16:16:05 -04:00
Ryan Petrello
66e004a9db fix a few more migration-related issues for credentials 2017-04-26 09:24:33 -04:00
Ryan Petrello
9a4b972bab Merge pull request #6102 from ryanpetrello/vault_migration
properly migrate vault credentials to the new credentialtype model
2017-04-25 15:35:16 -04:00
Aaron Tan
dd3e373c34 Merge pull request #6095 from jangsutsr/6066_allow_exception_view_to_accept_all_valid_http_methods
Allow exception view to accept all valid HTTP methods.
2017-04-25 15:11:14 -04:00
Ryan Petrello
c0add33212 properly migrate vault credentials to the new credentialtype model 2017-04-25 15:03:16 -04:00
Aaron Tan
381b47201b Allow exception view to accept all valid HTTP methods. 2017-04-25 13:35:21 -04:00
Aaron Tan
8d2ee8c30f Refactor log handler and support TCP/UDP communications 2017-04-25 11:07:57 -04:00
Chris Meyers
1f99a0df85 Merge pull request #6098 from chrismeyersfsu/fix-facts_query_performance
coarse json queries to use gin index
2017-04-25 10:58:09 -04:00
Ryan Petrello
f0f859f553 Merge pull request #6088 from ryanpetrello/v1_custom_credentials
for /api/v1/ requests, filter out v2 (custom) credentials
2017-04-25 10:30:02 -04:00
Chris Meyers
d69ae2cc92 coarse json queries to use gin index 2017-04-25 10:21:22 -04:00
Aaron Tan
3a81ca0dce Restore ability of parsing extra_vars string for provisioning callback. 2017-04-24 17:43:20 -04:00
Ryan Petrello
83dc4f6757 for /api/v1/ requests, filter out v2 (custom) credentials
see: #5877
2017-04-24 15:21:30 -04:00
Ryan Petrello
aff25c914e blacklist special env vars from being used in CredentialType injectors
see: #5877
2017-04-24 15:03:50 -04:00
Ryan Petrello
a36a53fe40 implement CredentialType env, file, and extra_vars injectors
see: #5877
2017-04-24 15:03:33 -04:00
Ryan Petrello
97b2524156 migrate v1 credentials to the new v2 credentialtype + credential model
see: #5878
2017-04-24 13:00:13 -04:00
Ryan Petrello
3067435799 add additional test coverage for tasks.py credential usage 2017-04-21 15:42:27 -04:00
Ryan Petrello
ba259e0ad4 Introduce a new CredentialTemplate model
Credentials now have a required CredentialType, which defines inputs
(i.e., username, password) and injectors (i.e., assign the username to
SOME_ENV_VARIABLE at job runtime)

This commit only implements the model changes necessary to support the
new inputs model, and includes code for the credential serializer that
allows backwards-compatible support for /api/v1/credentials/; tasks.py
still needs to be updated to actually respect CredentialType injectors.

This change *will* break the UI for credentials (because it needs to be
updated to use the new v2 endpoint).

see: #5877
see: #5876
see: #5805
2017-04-21 15:42:26 -04:00
Wayne Witzel III
c058f76960 value_to_python should encode lookup fields as ascii 2017-04-20 13:22:54 -04:00
Michael Abashian
58cc33481e Merge pull request #6000 from mabashian/5926-survey-password-minlength
Fixed min/max length survey password bug
2017-04-18 14:09:08 -04:00
Alan Rominger
1011e54689 Merge pull request #5985 from AlanCoding/scm_inv5
SCM file-based inventory sources
2017-04-17 16:22:24 -04:00
Alan Rominger
6ff6948688 Merge pull request #6043 from AlanCoding/v1_group_fixes
Group V1 serializer fixes from QE feedback
2017-04-17 15:44:35 -04:00
AlanCoding
6d92c56da5 SCM Inventory model, view, and task system changes
Inventory source file-type combined with a linked project
will allow the inventory source to be updated when the
project is updated. The inventory update runs in the
post-run hook of the project update.
2017-04-17 15:01:19 -04:00
AlanCoding
3af0f505d8 Setting for external log emissions cert verification
Stopgap solution for issue for 3.1.3 where Splunk servers with a
self-signed certificate could not receive logs from Tower.
Users should set `LOG_AGGREGATOR_VERIFY_CERT = False` in settings
to use this.
2017-04-17 14:50:01 -04:00
AlanCoding
29de1056e7 Group V1 serializer fixes from QE feedback
Straightforward bug fixes and edits to be more consistent with
the 3.1 v1 API structure
 - remove `inventory_source` as a field from group
 - add inventory source as a group summary field
 - fix user_capabilities bug for group start permission
 - fix 500 error on /inventory_sources/N/update/
2017-04-17 14:43:17 -04:00
Chris Meyers
55268a8ff0 remove facts_latest in favor of ansible_facts
* Closer align our facts data structure with ansible facts data
structure for purposes of ... wait for it ... 2-way fact caching
2017-04-17 14:27:33 -04:00
Alan Rominger
14a03d2cb5 Merge pull request #6029 from AlanCoding/group_v1
Group serializer special v1 functionality
2017-04-17 11:37:26 -04:00
Alan Rominger
6d17158b34 Merge pull request #5973 from AlanCoding/survey_choices_string
When survey choices are strings, don't just check "X in choices"
2017-04-17 11:05:50 -04:00
AlanCoding
7223177684 Group serializer special v1 functionality
Returns a related `inventory_source` and related link for groups
if accessed from /api/v1/, but not for API v2.
Also inserts corresponding fields to inventory source serializer.
Keep migrated manual sources and auto-create in API v1.
2017-04-17 10:30:07 -04:00
Chris Meyers
5ff4966526 add json a=null support and still support a="null"
related to #6016
2017-04-13 16:26:35 -04:00
Chris Meyers
040f9dd545 support > 2 sequential and, also or
* Fixed a bug in the fact search language parser where it would not loop
over all the <and, or> operations. The result, we can support (a=b or
a=c or a=d) also support (a=b and b=b and c=b)
2017-04-13 13:36:38 -04:00
Chris Meyers
23ce5ab9de fix up test 2017-04-13 10:44:28 -04:00
Chris Meyers
bd1f8b088f 400 on invalid host filter query instead of 500 2017-04-13 09:40:11 -04:00
AlanCoding
6f0a8949a6 Add supervisorctl logs
In some systems, the tower service process may not have sufficient
permissions to communicate with the supervisorctl socket, in which
case an automated restart will not be possible.
2017-04-12 16:46:58 -04:00
Chris Meyers
1a2cbaf5e1 flake8 fix 2017-04-12 15:35:42 -04:00
Chris Meyers
a2b37aa7e6 add not logic to json search
* Also fix up single contains [] logic. Values with a single contains
should be wrapped in [] and not, like I thought before, \"\"
2017-04-12 15:11:36 -04:00
Chris Meyers
817ca503e8 Merge pull request #6002 from chrismeyersfsu/fix-5984
lock projects on project sync
2017-04-12 13:25:51 -04:00
Chris Meyers
70fafe75d2 clean up commented code 2017-04-12 11:42:31 -04:00
Chris Meyers
d1eba4b607 log lock errors and test it 2017-04-12 11:41:11 -04:00