Commit Graph
100 Commits
Author SHA1 Message Date
Matthew Jones 910f9bd4a3 Fixing up some flake8 issues 2015-12-17 10:48:15 -05:00
Matthew Jones 9db80bd9fc Support tower license within the database
With backwards support for the file-based license
2015-12-16 11:21:52 -05:00
Matthew Jones 35b19bf220 Update settings references
* PROOT
* Pendo tracking state
* ad hoc commands
* activity stream
* org admin visibility
2015-12-15 16:44:08 -05:00
Matthew Jones a4d4e6d0fb Comment out some settings tougher to implement
Specifically ldap and radius
2015-12-15 16:42:54 -05:00
Matthew Jones 0404f6ebc3 Add a note about caching 2015-12-15 16:42:32 -05:00
Matthew Jones dfd1ca4ae9 Relocate AUTH_TOKEN_* settings reference 2015-12-15 15:37:26 -05:00
Matthew Jones e97e60bd30 Update settings location for certain values
* PROJECTS_ROOT
* JOBOUTPUT_ROOT
* SCHEDULE_MAX_JOBS
* STDOUT_MAX_BYTES_DISPLAY
2015-12-15 15:14:16 -05:00
Matthew Jones 16aa34522c Fix up an export issue for tower_settings 2015-12-15 15:13:58 -05:00
Matthew Jones 7867a58c00 RBAC and settings reset
* Initial super-user only rbac with notes for future user-settings
  support
* Clearing individual and all settings back to defaults
2015-12-15 12:12:54 -05:00
Matthew Jones 273181e894 Expand dbconfig support
* Support updating settings values
* Support activity stream endpoint
* Support clearing value
* Improve type conversion system for displaying values
2015-12-14 15:09:10 -05:00
Matthew Jones f53f3d805d View and some validation logic for database config
* Fixing some bugs in the manifest definition
* Database model and schema migration for tower settings
* Initial View and Serializer implementation using a strategy of merging
  model instances and named tuples
2015-12-11 16:57:11 -05:00
Matthew Jones fdcda43de6 Initial Database Configuration bootstrap
* Settings manifest, mapping internal settings to what can be used in
  the database along with type information etc.
* Initial Database model
* Helper object that overlays database settings on django settings
2015-12-07 09:49:13 -05:00
Matthew Jones 3d30ad2db2 Updates for fixes on the core ec2 inventory module
Inventory syncs will still fail if you specify an instance_filter.  We
need to check:

https://github.com/ansible/ansible/pull/13178

For the moment I'm making sure we specifically disable elasticache
querying but it still yields an error.

Will follow up with:

https://trello.com/c/h1U0w4WC/138-ec2-module-is-busted-if-you-set-instance-filters
2015-11-23 14:22:36 -05:00
Matthew Jones 76b02cde05 Fix job template job sorting
"started" isn't a good field to sort on as it can be Null.  "created"
will always be available.
2015-11-23 13:42:39 -05:00
Matthew Jones d8831dedeb Merge branch 'release_2.4.1' into devel
* release_2.4.1:
  Update reprepro component version
  vendoring ng-pendo as an Tower module
  Updating version number and changelog for 2.4.1
  Fix up location of apt key for mongo
2015-11-23 12:22:32 -05:00
Matthew Jones e646715773 Merge branch 'release_2.4.0' into devel
* release_2.4.0: (24 commits)
  CheckAccess for related fields for teams
  Don't save the instance in set_actor if the user is invalid
  fixed related values not populating in teams ui
  update to more performant and 2.7.9 SSL-friendlier version of pywinrm
  added dm.xmlsec.bindin license
  stop waiting after summary fields are grabbed
  Remove social auth user fields settings that don't have any effect.
  fixed social authd user license issue
  Remove cedric-vincent proot repo
  Updating changelogs and readme
  Fix typo in AnonymousUser
  Fix an issue reauthing as a social auth user
  fixed organization rest call from happening
  fixed messing up add user form w social auth pw hide earlier
  Update response object nesting for pendo service
  update requirements.txt README
  hide un and pw fields when user is social auth based
  add pyrad to requirements.txt
  added appdirs
  add django-radius license
  ...
