Marcin Kuzminski
27697682bc
auth: don't cache settings for auth plugins
2017-10-13 10:54:52 +02:00
Marcin Kuzminski
3d0069b5f4
caches: clear perms cache manager while updating settings for auth plugins
2017-10-12 22:38:04 +02:00
Marcin Kuzminski
7781eabe94
auth: use cache_ttl from a plugin to also cache permissions.
...
- this gives a 30% speed increase in operations like svn commit
- generally uses the same mechanismy like auth cache to cache permissions for faster
access to vcs commands
2017-10-07 10:02:39 +02:00
Marcin Kuzminski
34175fd787
auth-rhodecode: don't fail on bcrypt if user password is set to None.
...
Default to emptry string to not cause an exception.
2017-10-07 10:02:57 +02:00
Marcin Kuzminski
78dae50c63
auth: add more login when performing sync of user groups.
2017-09-29 21:36:23 +02:00
Marcin Kuzminski
f445addfdd
vcs: reduce sql queries used during pull/push operations.
2017-09-28 21:45:19 +02:00
Marcin Kuzminski
c81494c245
auth: remove usage of pylons translator
2017-09-19 12:41:53 +02:00
Marcin Kuzminski
ee0e7c21f8
users: make AuthUser propert a method, and allow override of params.
2017-08-03 20:17:46 +02:00
Marcin Kuzminski
93908a0f84
auth: use our own simpler hybrid property.
...
- we shouldn't relly on sqlalchemy internal method, it has a different purpose.
2017-07-26 09:54:50 +02:00
Marcin Kuzminski
c03f634951
auth-ldap: improve messages when users failed to authenticate. Fixes #5345
2017-06-30 15:09:12 +02:00
Marcin Kuzminski
587e36d745
auth-plugins: updated description on auth_ldap plugin servers.
2017-06-01 12:46:15 +02:00
Marcin Kuzminski
8890b4a0da
ldap: addedn info about custom certificates option
2017-05-12 11:05:39 +02:00
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