Ryan Petrello
91c92d57e3
fix a bug in isolated job launches when there are no controllers online
...
see: https://github.com/ansible/tower/issues/2782
2018-08-07 17:27:23 -04:00
Ryan Petrello
2d4fbffb91
set the correct X-Forwarded-Port header to fix SAML auth
...
see: https://github.com/ansible/tower/issues/2314
2018-08-07 10:07:06 -04:00
Ryan Petrello
87d6940158
pin django-oauth-toolkit to our fork w/ a security fix
...
see: https://github.com/jazzband/django-oauth-toolkit/issues/625
2018-08-06 14:54:46 -04:00
Ryan Petrello
ec735b7b47
check oauth_scopes in _every_ view
...
see: https://github.com/ansible/tower/issues/2759
2018-08-06 11:05:59 -04:00
Ryan Petrello
7df027f826
fix to handle nonexistent system_id
2018-08-03 16:08:40 -04:00
Ryan Petrello
a3566b4270
fix up a minor OAuth2 token serializer nit
...
see: https://github.com/ansible/tower/issues/2751
2018-08-03 14:50:37 -04:00
Ryan Petrello
27f4e487ec
simpilfy LDAP GROUP_SEARCH misconfiguration failure handling
2018-08-02 10:11:18 -04:00
Ryan Petrello
2102c1ef0a
fix a bug in multi-LDAP authentication
...
see: https://github.com/ansible/tower/issues/2738
2018-08-01 17:55:13 -04:00
Ryan Petrello
0a400ca339
sprinkle some more i18n love for the credential form
...
see: https://github.com/ansible/tower/issues/2731
2018-07-31 22:13:17 -04:00
Ryan Petrello
5610cbe735
prevent host deletion when the related inventory is pending deletion
...
see: https://github.com/ansible/tower/issues/2690
2018-07-31 15:54:46 -04:00
Ryan Petrello
0aaa3807a9
allow access to JT labels if you have read access to the JT
...
see: https://github.com/ansible/tower/issues/2180
2018-07-31 15:13:24 -04:00
Ryan Petrello
8e3b72e1e5
more network UI cleanup (whoops)
2018-07-31 14:53:11 -04:00
Ryan Petrello
184db58fa3
set workflow status to failed if we find a node w/ a missing UJT
...
see: https://github.com/ansible/tower/issues/2576
2018-07-30 16:37:24 -04:00
Ryan Petrello
b99f211c7e
add some additional validation to JT.credentials
...
see: https://github.com/ansible/tower/issues/2612
2018-07-30 14:08:27 -04:00
Ryan Petrello
aee986d53c
fail immediately if an isolated host is unreachable at launch time
...
see: https://github.com/ansible/tower/issues/2643
2018-07-30 12:40:26 -04:00
Ryan Petrello
1a1b9e9138
redact the license key from settings.LICENSE activity stream entries
...
see: https://github.com/ansible/tower/issues/2671
2018-07-30 11:43:42 -04:00
Ryan Petrello
6f5259d017
remove the network UI
2018-07-30 11:03:53 -04:00
Ryan Petrello
78eb0444ae
fix a bug that causes orphaned auth_user rows when LDAP is misconfigured
...
see: https://github.com/ansible/tower/issues/2465
2018-07-30 09:59:20 -04:00
Ryan Petrello
3cdd0a94bd
simplify dynamic queue binding
...
we recently made a change so that instances no longer bind to
instance-group specific queues, but now instead they each bind to
a direct queue for their specific hostname
(https://github.com/ansible/tower/pull/1922 )
Because of this, we shouldn't *need* to reconfigure the queue binds at
runtime anymore when group membership changes. Under our new model,
every celeryd listens on a queue named after its hostname; when the
scheduler finds a task to run, it picks an Instance in the target
Instance Group and sends the task to the queue for that Instance's
hostname.
2018-07-28 00:48:37 -04:00
Ryan Petrello
7588e65786
change openshift edge termination policy to redirect (enforce https)
...
see: https://github.com/ansible/tower/issues/2591
related: https://docs.openshift.org/latest/architecture/networking/routes.html
2018-07-27 10:34:07 -04:00
Ryan Petrello
9b1961f60d
some celery-watcher tweaks
...
* give celery more time to reply over AMQP (the default timeout is 1s)
* record datestamps in celery watcher logs for debugging purposes
2018-07-26 17:16:05 -04:00
Ryan Petrello
bb034f007a
show the manual instance tag based on the correct instance attribute
...
see: https://github.com/ansible/tower/issues/2583
2018-07-26 10:24:35 -04:00
Ryan Petrello
15aaca8f03
make InstanceGroup.policy_instance_list non-exclusive by default
...
see: https://github.com/ansible/tower/issues/2583
2018-07-25 17:26:13 -04:00
Ryan Petrello
af84b25726
prevent cross site request forgery in websockets w/ the CSRF token
...
now that we have the CSRF middleware, we have a reliable token
available to us which we can use to verify individual ws_receive
payloads; this is _simpler_ than making sure you've properly configured
trusted origins, and it's also more secure than Origin header checks
see: https://github.com/ansible/tower/issues/2661
2018-07-25 09:47:53 -04:00
Ryan Petrello
c81d2f53c5
slightly refactor origin validity checks
2018-07-24 15:16:09 -04:00
Ryan Petrello
4b3ca080d4
improve robustness of host comparision for wss:// Origin headers
...
see: https://github.com/ansible/tower/issues/2647
2018-07-24 13:30:04 -04:00
Ryan Petrello
e7279f2fe2
reject ws:// connections w/ origin mismatches
...
see: https://github.com/ansible/tower/issues/2647
2018-07-23 21:56:31 -04:00
Ryan Petrello
7adc6c6f73
properly set InventorySource.status for CLI-based inventory_import
...
see: https://github.com/ansible/tower/issues/2476
2018-07-17 14:04:50 -04:00
Ryan Petrello
34fe54c6e0
Makefile update.
2018-07-16 14:45:44 -04:00
Ryan Petrello
55be530e27
awx metavars for job.created_by should be more robust to DoesNotExist
...
see: https://github.com/ansible/tower/issues/2509
2018-07-16 11:35:35 -04:00
Ryan Petrello
df0e28ec65
don't allow OAuth2 token creation for "external" users
...
see: https://github.com/ansible/tower/issues/2326
2018-07-12 14:33:59 -04:00
Ryan Petrello
090c585be5
remove unnecessary spaces
2018-07-11 09:50:50 -04:00
Ryan Petrello
387f7d3d67
don't allow isolated instances in IG.policy_instance_list
...
see: https://github.com/ansible/tower/issues/2394
2018-07-11 09:29:46 -04:00
Ryan Petrello
acd045379c
Revert "enforce JT/Job.timeout >= 0"
...
This reverts commit 1fb41cf8d0 .
2018-07-10 15:06:13 -04:00
Ryan Petrello
1fb41cf8d0
enforce JT/Job.timeout >= 0
...
see: https://github.com/ansible/tower/issues/2421
2018-07-10 08:25:36 -04:00
Ryan Petrello
1d09c6b25a
make the API browser direct you to the proper location post-login
2018-07-09 13:58:38 -04:00
Ryan Petrello
6bd9792518
default HTTP-based log emits to HTTPS
...
see: https://github.com/ansible/awx/issues/2048
2018-07-09 11:52:04 -04:00
Ryan Petrello
2916edd70f
Add a Location header to HTTP 201 for POST to copy endpoints
2018-07-09 08:47:01 -04:00
Ryan Petrello
9a2c359274
add instructions for running the UI webpack server on an external host
2018-07-06 14:52:34 -04:00
Ryan Petrello
ef211a4dc8
add a missing Location header on HTTP 201 in a few places
2018-07-06 11:34:48 -04:00
Ryan Petrello
172defa0d4
don't use codecs.open for syncing isolated stdout data
...
see: https://github.com/ansible/tower/issues/2315
2018-07-06 08:25:51 -04:00
Ryan Petrello
d1f5485b96
properly check read permissions in GET /api/v2/wfjt/N/copy/
...
see: https://github.com/ansible/tower/issues/2323
2018-07-03 15:15:00 -04:00
Ryan Petrello
b8dbf62abc
delete some old, dead code
2018-07-03 10:30:22 -04:00
Ryan Petrello
4d7a20a9fb
support env vars that contain unicode (without hanging)
...
see: https://github.com/ansible/tower/issues/2391
see: https://github.com/pexpect/pexpect/issues/512
2018-07-03 08:26:11 -04:00
Ryan Petrello
a8eb4327ea
make celery-watcher less noisy
2018-07-02 10:44:06 -04:00
Ryan Petrello
b8ed78ee9d
Never send WWW-Authenticate: Basic... headers for the API
2018-06-28 13:00:23 -04:00
Ryan Petrello
d52fa377d8
remove unnecessary CSRF exemptions
2018-06-28 09:35:01 -04:00
Ryan Petrello
3b0f7de3e6
Properly return HTTP 403 when CSRF fails (not HTTP 500)
2018-06-28 09:33:59 -04:00
Ryan Petrello
504dfd32ee
properly enforce CSRF validation
...
see: https://github.com/ansible/tower/issues/2339
2018-06-27 21:09:26 -04:00
Ryan Petrello
b2cdf82b78
make settings.SESSIONS_PER_USER work
...
see: https://github.com/ansible/tower/issues/2209
2018-06-27 12:09:56 -04:00
Ryan Petrello
f6920a02cf
make awx-manage expire_sessions --user xyz more robust
...
see: https://github.com/ansible/tower/issues/2316
2018-06-26 08:52:52 -04:00
Ryan Petrello
7880f83d97
don't send WWW-Authenticate: Basic for AJAX, and properly detect 401
2018-06-26 08:40:21 -04:00
Ryan Petrello
813a3be2b8
always specify cloud: True/False for JT/job credential summary
2018-06-21 11:16:35 -04:00
Ryan Petrello
c7125a335a
filter jt.summary_fields.credential.credential_type from /api/v1/
2018-06-21 11:03:23 -04:00
Ryan Petrello
83ecea2377
don't show summary_fields.credential.credential_type_id on /api/v1/
2018-06-21 09:19:47 -04:00
Ryan Petrello
78f6907c1b
don't show inventory_source/update.related.credentials in /api/v1/
2018-06-20 17:21:08 -04:00
Ryan Petrello
ff2f7aa950
expedite the heartbeat when an isolated node is registered
2018-06-19 15:37:02 -04:00
Ryan Petrello
471ff69257
stop setting celery's hostname dynamically (it's passed via the cli)
2018-06-19 12:16:00 -04:00
Ryan Petrello
ef6433c6f9
Revert "fix celery task reaper"
...
This reverts commit 1359208a99 .
2018-06-18 16:18:20 -04:00
Ryan Petrello
eb9083c447
allow the bundled ansible virtualenv to be selected on JT/Proj
...
see: https://github.com/ansible/awx/issues/34
2018-06-18 14:33:09 -04:00
Ryan Petrello
427271f791
fix busted migrations
2018-06-15 20:38:57 -04:00
Ryan Petrello
45fb262556
fix a bug in JobTemplate.extra_credentials summary_fields
...
see: https://github.com/ansible/tower/issues/2184
2018-06-15 12:19:40 -04:00
Ryan Petrello
0bcbccba33
enforce True or False for boolean credential injectors
...
see: https://github.com/ansible/tower/issues/2038
2018-06-14 12:34:54 -04:00
Ryan Petrello
84eacfc360
fix a few isolated dev issues
...
the main goal of this change is to make `make docker-isolated` work out
of the box
- specify the proper version for awx-expect --version
- update some deprecated playbook bits
- change the isolated container to privileged so bwrap will work
- fix awx-manage test_isolated_connection
- expedite the first isolated heartbeat so you don't have to wait 10m;
this is accomplished by _not_ setting Instance.last_isolated_check to
now() at insertion time (which causes the next check not to happen for
10 minutes)
- fix a bug that caused isolated node execution to fail when bwrap was
enabled
see: https://github.com/ansible/tower/issues/2150
This reverts commit 9863fe71dc .
2018-06-13 14:17:58 -04:00
Ryan Petrello
c3bda8e259
properly detect settings.AUTHENTICATION_BACKEND changes for SSO logins
...
see: https://github.com/ansible/tower/issues/1979
2018-06-12 15:24:09 -04:00
Ryan Petrello
1733a20094
make sdb-listen work for docker-compose-cluster
...
use a different port range for each container, because docker can't map
them all to the same port range
2018-06-12 13:57:28 -04:00
Ryan Petrello
d0d7bf5c21
more gracefully handle fact cache failures for hosts that contain /
...
see: https://github.com/ansible/awx/issues/1977
related: https://github.com/ansible/ansible/issues/41413
2018-06-11 15:38:09 -04:00
Ryan Petrello
62c5784833
fix failing flake8
2018-06-11 15:21:47 -04:00
Ryan Petrello
88e3c46810
add a background process to spot celery hangs and reload the worker pool
...
see: https://github.com/ansible/tower/issues/2085
2018-06-11 12:22:21 -04:00
Ryan Petrello
195aff37ad
default instance capacity to zero at registration/insertion time
...
if the first health check fails due to AMQP or celery issues, the
capacity will stay at the default of 100 (which is confusing)
see: https://github.com/ansible/tower/issues/2085
2018-06-07 11:42:31 -04:00
Ryan Petrello
d0249d3ae6
sprinkle more i18n for certain field labels
...
see: https://github.com/ansible/tower/issues/2063
2018-06-06 14:06:34 -04:00
Ryan Petrello
97fc745329
fix a setting help text typo
2018-06-04 16:28:26 -04:00
Ryan Petrello
581756527e
fix an i18n-related bug that affects non-English hipchat users
...
see: https://github.com/ansible/tower/issues/951
2018-06-04 15:02:27 -04:00
Ryan Petrello
6183e5166d
fix a failing timezone test
2018-06-01 09:51:42 -04:00
Ryan Petrello
99d2f3ea34
allow Jinja2 in ansible -a when ALLOW_JINJA_IN_EXTRA_VARS is 'always'
2018-05-31 11:49:50 -04:00
Ryan Petrello
9bc871db47
add a test for tower inventory syncs
2018-05-30 15:13:49 -04:00
Ryan Petrello
354b076956
clean up Tower inventory error handling
...
related: https://github.com/ansible/tower/pull/1697
related: https://github.com/ansible/tower-qa/pull/1746
2018-05-30 13:34:14 -04:00
Ryan Petrello
c369d44518
use the _correct_ argument to specify poll vs select
2018-05-29 11:25:08 -04:00
Ryan Petrello
7f7f635f7b
upgrade to the latest pexpect
...
see: https://github.com/pexpect/pexpect/pull/492
see: https://github.com/ansible/tower/issues/1797
2018-05-29 09:52:59 -04:00
Ryan Petrello
af7ec17ccd
fix a few minor issues that have broken the User Token creation
...
see: https://github.com/ansible/tower/issues/1928
2018-05-25 17:37:02 -04:00
Ryan Petrello
e03c584b80
mark dynamic Credential Type labels and help_text for i18n
...
see: https://github.com/ansible/tower/issues/1960
related: https://github.com/ansible/ansible-tower/pull/6844
2018-05-25 15:08:11 -04:00
Ryan Petrello
a0433773d8
don't allow Accept:application/json on /api/login/
...
see: https://github.com/ansible/tower/issues/1672
2018-05-25 14:21:22 -04:00
Ryan Petrello
870adc14f9
fix a bug in the instance policy algorithm when both min and % are used
...
see: https://github.com/ansible/tower/issues/897
2018-05-24 12:28:46 -04:00
Ryan Petrello
c9c7a4b8f4
fix a few broken network UI tests
2018-05-24 09:46:35 -04:00
Ryan Petrello
37264d9d21
rename some tests from unit -> functional
2018-05-24 09:27:34 -04:00
Ryan Petrello
3abdf66794
run network ui tests in shippable and Jenkins
2018-05-24 09:07:53 -04:00
Ryan Petrello
63f089c712
allow any authenticated user to access the schedule preview API endpoint
...
see: https://github.com/ansible/tower/issues/1939
2018-05-23 16:51:58 -04:00
Ryan Petrello
d8f86ecba0
add help text for the new custom_virtualenv field
...
see: https://github.com/ansible/tower/issues/1866
2018-05-23 16:19:59 -04:00
Ryan Petrello
28a42850a2
allow AUTH_LDAP_USER_FLAGS_BY_GROUP to specify an OR'd list for a flag
...
see: https://github.com/ansible/tower/issues/968
2018-05-23 14:45:46 -04:00
Ryan Petrello
f434196bae
store denormalized metadata about ActivityStream.actor for accounting
...
see: https://github.com/ansible/tower/issues/1782
2018-05-23 09:47:26 -04:00
Ryan Petrello
d493a4e0d0
revert expect(use_poll=True) due to a bug that causes os.read() hangs
...
There's a bug in the implementation in pexpect:
pexpect/pexpect#491
Issues that could be related to this:
ansible/awx#1870
ansible/awx#1840
Rolling this back will cause #861 to no longer be "fixed". We'll have to solve it another way, or wait for pexpect to fix the poll bug.
2018-05-21 12:42:20 -04:00
Ryan Petrello
4abac44411
prevent unicode in instance hostnames and instance group names
...
see: https://github.com/ansible/tower/issues/1721
2018-05-18 16:28:43 -04:00
Ryan Petrello
51f66b8c0a
filter /api/v2/users/N/tokens/ to only show tokens for _that_ user
...
see: https://github.com/ansible/tower/issues/1773
2018-05-17 15:44:35 -04:00
Ryan Petrello
b6923bdbeb
speed up a handful of really slow stdout tests
...
before: 59 passed in 95.20 seconds
after: 59 passed in 11.09 seconds
2018-05-17 13:27:18 -04:00
Ryan Petrello
53ef9ed288
never convert ANSI codes to HTML for format /stdout/?format=json
...
see: https://github.com/ansible/awx/issues/1863
2018-05-16 11:20:55 -04:00
Ryan Petrello
39cb1cb60c
fix a nuanced parsing bug in naive UNTIL= parsing
2018-05-16 09:35:04 -04:00
Ryan Petrello
db1a669c68
work around a django-polymorphic bug that breaks certain cascades
...
see: #1794
2018-05-15 16:55:37 -04:00
Ryan Petrello
d5fbb2d3b6
remove md5 password hashing in dev
2018-05-15 14:57:47 -04:00
Ryan Petrello
3ab7f06f95
run scm inv syncs at the project root so relative imports work w/ bwrap
...
see: https://github.com/ansible/tower/issues/1357
2018-05-15 12:00:37 -04:00
Ryan Petrello
05b0c5ec6f
censor OAuth tokens from activity stream deletion records
...
see: https://github.com/ansible/tower/issues/1772
2018-05-15 09:16:37 -04:00