Commit Graph

140 Commits

Author SHA1 Message Date
AlanCoding
b7e9bda6cf track prior organization_id by base model prior values tore
Also fix bug where unified pointers were counted in
the prior values store
2018-05-23 08:54:03 -04:00
AlanCoding
949895d0bc fix team parentage being removed 2018-05-10 11:13:09 -04:00
AlanCoding
1e38abff91 accurate 400 messages for undefined filename namespaces 2018-05-07 15:39:10 -04:00
AlanCoding
7c621a91ee use named formatting in error messages 2018-04-24 11:26:36 -04:00
Wayne Witzel III
c1a8d8670f Pop the type to be consistent 2018-04-23 10:33:59 -04:00
Wayne Witzel III
07474d5b21 Extend become_method to model field validation as well 2018-04-23 10:33:59 -04:00
Wayne Witzel III
d6ac9b6e3d Restore previous choices, clean up some minor things 2018-04-23 10:33:59 -04:00
Wayne Witzel III
8fa98d0d54 Add new credential become methods, inject instead of set in database 2018-04-23 10:33:59 -04:00
AlanCoding
fb43538333 add relative location to CT schema errors 2018-04-19 14:58:40 -04:00
AlanCoding
9f6a4e135f fix server error with unicode in template 2018-04-19 14:25:59 -04:00
AlanCoding
f78037c0f3 prevent server error with CT unicode keys 2018-04-19 13:27:25 -04:00
AlanCoding
4f65b283df do not server error if this value is None 2018-04-10 11:00:37 -04:00
Wayne Witzel III
99fb0fa4cd Extract update_role_parentage_for_instance 2018-04-06 15:19:41 -04:00
Ryan Petrello
5f01d26224 automatically encrypt/decrypt main_oauth2application.client_secret
see: https://github.com/ansible/awx/issues/1416
2018-04-04 15:35:24 -04:00
Alan Rominger
716a2a6b0f Merge pull request #1213 from AlanCoding/alan_does_jsonschema
custom message for JSONschema type error
2018-04-04 10:27:23 -04:00
AlanCoding
996a5b20b0 unit tests of cred field types 2018-04-04 09:38:50 -04:00
Wayne Witzel III
bab2745392 Refresh the old instance so the returned obj is up-to-date 2018-04-04 07:49:29 -04:00
Wayne Witzel III
5f888d8400 Fix issue with adding new RBAC fields 2018-04-04 07:48:21 -04:00
AlanCoding
ee8416140a custom message for JSONschema type error 2018-04-03 14:38:30 -04:00
Matthew Jones
8505783350 Merge remote-tracking branch 'tower/release_3.2.3' into devel
* tower/release_3.2.3:
  fix unicode bugs with log statements
  use --export option for ansible-inventory
  add support for new "BECOME" prompt in Ansible 2.5+ for adhoc commands
  enforce strings for secret password inputs on Credentials
  fix a bug for "users should be able to change type of unused credential"
  fix xss vulnerabilities - on host recent jobs popover - on schedule name tooltip
  fix a bug when testing UDP-based logging configuration
  bump templates form credential_types page limit
  Wait for Slack RTM API websocket connection to be established
  don't process artifacts from custom `set_stat` calls asynchronously
  don't overwrite env['ANSIBLE_LIBRARY'] when fact caching is enabled
  only allow facts to cache in the proper file system location
  replace our memcached-based fact cache implementation with local files
  add support for new "BECOME" prompt in Ansible 2.5+
  fix a bug in inventory generation for isolated nodes
  properly handle unicode for isolated job buffers
2018-02-20 12:22:25 -05:00
Ryan Petrello
82e41b40bb enforce strings for secret password inputs on Credentials
see: https://github.com/ansible/ansible-tower/issues/7898
2018-02-12 17:03:32 -05:00
cclauss
c371b869dc basestring to six.string_types for Python 3 2018-02-09 16:28:36 +01:00
cclauss
e18838a4b7 Modernize Python 2 code to get ready for Python 3 2018-02-08 17:26:22 +01:00
Jim Ladd
4c1dddcaf9 Respond to PR feedback 2018-01-31 11:22:01 -05:00
Jim Ladd
4b13bcdce2 Update tests for custom credentials 2018-01-28 21:02:48 -05:00
Jim Ladd
18178c83b3 Validate single and multi-file injection 2018-01-28 21:02:47 -05:00
Jim Ladd
7aa1ae69b3 Add backwards compatibility for injecting single file 2018-01-28 20:50:44 -05:00
Jim Ladd
286a70f2ca Add support for multi-file injection in custom creds 2018-01-28 20:50:43 -05:00
Matthew Jones
9dbcc5934e Merge remote-tracking branch 'tower/release_3.2.2' into devel 2017-12-13 12:25:47 -05:00
AlanCoding
72a8854c27 Make ask_mapping a simple class property
from PR feedback of saved launchtime configurations
2017-12-08 13:45:23 -05:00
AlanCoding
34a8e0a9b6 Feature: saved launchtime configurations
Consolidate prompts accept/reject logic in unified models
Break out accept/reject logic for variables
Surface new promptable fields on WFJT nodes, schedules

