Commit Graph

36 Commits

Author SHA1 Message Date
adamscmRH
8cc77234fc revert django-radius from 1.3.3 to 1.1.0 2018-06-22 15:01:11 -04:00
adamscmRH
90308066af update radius backend for dr1.3.3 2018-04-25 15:04:46 -04:00
chris meyers
e3c362956d add ldap group type like posixGroupType
* Adds pattern to easy add django-auth-ldap group types classes and to
pass parameters via AUTH_LDAP_GROUP_TYPE_PARAMS
* Adds new group type PosixUIDGroupType that accepts the attribute,
ldap_group_user_attr, on which to search for the user(s) in the group.
2018-03-21 09:13:08 -04:00
cclauss
2e623ad80c Change unicode() --> six.text_type() for Python 3 2018-02-11 21:09:12 +01:00
cclauss
c371b869dc basestring to six.string_types for Python 3 2018-02-09 16:28:36 +01:00
Chris Meyers
2ed97aeb0c implement multiple ldap servers 2018-01-11 09:03:14 -05:00
Matthew Jones
9dbcc5934e Merge remote-tracking branch 'tower/release_3.2.2' into devel 2017-12-13 12:25:47 -05:00
Wayne Witzel III
6d6bbbb627 Update URL strucuture, fixed string based calls 2017-11-09 17:24:04 -05:00
Matthew Jones
6fa283fc98 Merge branch 'release_3.2.0' into devel
* release_3.2.0: (66 commits)
  fix workflow maker lookup issues
  adding extra logic check for ansible_facts in smart search
  adding "admin_role" as a default query param for insights cred lookup
  changing insights cred lookup to not use hard coded cred type
  fix rounding of capacity percentage
  Catch potential unicode errors when looking up addrinfo
  fixing typo with adding query params for instance groups modal
  move percentage capacitty to variable
  Add unit test for inventory_sources_already_updated
  Check for inventory sources already updated from start args
  Fixed inventory completed jobs pagination bug by setting default page size
  Remove the logic blocking dependent inventory updates on callbacks
  fix instance group percentage
  Remove host-filter-modal import
  Fix partial hover highlight of host filter modal row
  Removed leading slash on basePath
  Fixed host nested groups pagination
  Added trailing slash to basePath
  Fixed nested groups pagination
  Fixed host_filter searching related fields
  ...
2017-10-10 16:09:43 -04:00
Ryan Petrello
b372cebf8d fix a bug when Tower is integrated with ipsilon SAML server
https://github.com/ansible/ansible-tower/issues/6683
2017-10-10 14:38:46 -04:00
Ryan Petrello
f2f42c2c8a don't append to the activity stream on LDAP group disassociate
for organizations w/ a large number of ldap orgs/teams, this results in
a _huge_ number of extraneous activity stream entries

see: https://github.com/ansible/ansible-tower/issues/7655
2017-10-10 14:38:18 -04:00
Aaron Tan
9bae656676 Restore SAML enterprise user auth logic
Connect #7666 of ansible-tower and follow up original fix tower #455.
The original fix solves the problem of duplicated db keys, but breaks a
rule of enterprise users that 'Enterprise users cannot be
created/authenticated if non-enterprise users with the same name has
already been created in Tower.'. This fix resumes that rule.

Signed-off-by: Aaron Tan <jangsutsr@gmail.com>
2017-09-26 09:51:42 -04:00
Wayne Witzel III
39cc427668 get_or_create already saves, no need to call again 2017-09-22 16:25:55 -04:00
Wayne Witzel III
e9e027ecd7 Fix issue when the enterprise_auth has already been created 2017-09-22 15:58:39 -04:00
Patrick Uiterwijk
830012e2f4 Fix using SAML NameID
Without this patch, SAML backend will only use the first letter of the NameID as attribute value.

Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2017-09-07 20:54:27 +00:00
Ryan Petrello
147d795fa0 force python-ldap to create a new SSL context for OPT_X_TLS_REQUIRE_CERT
according to the internet, this is a thing that is necessary for
python-ldap:

71024518db (diff-1a5a32c6cc1ae9767cb2008703e4534fR41)
https://stackoverflow.com/a/29722445
https://stackoverflow.com/a/38136255

see: https://github.com/ansible/ansible-tower/issues/7335
2017-07-31 13:59:36 -04:00
Aaron Tan
70cccb0e57 Expand scope of enterprise user types. 2017-06-20 12:17:13 -04:00
Aaron Tan
3094527759 Fix usage of tacacs API 2017-05-31 11:49:03 -04:00
Aaron Tan
a15bc6d0f7 Merge pull request #6295 from jangsutsr/6243_update_user_profile_to_record_source_backend
Introduce sso UserEnterpriseAuth model
2017-05-24 09:42:41 -04:00
Aaron Tan
d314f83416 Introduce sso UserEnterpriseAuth model. 2017-05-22 13:30:00 -04:00
Aaron Tan
4f9875f895 Prevent LDAP user from imposing existing Tower user. 2017-05-18 16:39:58 -04:00
Aaron Tan
f5e58922ab Create tacacs and radius users with password disabled. 2017-05-09 16:36:50 -04:00
Aaron Tan
7a6364c642 Prevent third-party-based user from imposing tower user. 2017-05-04 17:31:57 -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
Aaron Tan
fd4aaa6ca9 Implement tacacs+ auth backend. 2017-04-12 16:19:42 -04:00
Ryan Petrello
d1eb33bca0 Be more restrictive in catching LDAP exceptions.
django-auth-ldap can throw exceptions, like TypeError if it's
misconfigured.  If we encounter an exception attempting to log into an
LDAP server, log it and move on (otherwise, an uncaught exception will
cause local login to fail, too).

