Commit graph

67 commits

Author SHA1 Message Date
RhodeCode Admin
166db21812 core: run ruff format 2025-01-13 17:47:37 +01:00
RhodeCode Admin
82f0f8d214 core: updated copyright to 2024 2024-11-12 16:39:07 +01:00
Serhii Ilin
d8281bb5c0 feat(login by email option): added ability to log in with user primary email. Fixes: RCCE-63 2024-03-14 11:18:07 +02:00
RhodeCode Admin
c8b35a769a ldap: small fixes and improvements over ldap authentication 2023-08-21 09:40:30 +02:00
RhodeCode Admin
8ae0e8de44 caches: make sure the global cache namespace prefixes are used.
- fixes problems when porting from old RC to new python3 based and different serialization mech
2023-07-26 16:15:52 +02:00
RhodeCode Admin
4bbb30fa06 modernize: updates for python3 2023-07-18 14:45:20 +02:00
RhodeCode Admin
a6e9ccf9e0 authentication: run modernize for python3 2023-07-18 14:26:37 +02:00
RhodeCode Admin
42301154fc copyrights: updated for 2023 2023-07-18 11:57:27 +02:00
RhodeCode Admin
2ff61d5c42 authentication: fixed for python3 migrations 2023-07-18 11:00:47 +02:00
RhodeCode Admin
d985e2f96c authentications: remove utf8 markers 2023-07-18 11:00:05 +02:00
RhodeCode Admin
94a50edf39 python3: fix usage of int/long 2023-03-07 09:54:36 +01:00
RhodeCode Admin
82894a87fa caches: fixed auth plugin usage of cached settings.
Don't use in-class cache as it breaks invalidation
2023-01-10 09:22:41 +01:00
RhodeCode Admin
faa449987b logging: expose extra metadata to various important logs for loki 2022-10-27 22:49:17 +02:00
RhodeCode Admin
bc8d59f1a7 metrics: use prom metrics, and added some additional metrics 2022-10-25 13:08:47 +02:00
Milka Kuzminski
5590b13ef5 auth: allow custom name for plugins if defined in the settings. 2020-11-03 13:25:13 +01:00
Marcin Kuzminski
8d9e71fee2 caches: use better name for empty user cache, None was confusing, and looked as if it would be an error. 2020-07-03 11:04:47 +02:00
Marcin Kuzminski
fe96e16646 code: update copyrights to 2020 2020-04-16 00:34:52 +02:00
Marcin Kuzminski
b7e6ccbdc0 ldap: logging fixes 2020-03-19 14:20:23 +01:00
Marcin Kuzminski
8e01135d04 Authentication: cache plugins for auth and their settings in the auth_registry.
- Before that change on each requests 4x we loaded plugins for authentication, this hit
many caches, db invalidation context and loaded the plugins logic each time. This was a heavy performance hit
for SVN and other backends as they needed to load that plugins many many times
- Since Authentication plugins almost never change, we'll not store the plugins listed for authentication into
the authnregistry for each process
- For AuthPlugins settings we now also flush plugins settings, and authnregistry cached plugins
2020-01-23 12:41:51 +01:00
Marcin Kuzminski
928652312a core: added more accurate time measurement for called functions 2019-07-17 16:28:41 +02:00
Marcin Kuzminski
bd1a9c8201 docs: updated copyrights to 2019 2019-01-02 18:13:27 +01:00
Marcin Kuzminski
1ff28bbbfe auth: fixed docstring 2018-11-30 11:48:51 +01:00
Marcin Kuzminski
0fd6e3f6a8 authentication: register global shared session key used for external authentication session data storeage.
- We'll have more plugins not only oauth so this should be a constant name, instead of repating the same name all over the code.
2018-11-26 23:14:55 +01:00
Marcin Kuzminski
c258d66e7b authentication: use registerd UID for plugin definition for more consistent loading of auth plugins. 2018-11-26 23:11:52 +01:00
Marcin Kuzminski
e1bbb01dab ldap: adde common ldap-ce na ldap-ee structure, and extend options
- added timeout
- make the code more shared
- allow specification of tls certdir and certfile manually
2018-11-25 18:47:15 +01:00
Marcin Kuzminski
3947a873c5 auth-plugins: expose docs and icon methods for authentication. 2018-11-21 18:43:26 +01: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
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
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
12d382294e ldap: use connection ping only in case of single server specifed. 2018-05-04 16:13:31 +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
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
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
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
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
27697682bc auth: don't cache settings for auth plugins 2017-10-13 10:54:52 +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
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
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
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