2015-11-23 12:19:37 -05:00
Matthew Jones fa0d4f180b Updating version number and changelog for 2.4.1 2015-11-19 09:17:49 -08:00
Matthew Jones 7ffbb2dac6 Don't save the instance in set_actor if the user is invalid 2015-11-18 07:27:52 -05:00
Matthew Jones e8d420abeb Updating changelogs and readme 2015-11-17 13:36:05 -05:00
Matthew Jones 98965d4792 Fix typo in AnonymousUser 2015-11-17 12:46:50 -05:00
Matthew Jones 564f9e2c58 Fix an issue reauthing as a social auth user
If a social auth user is deleted and then attemnpts to relogin after the
old user object has been removed then it can cause an error.  So here
we'll add an extra lookup for the user just to verify
2015-11-17 12:42:33 -05:00
Matthew Jones 3b07773bcd Merge branch 'release_2.4.0' into devel
* release_2.4.0: (70 commits)
  Disallow changing a users password for social auth
  bump django-radius to include new license
  Change Jenkins server references from IP to DNS name
  Social auth and SSO updates:
  allow multi-org expired licenses to delete orgs
  Add social log messages to tower's log on error
  Update default scopes requested for github social auth.
  Switch to matburt's fork for python social auth
  Emit a warning for unmapped SAML paramters
  Fix up some SAML issues
  Remove `environment` play stmt
  Use correct aw_repo_url when building packer
  Add missing libxmlsec1 openssl dependency for ubuntu
  adds socket tests
  added git pre commit hook to run flake8
  fixes remove_instance error
  null pointer exception
  Resolve issue on precise keeping old debs around
  Attach handlers to django_auth_ldap
  Attach handlers to django_auth_ldap
  ...
2015-11-16 15:12:37 -05:00
Matthew Jones dfb056d200 Disallow changing a users password for social auth 2015-11-16 10:09:22 -05:00
Matthew Jones 4832f48e06 Add social log messages to tower's log on error 2015-11-12 13:47:17 -05:00
Matthew Jones 7f276b03fb Switch to matburt's fork for python social auth
This picks up the change needed for python 2.6 to work
2015-11-11 16:06:37 -05:00
Matthew Jones 5f321ecab6 Emit a warning for unmapped SAML paramters 2015-11-11 16:05:53 -05:00
Matthew Jones fdc9979595 Fix up some SAML issues
* Fix an issue I created overriding authenticate
* Fix up attribute mapping using an identity provider class.  The
  methods built into django-social-auth for saml are probably not going
  to work.  We also now expose those mappings in a settings attrs map
  that the user can override.
2015-11-10 11:58:42 -05:00
Matthew Jones b2cfd38a1c Update dm.xmlsec.bindings requirement to point to a version with updated cflags 2015-11-04 16:43:06 -05:00
Matthew Jones f78f69159d Fix up pyflakes indentation issues 2015-11-04 09:50:50 -05:00
Matthew Jones ec6ef4974a Update GCE Region Choices per Google 2015-11-03 23:34:46 -05:00
Matthew Jones 99f048dfe5 Add object_association for m2m relationships
Now when displaying a m2m relationship change we'll show the related
field mapping that changed.
2015-11-02 14:39:24 -05:00
Matthew Jones 113c5ed78f Clean up authenticate and get_user for ldap auth 2015-11-02 12:02:14 -05:00
Matthew Jones dd29bc40d9 Add logging and improve validation for certain auth backends
* Abstract authention to provide a hook for emitting an error message
* Perform some license validation that wasn't present before for
  enterprise licenses
2015-11-02 11:59:17 -05:00
Matthew Jones 2ba7b3bdac Update vendored ec2 module 2015-10-29 13:27:34 -04:00
Matthew Jones 4603ac5d1c Change dependent job failure message entity ref.
Originally we were looking at the underlying project/inventory update
but we are now populating the name of project updates and inventory
updates a lot better so we'll just take their names
2015-10-22 10:49:42 -04:00
Matthew Jones 152ddc4f4f Rename task_ to job_ for pre-task fail error 2015-10-20 21:32:45 -04:00
Matthew Jones 45982e50e6 Merge branch 'release_2.4.0' into devel
* release_2.4.0: (94 commits)
  Fix up location of apt key for mongo
  Handle playbook_on_include events from v2 ansible
  if basic auth in headers, don't use cookie token
  Add a docker-ui container to the compose workflow
  Fix custom inventory scripts on org deletion
  adding check for missing session time from local storage
  Properly handle idle/expired session across tabs
  fixed system tracking date issues
  Improve postgres user creation
  Remove silly user check in postgres config
  Fix typo in `clean` target
  fixed sources scope regions issue
  fixed scan date being the earlier one when identical
  fixed the console errors for the sources scope
  fixed console error
  fixed standard out load for adhoc commands
  fixing custom inventory script error
  Revert "change list separator for adhoc host patterns"
  Revert "update awFeature ldap to enterprise_auth"
  Revert "Change delimiter from ':' to ','."
  ...
