Commit graph

105 commits

Author SHA1 Message Date
Marcin Kuzminski
215c7d3beb ldap: ensure the proper cert files and dirs are set.
- addresses some issues with SSL certificates after bump of the LDAP drivers.
2018-11-20 22:05:34 +01:00
Marcin Kuzminski
9033601562 logging: use lazy parameter evaluation in log calls. 2018-09-13 17:41:35 +02:00
Marcin Kuzminski
b1bfdeb6ba caches: enable cache TTL=30s for auth-plugins.
- mostly due to this gives massive performance gains.
- most of customers choose to use it.
- svn gets *massive* boost from this.
2018-08-11 21:35:19 +02:00
Marcin Kuzminski
f1497f5afd caches: new cache context managers.
- deprecate beaker cache completly
- use new cache decorators from dogpile
- use a proper per cache key invalidation
2018-08-02 18:04:52 +02:00
Marcin Kuzminski
490e2c8a57 dependencies: bumped python-pam to 1.8.4 and fixed pam auth. 2018-07-31 16:56:20 +02:00
Marcin Kuzminski
9665179aa5 caches: use new decorator that uses conditional caches skipping dogpile if cache is disabled. 2018-07-14 18:17:42 +02:00
Marcin Kuzminski
84d673d387 caches: use dogpile for sql_cache_short region. 2018-07-12 17:20:03 +02:00
Marcin Kuzminski
cc72ded271 caches: skip cache if user is empty. 2018-07-06 14:47:09 +02:00
Marcin Kuzminski
ddc445856e caches: rewrite of auth/permission caches to dogpile. 2018-07-05 20:14:33 +02:00
Marcin Kuzminski
213cf5463d release: merge back stable branch into default 2018-05-15 16:04:13 +02:00
Marcin Kuzminski
12d382294e ldap: use connection ping only in case of single server specifed. 2018-05-04 16:13:31 +02:00
Marcin Kuzminski
a9aca0d074 email: added help block on where to change email settings 2018-04-25 12:02:44 +02:00
Marcin Kuzminski
35d60afec4 auth-plugins: fixed problem with cache of settings in multi-worker mode.
- previous implementation had a bug that cached the settings in each class, caused not refreshing
the update of settings in multi-worker mode. Only restart of rhodecode loaded new settings.
2018-04-10 11:47:00 +02:00
Marcin Kuzminski
f7c75e1cf6 auth: use more consistent logging on failed logs.
- auth-token, auth-rhodecode uses info for OK, and warn for failed logins.
- using error logs can cause wrong expectations about failure to loging due to an error.
2018-04-09 13:31:57 +02:00
Marcin Kuzminski
89bf42d803 auth-plugins: use a nicer visual display of auth plugins that would highlight that order is
important.

- fixed help text.
2018-03-27 13:50:56 +02:00
Marcin Kuzminski
a8428e7271 auth-ldap: added connection pinning and timeout option to ldap plugin 2018-03-27 11:51:37 +02:00
Marcin Kuzminski
6847122bc5 cli: skip auth plugin search/registry in case of cli invocation for faster execution of those actions.
- we don't need to load plugins for CLI calls
2018-03-01 16:46:49 +01:00
Marcin Kuzminski
46ce151bf7 setup: catch and don't stop on any exception in fetching the legacy plugins. 2018-03-01 13:13:19 +01:00
Marcin Kuzminski
ff0e89625a logging: improve auth log chain for easier debugging. 2018-02-28 14:16:15 +01:00
Marcin Lulek
bb9a4574cb auth: fix regression on cache manage namespace generation in case of external plugins a new users. 2018-02-21 10:39:13 +01:00
Marcin Kuzminski
d06a62c340 logging: improve consistency of auth plugins logs. 2018-02-19 14:49:21 +01:00
Marcin Kuzminski
0cbdfc3f23 ldap: enable connection recycling on LDAP plugin. 2018-02-16 10:57:29 +01:00
Marcin Kuzminski
ba5aec079a caches: use individual namespaces per user to prevent beaker caching problems.
- especially for mysql in case large number of data in caches there could be critical errors storing cache, and thus preventing
users from authentication. This is caused by the fact that we used single namespace for ALL users. It means it grew as number of users grew
reaching mysql single column limit.
This changes the behaviour and now we use namespace per-user it means that each user-id will have it's own cache namespace fragmenting maximum column data to
a single user cache. Which we should never reach.
2018-02-15 17:34:09 +01:00
Marcin Kuzminski
90120e6678 authentication: introduce a group sync flag for plugins.
- we'll skip any syncing on plugins which simply don't get any group information
- we let plugins define if they wish to sync groups
- prevent from odd cases in which someone sets user groups as syncing, and using regular
plugin. In this case memebership of that group would be wiped, and it's generaly bad behaviour.
2018-01-24 16:47:06 +01:00
Marcin Kuzminski
00b45c1fa7 release: update copyright year to 2018 2018-01-19 17:13:16 +01:00
Marcin Kuzminski
79f00ec46a flash: use consistent use of h.flash across the application. 2017-11-16 20:35:50 +01:00
Marcin Kuzminski
5f9ae2ae11 pylons: remove pylons as dependency
- dependencies: bumped:
 -setuptools-scm==1.15.6
 -celery==4.1.0
 -kombu==4.1.0
 -pytz==2017.3
 -Routes==2.4.1

Removed all pylons components. Refactored the code to use only pyramid
parts
2017-11-15 13:42:54 +01:00
Marcin Kuzminski
d4c5944577 release: merge back stable branch into default 2017-11-11 22:09:42 +01:00
Marcin Kuzminski
7a512a4788 ldap: fixed regression in extracting settings after library updates.
- somehow we now got '' defaulted to None which changed the behaviour.
2017-11-11 16:43:45 +01:00
Marcin Kuzminski
7de15715e0 ldap: increase timeouts and timelimits for operations 2017-11-11 10:29:31 +01:00
Marcin Kuzminski
116099638b apps: switch import of ADMIN_PREFIX from routing into base app.
- routing is deprecated and will be soon removed
2017-11-07 14:17:26 +01:00
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