Commit Graph

51 Commits

Author SHA1 Message Date
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
Ryan Petrello
5bd670291b default certain LDAP settings to None instead of an empty string
Related: #5148 #4678
2017-02-02 13:06:59 -05:00
Ryan Petrello
f347bc5ae4 fix a typo that results in a NameError
Resolves #4861
2017-01-25 14:08:49 -05:00
Ryan Petrello
0bcbaa5c86 allow certain LDAP settings fields to be nullable
necessary to completely resolve #4678
2017-01-24 09:31:44 -05:00
Ryan Petrello
40a5c6cc0b fix an LDAP settings bug which can cause LDAP auth to fail
django-ldap-auth expects the "unset/empty" state of certain LDAP DN
settings (such as AUTH_LDAP_REQUIRE_GROUP and
AUTH_LDAP_USER_DN_TEMPLATE) to be NULL/None (not an empty string).

Resolves #4678
2017-01-23 15:35:23 -05:00
Alan Rominger
c39c62973b Merge pull request #4574 from AlanCoding/4519
Provide __init__ arg for LDAP group type
2017-01-06 13:28:14 -05:00
AlanCoding
983bee115c provide default for permanent attribute in redirect view before Django 1.9 hits 2017-01-04 15:06:10 -05:00
AlanCoding
2e220beda4 provide __init__ arg for LDAP group type 2017-01-04 10:51:20 -05:00
Chris Church
b947367606 Add default for ldap group type. 2016-12-14 11:54:50 -05:00
Chris Church
1e157c2255 Display error instead of raising 500 for invalid SAML config to generate metadata. 2016-12-06 12:57:01 -05:00
Chris Church
417d7c29ee Allow SAML entity ID to be any string, not required to be a URL. 2016-12-06 12:56:25 -05:00
Matthew Jones
408c79a845 Merge pull request #4219 from sundeep-co-in/STAGE
add django.pot
2016-12-04 21:04:41 -05:00
sundeep-co-in
cd5301bf49 add django.pot 2016-12-02 14:02:13 +05:30
Chris Church
6a02ca1de0 Add support for encrypting settings that are passwords. 2016-11-30 11:22:39 -05:00
Chris Church
934da3c425 Allow specifying multiple LDAP servers. 2016-11-28 16:54:16 -05:00
Chris Church
01f59b4696 Update defaults for SAML info/contact settings. 2016-11-28 13:16:29 -05:00
Chris Church
5b1df83fcc Add support for hiding settings based on whether features are enabled in the license. 2016-11-21 14:15:41 -05:00
Chris Church
9538ad2983 Merge pull request #4072 from cchurch/what-even-are-tuples
No tuples for API config, mention JavaScript regular expression support.
2016-11-21 11:35:12 -05:00
Chris Church
ac298ba2e2 Apply #4009 to #3910. 2016-11-20 11:02:22 -05:00
Chris Church
b5e5ed1fd4 No tuples for API config, mention JavaScript regular expression support. 2016-11-19 21:06:54 -05:00
Matthew Jones
b8db27bb39 Merge pull request #3910 from cchurch/azuread-oauth2
Add AzureAD OAuth2 support.
2016-11-18 11:28:04 -05:00
Aaron Tan
1cbeb71843 Merge pull request #4034 from jangsutsr/4023_resume_flake8_E302
Resume flake8 E302.
2016-11-16 10:41:18 -05:00
Aaron Tan
9e4655419e Fix flake8 E302 errors. 2016-11-15 20:59:39 -05:00
Chris Church
77a0e1445a Merge pull request #4009 from cchurch/fix-callback-url-fields
Fix callback URL fields to update when TOWER_URL_BASE changes
2016-11-15 18:28:44 -05:00
Aaron Tan
473ed016de Fix flake8 E305 errors. 2016-11-15 16:32:27 -05:00
Chris Church
e22b0f75b8 Fix social auth callback URLs to depend on TOWER_URL_BASE so they are updated when it changes. 2016-11-15 00:58:33 -05:00
Chris Church
8dc5e7725c Fix configure Tower in Tower to work with updated django-jsonfield. 2016-11-15 00:22:55 -05:00
Chris Church
90769eedbc Add AzureAD OAuth2 support. Implements #3902. 2016-11-08 10:22:44 -05:00
sundeep-co-in
78a8ce9479 django i18n 2016-10-18 18:10:39 +05:30
Chris Church
8883738a7c Fix issue when string list settings field is null. Resolves #3683. 2016-10-12 14:47:22 -04:00
Bill Nottingham
cc4025977f Update help text to reflect 3.0 remove: default change 2016-09-29 17:01:11 -04:00
Chris Church
0ce7b31502 Fix default value validation for LDAP/SAML settings to prevent warnings. 2016-09-28 11:04:35 -04:00
Chris Church
16a7c1e493 Based on customer config example, entity ID doesn't have to be a URL. 2016-09-26 22:15:12 -04: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 Meyers
46da83b87f fix flake8 2016-09-15 08:52:12 -04:00
Chris Church
ff9945037f Initialize xmlsec once to prevent SAML auth from hanging. 2016-08-15 14:50:53 -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
ecedf491a4 Removed erroneous sso login error log
The log message here does not indicate a login failure at all, in fact
it doesn't appear like we get a login failed message, they just don't
get authed.
2016-04-11 23:17:10 -04:00
Akita Noek
24a841a0bf Added sso login logging
Part of #1087

This is untested as we need to have a public facing machine to do SSO
stuff against.
2016-04-11 17:03:04 -04:00
Akita Noek
7e0d2e6729 more .users -> member_role.members 2016-03-15 17:00:20 -04:00
Akita Noek
6ea99583da Mass active flag code removal 2016-03-15 09:29:55 -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
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
Chris Church
32604f1338 Fix for 500 error at /api/v1/me. 2015-10-02 17:29:16 -04:00
Chris Church
b5512e23bf Flake8 fixes, remove stray print. 2015-10-02 15:13:16 -04:00