Commit Graph

1528 Commits

Author SHA1 Message Date
Ryan Petrello
1f41e002a6 Merge pull request #6399 from ryanpetrello/fix-6390
fix a bug in POST /api/v1/credential detection of Vault payloads
2017-06-08 15:40:26 -04:00
Ryan Petrello
a706440ff6 Merge pull request #6407 from ryanpetrello/fix-6385
improve a few permission-related errors for CredentialType update/delete
2017-06-05 15:20:26 -04:00
Ryan Petrello
2cb296d28b Merge pull request #6408 from ryanpetrello/fix-6406
clarify valid CredentialType field types
2017-06-02 10:04: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
fd4b86349c fix a 500 error in /api/v1/credentials/ backwards compat
see: #6414
2017-06-01 11:26:18 -04:00
Ryan Petrello
71dda544ab fix a bug in /api/v1/credential detection of Vault payloads
see: #6390
2017-06-01 10:18:43 -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
Ryan Petrello
16f4eb4532 Merge pull request #6403 from ryanpetrello/fix-6380
OpenStack CredentialType needs a `domain` input field
2017-05-31 17:36:51 -04:00
Aaron Tan
a993025e0d Merge pull request #6053 from jangsutsr/named_url
Named URL
2017-05-31 17:02:42 -04:00
Ryan Petrello
462b2c6696 improve a few permission-related errors for CredentialType update/delete
see: #6385
2017-05-31 15:48:34 -04:00
Ryan Petrello
23a1c94d38 OpenStack CredentialType needs a domain input field
see: #6380
2017-05-31 13:44:38 -04:00
Aaron Tan
f25391fe86 Implement named URL feature. 2017-05-31 12:09:54 -04:00
Chris Meyers
1a10205e0c Merge pull request #6300 from chrismeyersfsu/feature-insights_proxy
insights proxy
2017-05-26 14:17:04 -04:00
Chris Meyers
2f43f0fe2b flake8 2017-05-26 08:52:13 -04:00
Chris Meyers
7c0513d5ee migrate insights credentials
* A credential is considered an insights credential if a project of
scm_type 'insights' is associated.
* all non-insights Projects that point at an insights credential are
nulled
2017-05-26 08:50:53 -04:00
Chris Meyers
87eea59845 add per-inventory insights credential 2017-05-26 07:25:36 -04:00
Aaron Tan
b50820fa60 Merge pull request #6305 from jangsutsr/6272_prevent_nested_encrypted_field_leak_in_activity_stream
Prevent nested encrypted field leak in activity stream
2017-05-24 09:55:29 -04:00
Aaron Tan
7f1f68ee28 Prevent nested encrypted field leak in activity stream. 2017-05-23 14:05:55 -04:00
Chris Meyers
4461c8fe91 more robust insights error handling 2017-05-22 17:32:17 -04:00
Wayne Witzel III
356a2bc057 Use contains for search query in SmartFilter 2017-05-22 13:48:42 -04:00
Wayne Witzel III
631f82b574 Merge pull request #6304 from wwitzel3/issue-6193
Extend SmartFilter to expand search and related search fields
2017-05-19 18:22:04 -04:00
Wayne Witzel III
530df327ca Call filter from BoolOperand and catch LookupError 2017-05-19 16:49:25 -04:00
Chris Meyers
cf26678cea remove not operator code instead of commenting 2017-05-19 16:38:41 -04:00
Wayne Witzel III
b99a118aae Revert back to more explicit ParseException 2017-05-19 16:15:44 -04:00
Wayne Witzel III
bac1e8b4fe Extend SmartFilter to expand search and related search fields 2017-05-19 16:05:24 -04:00
Chris Meyers
fceb09dc8c remove not operator
* We've switched from Q() to Host.objects.filter() and you can't do
~(Host.objects.filter()). We'd need to create an AST to track the
operations in order to perform the boolean logic ~ and we don't have
time for that now.
2017-05-19 14:40:02 -04:00
Wayne Witzel III
d652ed16d0 Dynamic -> Smart Inventory 2017-05-17 16:25:40 -04:00
AlanCoding
fbf24492d8 Instance group preference order consistent with docs 2017-05-15 15:45:10 -04:00
Wayne Witzel III
b2b15043c9 Test that the DynamicFilter does not return duplicates. 2017-05-15 12:10:57 -04:00
Wayne Witzel III
b9520c7f3b Merge pull request #6246 from wwitzel3/issue-5756
Create /inventories/N/update_inventory_sources endpoint.
2017-05-12 17:30:00 -04:00
Alan Rominger
5f3aad4972 Merge pull request #6256 from AlanCoding/relaunch_extra_creds
Job relaunch refactor to accommodate new credential system
2017-05-12 17:24:16 -04:00
AlanCoding
048804f48e Job relaunch refactor to accomidate new credential system
* make user_capability for 'start' more simple
* provide error messages if relaunch not possible
* check for prompted extra_credentials
* add extra_credentials permission checks in orphan mode
2017-05-12 17:16:06 -04:00
AlanCoding
c6a3a7cc34 JT RBAC edits for extra_credentials and vault_credential 2017-05-12 17:13:58 -04:00
Ryan Petrello
7c3b189eff Merge pull request #6252 from ryanpetrello/ssh_credential_refactor
refactor and fix ssh_private_key and ssh_key_unlock validation
2017-05-12 16:48:51 -04:00
Matthew Jones
b7622a6ed9 Remove test_partial 2017-05-12 16:46:55 -04:00
Chris Meyers
45d609e6a9 Merge pull request #6251 from chrismeyersfsu/fix-6235
boolean logic performed on filter results
2017-05-12 15:34:39 -04:00
Matthew Jones
1a4a6273a4 Merge branch 'rampart_groups_setup_playbook' into devel
* rampart_groups_setup_playbook:
  Updating changelog for Instance Groups
  Fix an incorrect reference on instance group jobs list
  Purge remaining references to rampart groups
  Simplify can_access for instance groups on job templates
  Adding Instance Group permissions and tests
  Increase test coverage for task scheduler inventory updates
  Exit logic fixes for instance group tools
  View Fixes for instance groups
  new view to allow associations but no creations
  Updating acceptance documentation and system docs
  Updating unit tests for task manager refactoring
  Update views and serializers to support instance group (ramparts)
  Implementing models for instance groups, updating task manager
  Updating the setup playbook to support instance group installation
  Add nginx to server start and switch back to first tmux win
  Fix an issue where the local queue wouldn't use the rabbitmq name