Make schedules and workflows accurately reject variables
  that are not allowed by the prompting
  rules or the survey rules on the template

Validate against unallowed extra_data in system job schedules
Prevent schedule or WFJT node POST/PATCH with unprompted data
Move system job days validation to new mechanism
Add new psuedo-field for WFJT node credential
Add validation for node related credentials
Add related config model to unified job
Use JobLaunchConfig model for launch RBAC check

Support credential overwrite behavior with multi-creds
  change modern manual launch to use merge behavior
Refactor JobLaunchSerializer, self.instance=None
Modularize job launch view to create "modern" data
Auto-create config object with every job
Add create schedule endpoint for jobs
2017-12-08 13:38:54 -05:00
Ryan Petrello
a1f8f65add support specifying multiple vault IDs for a playbook run
see: https://github.com/ansible/awx/issues/352
2017-11-30 16:55:17 -05:00
Wayne Witzel III
96904968d8 Fix migration issues, tests, and templates 2017-11-09 17:29:48 -05:00
AlanCoding
018514d657 urlencode unquote host_filter on save 2017-10-24 08:05:08 -04:00
Ryan Petrello
63273d8ffd filter Python unicode string prefix from jsonschema validation errors.
see: https://github.com/ansible/ansible-tower/issues/6417
2017-07-31 15:22:19 -04:00
Ryan Petrello
5e15f9e04e add validation errors for certain dependent credential fields
see: https://github.com/ansible/ansible-tower/issues/7323
see: https://github.com/ansible/ansible-tower/issues/7293
see: https://github.com/ansible/ansible-tower/issues/7289
see: https://github.com/ansible/ansible-tower/issues/7292
2017-07-28 16:07:37 -04:00
Ryan Petrello
c71e8d38b7 improve private passphrase error when it's provided unnecessarily
see: https://github.com/ansible/ansible-tower/issues/7293
2017-07-26 15:04:10 -04:00
Ryan Petrello
9f11c008d2 don't allow boolean credential type fields that specify secret
secret doesn't really make sense for boolean values; they can't store
sensitive content because they're just true|false

see: https://github.com/ansible/ansible-tower/issues/6776
2017-07-24 11:41:12 -04:00
Ryan Petrello
a640d6afec improve sanitation of empty credential values to match API v1 behavior
This is mostly backwards compatability to avoid surprises: in 3.1.x
if you submit a field value with `null` or an empty string to
a CharField, it's treated as an empty string (and SSH key validation
is skipped).  For boolean field values (`net.authorize`), `null` and
empty string are coerced to `False`.

see: #7216
see: #7218
2017-07-21 11:25:56 -04:00
Ryan Petrello
afb307c146 properly validate choices for credential input validation
see: #7119
2017-07-17 16:58:33 -04:00
Ryan Petrello
dade5c12a7 fix a bug in the CredentialType field validator that breaks required
see: #6769
2017-06-30 12:27:43 -04:00
Ryan Petrello
12982d6ef6 Merge pull request #6541 from wwitzel3/issue-826
Re-Encrypt all of our existing encrypted fields.
2017-06-13 09:42:56 -04:00
Ryan Petrello
240d629128 fix a bug in ssh key unlock validation
see: #6553
2017-06-12 10:28:38 -04:00
Wayne Witzel III
b5d61c3c53 Relocate encryption helpers, update settings, tests, and imports 2017-06-12 09:54:12 -04:00
Ryan Petrello
28ad576c90 properly validate ssh_key_unlock for Net and SCM credentials
see: #6460
2017-06-09 10:43:04 -04:00
Ryan Petrello
af457ad8eb clarify valid CredentialType field types
almost all of our current credential values are strings, but under the
v1 Credential model, `authorize` is boolean

additionally, if a field is specified with no type, fall back to
`string` as a default (this is almost always what people creating custom
types will want)

see: #6406
2017-06-01 13:23:51 -04:00
Ryan Petrello
e0a629db58 improve error formatting for jsonschema failures on Credential.inputs
this provides error messages keyed by input fields, so that instead of
e.g.,

{
    'inputs': ['Invalid certificate or key: u'XYZ']
}

...you get:

{
    'inputs': {
        'ssh_key_data': ['Invalid certificate or key: u'XYZ']
    }
}

Includes /api/v1/ compatability for error message format.  Requests to
/api/v1/ will get:

{'ssh_key_data': ['Invalid certificate or key: u'XYZ']}
2017-06-01 09:48:42 -04:00
Ryan Petrello
98fa654be2 enforce dict for credential API input payloads
see: #6363
2017-06-01 09:19:21 -04:00
Wayne Witzel III
d652ed16d0 Dynamic -> Smart Inventory 2017-05-17 16:25:40 -04:00
Ryan Petrello
0ac4f71e5b refactor and fix ssh_private_key and ssh_key_unlock validation
`clean_ssh_key_data` and `clean_ssh_key_unlock` no longer work because
they're not actual fields on `model.Credential` anymore.  This change
refactors/moves their validation to a place that works (and makes more
sense).
2017-05-12 09:42:29 -04:00