2015-10-20 16:10:02 -04:00
Matthew Jones b579b76099 Handle playbook_on_include events from v2 ansible 2015-10-20 11:18:07 -04:00
Matthew Jones 99da0965ef Add a docker-ui container to the compose workflow 2015-10-19 12:07:09 -04:00
Matthew Jones b25413002c Fix custom inventory scripts on org deletion
We'll now clear the organization for it, this requires a database
migration to accept null values for custom inventory scripts
2015-10-19 12:07:09 -04:00
Matthew Jones 1bbd5fbe0a Update UI error text for single data picker
When no data is available
2015-10-14 10:19:05 -04:00
Matthew Jones fd33d7df58 Tweak proj rbac for orphaned projects
Slight tweak to the rbac for projects related to the user who created
them.  IF a user created a project but it is orphaned/not associated
with an organization then they will be able to see/change it.  If,
however, it is created and associated with an organization and then they
are removed as an org admin they will no longer have access to it.
2015-10-13 16:42:12 -04:00
Matthew Jones a27a620bcf Remove pdb trace from unit test 2015-10-13 14:10:40 -04:00
Matthew Jones 4b46f33299 Fix up unit tests for overwrite_vars 2015-10-13 11:38:37 -04:00
Matthew Jones f7ebf956c1 Remove the created_by access ability for projects
Now, simply being the creator of a project does not convey any access
for users.  You must be in a project/team that has access to it and you
must be an org admin for an org that has the project to be able to make
changes to it
2015-10-13 11:24:48 -04:00
Matthew Jones 46aa6dfabb Prevent deleting organizations on basic licenses
Plus unit tests
2015-10-12 14:52:03 -04:00
Matthew Jones 98c1301e23 Clean up some flake8 issues 2015-10-12 14:18:02 -04:00
Matthew Jones 231a7d8f77 Add rax module to those not scanned by flake8 2015-10-12 13:52:17 -04:00
Matthew Jones 6cd39efb85 Add a cleanup_authtokens management command
We also will now clean these up during cleanup_deleted
2015-10-12 13:44:22 -04:00
Matthew Jones ae3f5c220e Change celery task id in dependent job failure msg
We'll now display a little json that should help the UI in rendering a
link to the dependent job in the job detail screen
2015-10-12 13:24:03 -04:00
Matthew Jones 6e2efd3f8a Overwrite should not imply overwrite-vars 2015-10-12 13:07:50 -04:00
Matthew Jones 484a33f9c6 Update azure module from ansible 2015-10-12 11:46:20 -04:00
Matthew Jones 7a7e1941b1 Update vmware module from ansible 2015-10-12 11:44:58 -04:00
Matthew Jones e7c274b80c Updating rax module from ansible 2015-10-12 11:41:59 -04:00
Matthew Jones d382bf6f4f Update to latest GCE inventory module 2015-10-12 11:37:00 -04:00
Matthew Jones 9dd0c7ae1f Fix api static location references for api browser 2015-10-09 14:26:00 -04:00
Matthew Jones 40d2b9c9be Revert "Bump version number for devel to 3.0"
This reverts commit 9b51362ee6f63afebade5fd9a4ccb74ad6ae4eb1.
2015-10-09 12:22:42 -04:00
Matthew Jones 4dc56e5d66 Fix an issue with ansible 2.0 and our fact cacher
This will be dependent on a PR submitted to core for 2.0 also:
https://github.com/ansible/ansible/pull/12695