2017-05-12 13:40:30 -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
Chris Meyers
b55af095ef boolean logic performed on filter results
* Before, the boolean logic operators were performed against the Q()
objects, iteratively. Now, boolean logic is done after
Host.objects.filter(Q()). This results in the wanted and expected
results.
2017-05-12 09:26:11 -04:00
Alan Rominger
7a1c6c6794 Merge pull request #6241 from AlanCoding/scm_inv_feedback
SCM inventory acceptance and bug updates
2017-05-11 16:30:26 -04:00
Wayne Witzel III
54876e71e7 Added tests for post conditional logic 2017-05-11 15:31:39 -04:00
Matthew Jones
f8fc9cff5c Adding Instance Group permissions and tests 2017-05-11 15:14:18 -04:00
Matthew Jones
8bc1490368 Increase test coverage for task scheduler inventory updates
Also fixes some bugs found in that process
2017-05-11 14:36:13 -04:00
AlanCoding
14b5ab984b new view to allow associations but no creations 2017-05-11 13:11:11 -04:00
AlanCoding
97ca6bc897 SCM inventory acceptance and bug updates
* fixed a problem where the SCM last revision was not getting reset
* change the 400 editing error to just reset the last revision
* handle `source_vars` in the same way as custom scripts
* block unallowed `source_vars` in the validator
* hide POST in OPTIONS for inventory source sublist if not allowed
2017-05-11 12:04:48 -04:00
Ryan Petrello
44c1935590 Merge pull request #6232 from ryanpetrello/jt_promptable_extra_creds
add prompting for JT.extra_credentials
2017-05-11 07:51:36 -04:00
Ryan Petrello
53c3ece32b add prompting for JT.extra_credentials
see: #2913
2017-05-11 07:29:53 -04:00
Alan Rominger
2b15d04096 Merge pull request #6218 from AlanCoding/scm_inv_cancel
SCM inventory cancel propagation
2017-05-10 15:52:31 -04:00
Ryan Petrello
830c7901a3 Merge pull request #6222 from ryanpetrello/fix-6160
properly filter `User.password` from ActivityStream entries
2017-05-10 15:27:52 -04:00