Marcin Kuzminski
5fc5ee4d35
auth-plugins: define unsafe settings
2017-04-10 17:16:17 +02:00
Marcin Kuzminski
8417882de5
auth-plugins: add mechanismy to remove secrets from plugin logs.
...
- it's not recommended to log things like ldap access passwords or
other credentials.
- we expose a machanismy for each plugin to define a unsafe keys to be
removed.
2017-04-10 17:14:07 +02:00
Marcin Kuzminski
662dda4aa7
auth-plugins: remove dead code
2017-04-10 17:13:09 +02:00
Marcin Kuzminski
8732733a54
authentication: enabled authentication with auth_token and repository scope.
...
- fixes #3932
- vcs type tokens now with repo scope narrows the usage to a repository.
2017-03-03 20:48:23 +01:00
Marcin Kuzminski
94cd7b2237
authentication: add some more logging when extracting users.
2017-03-03 20:11:35 +01:00
Marcin Kuzminski
8ceda76718
auth: refactor code and simplified instructions.
...
- added new rfc selector
- cleanup imports
2017-02-21 18:05:29 +01:00
Marcin Kuzminski
5c2c266ee9
auth-tokens: updated logic of authentication to a common shared user method.
2017-02-13 14:36:48 +01:00
Marcin Kuzminski
89e2586781
templating: use .mako as extensions for template files.
2017-01-04 22:13:57 +01:00
Marcin Kuzminski
fcc027c282
license: updated copyright year to 2017
2017-01-02 09:30:39 +01:00
Marcin Kuzminski
3aab8af9e2
authentication-views: fixed old style exception catch syntax.
2016-11-07 15:01:27 +01:00
Martin Bornhold
72819c6826
auth: Allow auth plugins to customize the slug which is used to generate URLs. #4078
2016-10-28 14:03:27 +02:00
Marcin Kuzminski
c0e4fc7dcd
ldap: fixed email extraction typo. An empty
...
ldap email will now not overwritt the stored one.
2016-09-30 16:19:12 +02:00
Martin Bornhold
c46ad9f215
vcs: Pass registry to vcs for user authentication.
...
Explicit pass the registry insted of indirectly using it via pyramids
thread locals.
2016-08-08 08:29:10 +02:00
Marcin Kuzminski
708038952c
db: always use Session() for compatibility, Using Session is actually the
...
scoped_session which is not the same as the one which we "call".
More here: http://docs.sqlalchemy.org/en/latest/orm/contextual.html#contextual-thread-local-sessions
2016-07-27 00:42:19 +02:00
Martin Bornhold
bee42a50ed
auth: Fix renaming of 'auth_cahe_ttl' to 'cache_ttl' #4127
2016-07-27 15:54:42 +02:00
Marcin Kuzminski
d0638fa1a1
auth-ldap: added flag to set debug mode for LDAP connections.
2016-07-26 13:09:56 +02:00
Marcin Kuzminski
af6f54dbae
auth-plugins: added better log message about the auth-cache-ttl settings.
2016-07-26 13:09:31 +02:00
Marcin Kuzminski
08000af552
auth: made the message about not-active user consisten with token plugin
2016-07-13 12:27:04 +02:00
Marcin Kuzminski
ab6750c9a7
auth-token: allow other authentication types to use auth-token.
...
Fixes #4070
2016-07-12 19:56:48 +02:00
Martin Bornhold
0641c0e2d0
authn: Generate the form default values manually.
...
When using colander.flatten(data) it adds colander.null for each
missing form field. But this is not correct. What we want here is
a dict wich contains only the keys/values from request.params that
match a form field.
2016-06-28 16:28:18 +02:00
Martin Bornhold
54f29c46ab
authn: Only lookup settings from DB if they are really used.
...
When computing the form defaults only query the DB if we
need the value from DB.
2016-06-28 12:07:10 +02:00
Martin Bornhold
381973ba40
authn: Remove usage of colander.serialize to generate form defaults.
2016-06-28 11:56:27 +02:00
Johannes Bornhold
cf906eafe6
authn: Use type() instead of __class__ attribute.
2016-06-21 08:09:55 +02:00
Johannes Bornhold
24e2b4a137
authn: Test authentication plugin settings POST views.
2016-06-20 17:27:31 +02:00
Johannes Bornhold
b5079c9ba9
authn: Fix priority of default values if some values are missing during POST
...
Normally this affects only the test suite but doesn't hurt to be correct :)
2016-06-20 17:27:04 +02:00
Johannes Bornhold
a1b5f9d602
authn: Allow to pass in a default value if setting is not available in DB.
2016-06-20 17:25:35 +02:00
Martin Bornhold
30ce19fa4f
authn: Unit tests to simply get the authentication settings pages.
...
Checks for enabled (retcode=200) and disabled (retcode=404) plugins.
2016-06-20 15:48:23 +02:00
Martin Bornhold
94d448b77c
authn: Create context managers to enable/disable an authentication plugin in DB.
2016-06-20 15:46:35 +02:00
Martin Bornhold
df46a4458a
authn: Add fixture that provides authentication plugin instances.
2016-06-20 15:45:58 +02:00
Johannes Bornhold
825e26db6f
authn: Don't use setting value to compute the setting type.
2016-06-20 11:52:24 +02:00
Johannes Bornhold
4e9923b5ae
auth: Implement __str__ on plugin base class
...
This way some error messages will look nicer, since they are based on the
__str__ of the plugin instance. Using the plugin_id will give the user (and us
in the support case) the exact pointer to the affected plugins.
2016-06-16 09:11:45 +02:00
Martin Bornhold
3bd01810b3
permissions: Fix permissions for authentication plugin settings view.
2016-06-14 12:30:42 +02:00
Johannes Bornhold
997191d4d4
authn: Remove doubled colon in plugin ID generation.
2016-06-06 16:15:38 +02:00
Johannes Bornhold
8ccbc6ad72
authn: Bugfix, use the fallback plugin setting in log message.
2016-06-06 16:14:37 +02:00
Johannes Bornhold
f8e4aa4dcc
authn: Small refactoring of plugin discovery.
2016-06-06 13:26:37 +02:00
Johannes Bornhold
5d2d8f4267
authn: Make the legacy plugin import more robust if something fails during import.
2016-06-06 11:26:27 +02:00
Johannes Bornhold
3e49389eff
authn: Store legacy plugins prefix in module variable.
2016-06-06 11:24:23 +02:00
Johannes Bornhold
8906d7163b
authn: Add docstring to function that discovers legacy plugins.
2016-06-06 10:49:40 +02:00
Johannes Bornhold
a8d92f8858
authn: Import legacy authentication modules and invoke their includeme.
2016-06-06 10:07:24 +02:00
Johannes Bornhold
6868abc1b7
authn: Load legacy plugin ID's from DB and log them.
2016-06-06 09:11:39 +02:00
Marcin Kuzminski
14cb9ac285
ldap-auth: fixed wrong Missing check
2016-06-08 14:03:02 +02:00
Johannes Bornhold
d05c4fb045
authn: Use new is_headers_auth function.
2016-06-06 10:15:00 +02:00
Johannes Bornhold
50474589c2
authn: Deprecate the is_container_auth function.
2016-06-06 10:22:42 +02:00
Johannes Bornhold
a29b8b84a5
authn: Rename 'container' -> 'headers' in authentication.
2016-06-06 10:33:01 +02:00
Johannes Bornhold
d1c5c52375
authn: Log a warning message if fallback authentication plugin is enabled in ini file.
2016-06-03 15:02:08 +02:00
Johannes Bornhold
0ba8db517b
authn: Fix ordering of authentication plugins.
2016-06-03 12:08:55 +02:00
Johannes Bornhold
a44e92e154
authn: Fix form validation of authentication plugins.
...
- Check if plugin exists.
- Display an apropriate error message if it doesn't exist.
2016-06-03 11:22:13 +02:00
Marcin Kuzminski
eda3da26e5
auth-token: added missing renderers for token plugin
2016-06-03 20:49:04 +02:00
Johannes Bornhold
18376347ca
authn: Fix handling of form errors and default values.
2016-06-03 10:02:59 +02:00
Johannes Bornhold
409eef8c0d
authn: Set the renderer attribute when registering settings view.
2016-06-02 17:09:55 +02:00