So will not work right away unless you are pulling from devel.
2015-10-09 12:17:17 -04:00
Matthew Jones 523a96ebce Add mongo shell container entrypoint also 2015-10-09 12:16:49 -04:00
Matthew Jones 531f00b1ac rm the old docker run container after stopping 2015-10-09 12:04:34 -04:00
Matthew Jones e543a806ee Bump version number for devel to 3.0 2015-10-09 11:58:48 -04:00
Matthew Jones aa9357fb14 Include new social auth settings in compose 2015-10-09 11:58:48 -04:00
Matthew Jones ad95548d48 Fix up docker compose local settings 2015-10-09 11:58:48 -04:00
Matthew Jones bfc9512dc7 Also remove .deps_built with make clean 2015-10-09 11:58:48 -04:00
Matthew Jones 950a299c87 Add swig to dependencies for compose 2015-10-09 11:58:47 -04:00
Matthew Jones f85fb0551d Add libxmlsec1-dev to the docker compose workflow 2015-10-09 11:58:47 -04:00
Matthew Jones f4fb43fdcd Merge remote-tracking branch 'upstream/release_2.4.0' into devel
* upstream/release_2.4.0:
  Re-enable cedric-vincent to get installs working
  Handle cedric-vincent horrible proot version
  Allow AMI/vagrant builds to proceed
  Fix RPM builds failures building m2crypto
  Update RPM to support 2.4.0 builds
  Add RPM BuildRequires for xmlsec1-openssl-devel
  Correct typo in debian dependency list
  Debian cannot handle release dependencies
2015-10-06 12:07:05 -04:00
Matthew Jones c55741f6c6 Bump version number for devel to 3.0 2015-10-06 10:38:08 -04:00
Matthew Jones 6353277a16 Include new social auth settings in compose 2015-10-05 14:02:38 -04:00
Matthew Jones 2c873e0d1d Fix up docker compose local settings 2015-10-05 14:00:11 -04:00
Matthew Jones b937a4729b Also remove .deps_built with make clean 2015-10-05 13:55:59 -04:00
Matthew Jones 4c632d5f59 Add swig to dependencies for compose 2015-10-05 13:21:38 -04:00
Matthew Jones a49263ba41 Add libxmlsec1-dev to the docker compose workflow 2015-10-05 12:07:17 -04:00
Matthew Jones b06f7fb883 Remove logging from fact init 2015-10-02 16:56:13 -04:00
Matthew Jones dbd0a01410 Merge branch 'release_2.3.1' into devel
* release_2.3.1:
  Add 2.3.1 to the reprepro distribution manifest
  Update version to 2.3.1 and update changelog
  Remove unused time import
  Fix proot controlpersist cleanup issue
  Propagate necessary build changes from devel
  Update reprepro components
  Reenable the reprepro i386 repository
  Fix supervisor migration
  Fix reprepro/conf path in Makefile
  prefer the first version when packages are ambiguous
  Correct error message
  Fix omission
  Correct conditional stmt
  Improve logging when sourcerpm fails
  Fix typo
  Fix OFFICIAL deb Makefile
2015-10-02 16:37:45 -04:00
Matthew Jones 4bcd19f833 Merge branch 'release_2.3.1' into stable
* release_2.3.1:
  Add 2.3.1 to the reprepro distribution manifest
  Update version to 2.3.1 and update changelog
  Remove unused time import
  Fix proot controlpersist cleanup issue
2015-10-02 16:33:31 -04:00
Matthew Jones ac37667649 Clean up fact module imports 2015-10-02 16:08:02 -04:00
Matthew Jones c65d068d55 Add note about wanting to use register_connection
I think this would be the cleaner way to go about things but there are
some unanswered questions about that route.
2015-10-02 16:04:47 -04:00
Matthew Jones 1425718d9e Improve the efficiency of mongo connections
- Remove the connect action in the fact __init__ module
- Monkeypatch mongoengine.Document's _get_db to force a new connection
  or raise an error if we don't have the proper settings.
2015-10-02 15:57:50 -04:00
Matthew Jones 71081a5b63 Update version to 2.3.1 and update changelog 2015-10-01 14:40:21 -04:00
Matthew Jones 0146b8acb0 Remove unused time import 2015-10-01 14:40:20 -04:00
Matthew Jones b4ed547b2b Fix proot controlpersist cleanup issue
* Also removed psutil version and feature check from tasks.  We now
  include the most recent version of psutil all around
* Old versions of psutil must have had these Process() items as
  properties, they are functions now so we weren't properly evaluating
  them.  With this change we are and things are back to working normally
2015-10-01 14:40:20 -04:00
Matthew Jones 6a3a36513a Add failure test for sts tokens 2015-10-01 10:49:58 -04:00
Matthew Jones 5de5b0209b Remove unused time import 2015-09-30 16:20:41 -04:00
Matthew Jones e034c0b326 Fix proot controlpersist cleanup issue
* Also removed psutil version and feature check from tasks.  We now
  include the most recent version of psutil all around