see: #5933
2017-04-11 16:43:26 -04:00
Ryan Petrello
f4d55659f0 enforce a sane default OPT_NETWORK_TIMEOUT for LDAP connections
see: #5208
2017-02-07 12:37:05 -05:00
Ryan Petrello
ea4682e782 catch and log LDAP auth plugin misconfigurations
see: #5204
2017-02-06 16:27:22 -05:00
Chris Church
6ebe45b1bd Configure Tower in Tower:
* Add separate Django app for configuration: awx.conf.
* Migrate from existing main.TowerSettings model to conf.Setting.
* Add settings wrapper to allow get/set/del via django.conf.settings.
* Update existing references to tower_settings to use django.conf.settings.
* Add a settings registry to allow for each Django app to register configurable settings.
* Support setting validation and conversion using Django REST Framework fields.
* Add /api/v1/settings/ to display a list of setting categories.
* Add /api/v1/settings/<slug>/ to display all settings in a category as a single object.
* Allow PUT/PATCH to update setting singleton, DELETE to reset to defaults.
* Add "all" category to display all settings across categories.
* Add "changed" category to display only settings configured in the database.
* Support per-user settings via "user" category (/api/v1/settings/user/).
* Support defaults for user settings via "user-defaults" category (/api/v1/settings/user-defaults/).
* Update serializer metadata to support category, category_slug and placeholder on OPTIONS responses.
* Update serializer metadata to handle child fields of a list/dict.
* Hide raw data form in browsable API for OPTIONS and DELETE.
* Combine existing licensing code into single "TaskEnhancer" class.
* Move license helper functions from awx.api.license into awx.conf.license.
* Update /api/v1/config/ to read/verify/update license using TaskEnhancer and settings wrapper.
* Add support for caching settings accessed via settings wrapper.
* Invalidate cached settings when Setting model changes or is deleted.
* Preload all database settings into cache on first access via settings wrapper.
* Add support for read-only settings than can update their value depending on other settings.
* Use setting_changed signal whenever a setting changes.
* Register configurable authentication, jobs, system and ui settings.
* Register configurable LDAP, RADIUS and social auth settings.
* Add custom fields and validators for URL, LDAP, RADIUS and social auth settings.
* Rewrite existing validator for Credential ssh_private_key to support validating private keys, certs or combinations of both.
* Get all unit/functional tests working with above changes.
* Add "migrate_to_database_settings" command to determine settings to be migrated into the database and comment them out when set in Python settings files.
* Add support for migrating license key from file to database.
* Remove database-configuable settings from local_settings.py example files.
* Update setup role to no longer install files for database-configurable settings.

f 94ff6ee More settings work.
f af4c4e0 Even more db settings stuff.
f 96ea9c0 More settings, attempt at singleton serializer for settings.
f 937c760 More work on singleton/category views in API, add code to comment out settings in Python files, work on command to migrate settings to database.
f 425b0d3 Minor fixes for sprint demo.
f ea402a4 Add support for read-only settings, cleanup license engine, get license support working with DB settings.
f ec289e4 Rename migration, minor fixmes, update setup role.
f 603640b Rewrite key/cert validator, finish adding social auth fields, hook up signals for setting_changed, use None to imply a setting is not set.
f 67d1b5a Get functional/unit tests passing.
f 2919b62 Flake8 fixes.
f e62f421 Add redbaron to requirements, get file to database migration working (except for license).
f c564508 Add support for migrating license file.
f 982f767 Add support for regex in social map fields.
2016-09-26 22:14:47 -04:00
Chris Church
cb98d0674d Prevent populate_user from being registered multiple times. 2016-07-15 16:24:41 -04:00
Chris Church
62562afd0d Fix for populating teams for LDAP user. 2016-07-15 13:17:25 -04:00
Matthew Jones
c124aeaf14 Change ldap and other sso defaults to remove from team/admin
Previously the default was not to remove an sso user from a team or as
an admin if they were removed from the SSO service.  This changes that
and updates some readme-type lines.
2016-06-09 16:02:29 -04:00
Matthew Jones
26b31fedbc Expose any external account as a user property
This adds a field to the user object to denote whether and what kind of
user account it is.

For normal accounts this field will be null.
For social auth accounts it will be "social"
for radius accounts it will be "radius"

This change also prevents a radius user from changing their local
password thus bypassing the password caching feature of django-radius
2016-06-02 16:58:19 -04:00
Akita Noek
7e0d2e6729 more .users -> member_role.members 2016-03-15 17:00:20 -04:00
Chris Church
8552ea91a8 Add sample config for LDAP connection options, disable referrals by default, prefetch user groups to reduce LDAP queries when checking group memberships. 2015-12-11 15:00:20 -05:00
Chris Church
cd447bed96 Social auth and SSO updates:
* Move auth backends into sso app.
* Add support for mapping social auth users into organizations and teams.
* Return social auth backends in a consistent order in the API.
* Remove custom SAML attribute mapping and use options provided by PSA.
* Add pipeline function to raise an exception if no user has been found or created; added comments on how to disable new user creation.
* Add comments for defining a custom social auth pipeline function.
2015-11-13 11:30:55 -05:00