summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Make sure the XRDS is returned as stringPatrick Uiterwijk2014-11-131-1/+1
| | | | | Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Delay exposing OpenIDPatrick Uiterwijk2014-11-131-5/+5
| | | | | | | | This makes sure we have loaded the configuration before using it Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Fix LDAP plugin configuration checksPatrick Uiterwijk2014-11-131-2/+2
| | | | | | | | Interpret config value correctly (it is a boolean now) Pass required argument Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Improve spec fileSimo Sorce2014-11-121-11/+103
| | | | | | | | | Add missing dependencies. Split into smaller packages so that admins can choose what to install and what dependencies to drag in. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Bump version to 0.2.6Simo Sorce2014-11-121-1/+1
| | | | | Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Fix svg parsing in mod_wsgiSimo Sorce2014-11-121-1/+1
| | | | | | | | | Whe ipsilon is used behind apache we need to cast the template to a string. Otherwise mod_wsgi returns a TypeError complaining about the fact data is a unicode string instead of a byte string. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Add admin svg to setup.pySimo Sorce2014-11-121-0/+1
| | | | | | | Otherwise it will be missing from oficial distribution files. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Add missing openid paths to setup.pySimo Sorce2014-11-121-0/+3
| | | | | Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Add visual cues to configuration panelsSimo Sorce2014-11-127-61/+227
| | | | | | | | | | | Make it easier to recognize which plugins are enabled and which are disabled. Also make it easier to recognize when a plugin has just changed state, by flashing its row (help also realize it may have moved up/down) Based on concept work by Petr Vobornik Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Use indirection to report error stringsSimo Sorce2014-11-122-24/+32
| | | | | | | This way if CSS/Code changes we have just one place to fix. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Add test to check file based configuration worksSimo Sorce2014-11-122-0/+180
| | | | | | | | | This is a stripped down version of test1 that manually stored the configuration of the IDP as well as the SP metadata in the admin.conf file, and then check thatthe SP can be successfully used. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Return proper errors if config is read-onlySimo Sorce2014-11-122-9/+49
| | | | | | | | Do not throw 501 errors, instead return warnings that the configuration changes cannot be applied. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Add option to source configuration from a fileSimo Sorce2014-11-121-6/+129
| | | | | | | | | | | | | | | | If the configfile:// schema is used, the data is sourced from an ini style config file instead of being read from a database. The tables in this data source will be considered read-only and all modification functions will throw exceptions. Only 2 and 3 columns tables are supported, and the first column values must not contain spaces (typically a name/identifier). The adminconfig db is the only supported one at this time. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Remove unused optionSimo Sorce2014-11-121-4/+2
| | | | | | | Autotable is always enabled, so remove the option and just alays use it. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Make internal functions privateSimo Sorce2014-11-121-6/+6
| | | | | | | | load_data and reset_data are used only internally, turn them into private functions Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Remove unused functionSimo Sorce2014-11-121-3/+0
| | | | | Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Refactor plugin initialization and enablementSimo Sorce2014-11-1225-446/+318
| | | | | | | | | | | | Move most plugin enablement and initialization code in plugin.py to reduce code duplication and simplify and unifify plugin enablement for all base plugin types (login, info, providers). This patch breaks backwards compatibility as it changes how the list of enabled plugins is stored in the database tables. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Set newurl on admin actions to stay on the pageSimo Sorce2014-11-121-1/+2
| | | | | | | | | | | By setting newurl, the browser state is replaced with the base configuration URL, so that user actions like hitting reload do not end up trying to trigger another change or an enablement/disablement of a plugin. It also insures actions are not accidentally triggered when hitting the back button. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Refactor plugin configurationSimo Sorce2014-11-1222-418/+401
| | | | | | | | | | | | | | | Fork a PluginConfig class out of PluginObject, the base object now supports a simple dictionary config, while using PluginConfig provide access to structured util.config based configuration. Change UI code that deal with plugins configuration to properly use the new structured config objects in order to represent data in appropriate format based on the data type. Use the new util.config objects to represent plugins configuration. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Add config utilities to represent data typesSimo Sorce2014-11-121-0/+297
| | | | | | | | This will be used to properly format data in configuration UIs, and to properly import/export data from/to th database for internal use. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* In configure we do not need to set_config()Simo Sorce2014-11-1210-26/+13
| | | | | | | | | All we care about in configure is to store the config in the db, so skip setting the config explicitly in the plugin object and go straight to the database. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Add simple SqlSession implementationSimo Sorce2014-11-127-3/+96
| | | | | | | | This allows us to store session data in the DB. This way session data can be shared by multiple servers behind a balancer. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Add test to check a real database (pgsql) worksSimo Sorce2014-11-126-4/+197
| | | | | | | | | | | | | | Change config template to e able to set up ipsilon with an extrenal database. For the easy install the database server must have 3 datbases configured, and named exactly: admincondif, userprefs, transactions If different names are required manual instalation will be necessary. Database URLs (including credentials) can be set using the new option named --database-url Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Fix plugins enablement codeSimo Sorce2014-10-274-44/+43
| | | | | Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Add SVG Image to the Home administration pageSimo Sorce2014-10-273-1/+924
| | | | | | | | | This SVG image contain HREF links that are template in jinja to link images/text i the SVG to the menu pages. Clicking on elements of the SVG thus redirects to the relevant menu item. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Update style of plugins config page tooSimo Sorce2014-10-272-21/+38
| | | | | | | | Also fix a bug that would cause the config page to show no fields when saving. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Reuse the AdminPlugins class for the providers tooSimo Sorce2014-10-275-103/+93
| | | | | | | This way we can remove even more duplicated code... \o/ Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Improve UI for enabling/disabling plugins configSimo Sorce2014-10-279-417/+274
| | | | | | | Use the same templates for both info and login plugins Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Change default font-size to a bigger oneSimo Sorce2014-10-272-106/+109
| | | | | Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Disable clean-css for nowSimo Sorce2014-10-273-4/+8916
| | | | | | | | | During developemtn it makes it easier to have a human readbale css file. In future we may change the code to strip unnecessary chracters on the fly or restore clean-css generation. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Add default link to system fontsSimo Sorce2014-10-271-0/+1
| | | | | | | | This avoids annoying 404s to the browser if open-sans fonts are installed If they are not installed fallback fonts will be used by the browser. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Allow to call forms from any of the admin pagesSimo Sorce2014-10-271-6/+15
| | | | | Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Use self.log in authpam.pySimo Sorce2014-10-271-5/+4
| | | | | Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Fix lp-test target compaintsSimo Sorce2014-10-271-2/+0
| | | | | | | This was making make test fail even though make tests was working Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* infoldap is of course LDAPPatrick Uiterwijk2014-10-241-1/+1
| | | | | Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Map some common attributes from fas to userdataPatrick Uiterwijk2014-10-241-3/+17
| | | | | Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com> Signed-off-by: Simo Sorce <simo@redhat.com>
* Properly handle empty values in storageSimo Sorce2014-10-241-1/+1
| | | | | | | | Do not return default values if an actual empty string is found in the database. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Return to provider if user cancels loginSimo Sorce2014-10-242-1/+27
| | | | | | | | When the cancel button is hit return to the provider and eventually to the original application via return urls. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Handle invalid/expired transactions gracefullySimo Sorce2014-10-243-6/+13
| | | | | | | | | Return a useful error page every time and invalid or expired transaction is requested, instead of ending up with an internal backtrace and an ugly 500 error. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Remove useless log fileSimo Sorce2014-10-241-18/+0
| | | | | | | | Tests do not log into this log file, so remove it for now, it just clutters the tests dir without reason. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Make the template directory configurablePatrick Uiterwijk2014-10-243-1/+7
| | | | | Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Show login target on the login screenPatrick Uiterwijk2014-10-244-2/+13
| | | | | Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Drop custom FAS templateSimo Sorce2014-10-242-45/+1
| | | | | | | | The form and fas template are identical so just drop the fas.html template and use the default. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Add group and CLA support to FAS login pluginSimo Sorce2014-10-241-1/+39
| | | | | | | | | | | Add support for returning groups and other information from the FAS login plugin. If the openid module is available also split out cla group information into a spearate item so the openid CLA extension can make use of it and cla groups are not regarded as real groups. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Add OpenId extensionsSimo Sorce2014-10-245-0/+193
| | | | | | | | | | | | Implement: Simple Registration Attribute Exchange (Fedora) Teams CLAs Signed-off-by: Simo Sorce <simo@redhat.com> Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Add attribute mapping for user informationSimo Sorce2014-10-2410-37/+195
| | | | | | | | | | | | When user information is retrieved we map any wellknown data to a standardized set of names. A ne InfoMapping class takes cares of helping the info modules to map the data they retrieve so that providers can find it in wellknown attribute names for further use. Mapping of attribute names for diplay purposes is also provided. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Add OpenIDP ProviderPatrick Uiterwijk2014-10-2411-1/+661
| | | | | | | | | | This commit implements all the core functionality needed to expose an OpenID Identity Provider including a framework to dynamycally add extensions. Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com> Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Handle lists type options in plugins configurationSimo Sorce2014-10-242-1/+30
| | | | | | | | Autodetect and convert config values based on the options definition. If the option is marked as list split a string on setting the configuration or join the list into a string before saving it to the database. Signed-off-by: Simo Sorce <simo@redhat.com>
* Do not overwrite default plugin optionsSimo Sorce2014-10-243-29/+38
| | | | | | | | | Change the admin plugin to not overwrite the plugin default options, and only use the sanctioned pluginObject interfaces to read/write config values. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Add helpers to store per plugin user preferencesSimo Sorce2014-10-242-2/+19
| | | | | Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>