* Old versions of psutil must have had these Process() items as
  properties, they are functions now so we weren't properly evaluating
  them.  With this change we are and things are back to working normally
2015-09-30 15:56:31 -04:00
Matthew Jones acc974289f Unit test for AWS STS token support 2015-09-30 13:42:16 -04:00
Matthew Jones 5ee3c78e7f Update ec2 module to latest ansible version 2015-09-30 13:40:06 -04:00
Matthew Jones 34e028b8c7 Adding security token field to support ec2 sts
And any future credential that might want to use "security_token"
2015-09-30 13:39:36 -04:00
Matthew Jones 29b4865af8 Ability to pause pexpect output with env var
Since inventory updates don't support extra vars
2015-09-29 11:36:31 -04:00
Matthew Jones 5be53d4a79 Add a sleep step to job runs if configured
If the extra var PEXPECT_SLEEP is given to a job then it will
artificially delay the job run by that number of seconds allowing QA to
hook in and cancel the job
2015-09-28 15:43:46 -04:00
Matthew Jones a3410920a9 Remove management job schedule count restriction 2015-09-25 16:00:19 -04:00
Matthew Jones 3d7f25218a Add api side support for pendo
Also adds setup playbook support for pendo.  This change anticipates
that the default for new installations will be 'detailed'
2015-09-25 15:52:42 -04:00
Matthew Jones a7f1e69352 Fix an issue with default schedules
These weren't being created correctly, the logic meant an extra schedule
would be created on cleanup facts erroneously selected to be cleanup
activity stream
2015-09-25 14:17:31 -04:00
Matthew Jones 2135a6651b Hash the license key to show a deployment key
This can be used by pendo and other things that need to identify an
individual deployment without exposing the actual license key
2015-09-25 13:21:08 -04:00
Matthew Jones 3a6807c5b4 Add environment variable that sets proot's tmp dir
Only really useful with patched proot containing tmpdir fix
2015-09-25 11:08:03 -04:00
Matthew Jones 256af567de Merge branch 'release_2.3' into devel
* release_2.3: (24 commits)
  Updated package changelogs
  Rephrase task name
  Make purge supervisor.conf conditional on 2.2 el6
  Fix another name typo.
  Update python-ldap license text.
  Add LGPL source directly so it gets shipped.
  Update font-awesome licenses per legal feedback
  Remove bundled_licenses - we are shipping the source for bundled items, and therefore do not need to provide this separately.
  Add more license texts.
  Add full Apache licenses to files, per Pam.
  Attempt to harden mongodb tgz download
  Correct DJRF/DJRF-mongoengine licenses, rename qsstats license to match pkg name.
  Fix some typos in file names, and add licenses for some things we have modified in our own repos.
  Update Ubuntu depends and ppa's
  Include source for bundled packages in bundle.
  Include license information in packaging
  Add READMEs for the license directories.
  vendored python licenses
  Add bundled licenses documentation
  Revert to stock libzmq3 for deb depends
  ...
2015-09-22 15:57:32 -04:00
Matthew Jones 66168fb6dc Merge branch 'release_2.3' into stable
* release_2.3: (169 commits)
  Updated package changelogs
  Rephrase task name
  Make purge supervisor.conf conditional on 2.2 el6
  Fix another name typo.
  Update python-ldap license text.
  Add LGPL source directly so it gets shipped.
  Update font-awesome licenses per legal feedback
  Remove bundled_licenses - we are shipping the source for bundled items, and therefore do not need to provide this separately.
  Add more license texts.
  Add full Apache licenses to files, per Pam.
  Attempt to harden mongodb tgz download
  Correct DJRF/DJRF-mongoengine licenses, rename qsstats license to match pkg name.
  Fix some typos in file names, and add licenses for some things we have modified in our own repos.
  Update Ubuntu depends and ppa's
  Include source for bundled packages in bundle.
  Include license information in packaging
  Add READMEs for the license directories.
  vendored python licenses
  Add bundled licenses documentation
  Revert to stock libzmq3 for deb depends
  ...
2015-09-22 15:37:31 -04:00
Matthew Jones 4cf2f32451 Remove the contents of tmp/ on clean 2015-09-22 11:04:40 -04:00
Matthew Jones 077819c4c5 Add some default schedules for cleanup jobs 2015-09-21 14:53:53 -04:00
Matthew Jones 5fa0ce9d58 Include apt-get update with install
This forces the Docker apt-get update to not attempt to re-use the cache
2015-09-21 14:52:43 -04:00