Commit graph

71 commits

Author SHA1 Message Date
RhodeCode Admin
0122133e4e python3: fixed usage of .next() and .func_name 2023-03-07 09:56:40 +01:00
RhodeCode Admin
135f0f0cc6 python3: fixed usage of stringIO module 2023-03-06 23:09:06 +01:00
Marcin Kuzminski
fe96e16646 code: update copyrights to 2020 2020-04-16 00:34:52 +02: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
fe04abfe15 commits: disable shadow repo callback daemon 2019-09-22 17:51:13 +02:00
Marcin Kuzminski
70d5bb346a shadow-repos: skip init of full repo to generate shadow repo path. 2019-09-20 21:00:31 +02:00
Marcin Kuzminski
22c6ba9851 logging: reduce info logs 2019-07-30 05:02:43 +02:00
Marcin Kuzminski
928652312a core: added more accurate time measurement for called functions 2019-07-17 16:28:41 +02:00
Daniel Dourvaris
6793d652e0 git-lfs: fixed bug #5399 git-lfs application failed to generate HTTPS urls properly. 2019-07-02 15:08:39 +02:00
Marcin Kuzminski
bd1a9c8201 docs: updated copyrights to 2019 2019-01-02 18:13:27 +01:00
Marcin Kuzminski
48d67fee3a vcs: handle excessive slashes in from of the repo name path, fixes #5522 2018-12-23 20:37:05 +01:00
Marcin Kuzminski
d3afc86451 branch-permissions: handle vcs operations and branch permissions.
- use new exceptions for branch permissions
- detect if we need to check permissions
- calculate super-admin the same way as regular users for override capabilities
- added new tests for branch permissions
2018-08-29 20:22:43 +02:00
Marcin Kuzminski
4bec4980b0 caches: fix import of compute_key_from_params function. 2018-08-23 19:17:07 +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
ecff3dbaed security: update lastactivity when on audit logs.
- The previous update on each call was to expensive and created lot of DB locks in high traffic env
2018-07-31 22:52:44 +02:00
Marcin Kuzminski
d6757c3989 core: removed last activity as it was creating lots of DB locks. 2018-07-26 21:54:44 +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
ddc445856e caches: rewrite of auth/permission caches to dogpile. 2018-07-05 20:14:33 +02:00
Marcin Kuzminski
225757aaf3 hooks: made the callback host configurable.
- This allows easier docker container seperation
2018-07-03 11:57:03 +02:00
Marcin Kuzminski
42c80fe075 shadow-repos: use numeric repo id for creation of shadow repos.
- Fixes a problem after rename or move into repository group.
2018-06-21 14:04:06 +02:00
Marcin Kuzminski
bdf5f0afb6 svn: enable hooks and integration framework execution.
- This change will allow SVN to execute rhodecode integration framework
via executing the builting hooks.
- uses txn_id for svn to provide metadata required via Apache
- Interception of SVN transaction is required to use temporary stores for metadata
- hooks are now part of vcsserver where the install/control logic is stored
2018-04-06 12:44:01 +02:00
Marcin Kuzminski
9c4a8f1afd http: improved log for ssl required 2018-02-18 11:35:35 +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
b16521f1c3 simplevcs: allow passing config into repo detection logic.
- allows proper check for repos together with requirement checks for Mercurial
2018-02-01 18:51:00 +01:00
Marcin Kuzminski
00b45c1fa7 release: update copyright year to 2018 2018-01-19 17:13:16 +01:00
Marcin Kuzminski
1fccd17a6d auth, performance: use cache_ttl for anonymous access taken from the rhodecode plugin.
- for operations like svn this boosts performance significantly for anonymous access enabled.
2017-12-04 14:20:53 +01:00
Marcin Kuzminski
245d213bf2 vcs: also register a global config for vcs_handler.
- this solves a case when SVN repository needs to find out a repo without
per-repo settings available
- we need to get the global config first to be able to extract repo name
2017-11-28 13:23:25 +01:00
Marcin Kuzminski
d3b43c92fc simplevcs: store rc_extras reference inside the apps itself so it can be used during
operations.
2017-11-22 16:25:30 +01:00
Marcin Kuzminski
a55c5ff1ea simplevcs: handle a case of damaged filesystem repo without 500 exception. 2017-11-16 16:31:18 +01:00
Marcin Kuzminski
4d9fa48377 simplevcs: fixed logic of extraction of base_path 2017-11-16 15:59:11 +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
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
f445addfdd vcs: reduce sql queries used during pull/push operations. 2017-09-28 21:45:19 +02:00
Marcin Kuzminski
3f0ff6b65b vcs: report 404 for shadow repos that are not existing anymore. Before we got 500 exception in this case. 2017-09-01 13:10:52 +02:00
Marcin Kuzminski
175cd5d4db audit-logs: log user agent for push/pull. 2017-04-28 21:03:00 +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
3d3f2db34a core: removed pyro4 from Enterprise code. Fixes #5198 2017-02-07 15:58:49 +01:00
Marcin Kuzminski
584bd214ae vcs: do an early detection of vcs-type request.
We we to know to detect vcs type request as early as possible. IF we know
we're handling an VCS request, we can skip some of the pylons stack initialization.

- This fixes issues with leaking sessions and other object from pylons into
a purely VCS type request.
2017-01-12 01:20:31 +01:00
Marcin Kuzminski
fcc027c282 license: updated copyright year to 2017 2017-01-02 09:30:39 +01:00
Marcin Kuzminski
d5210dfe63 simplevcs: fix a typo when running detection of vcs backend.
- the flag should be explicit_scm which skips detection of VCS systems.
This improves the speed of calls by not trying to look for a valid vcs.
2016-11-17 18:48:31 +01:00
Martin Bornhold
add98db605 vcs: Add a comment about removing some code when dropping Pyro4 support. 2016-10-10 14:06:26 +02:00
Martin Bornhold
dff5dd52e0 http: Allow http, pyro and custom implementations for scm app. 2016-10-04 12:01:10 +02:00
Martin Bornhold
acc2367ab9 shadow: Simplyfy the regular expression for detecting shadow repository URLs 2016-09-28 13:25:57 +02:00
Martin Bornhold
5eeb75edac shadow: Fix an error in the regex to detect shadow repository URLs. 2016-09-26 14:54:21 +02:00
Martin Bornhold
9efcbadac8 vcs: Explicit use one of the repo names (acl, url, vcs) 2016-09-23 13:23:32 +02:00
Martin Bornhold
2cd4d08392 vcs: Clean up the shadow-repo-expose code and make some nicer comments. 2016-09-23 12:52:24 +02:00
Martin Bornhold
930ac34f74 vcs: Move shadow repo regex up to class level. 2016-09-22 16:02:35 +02:00
Martin Bornhold
9dca5e1637 shadow: Use only a single regular expression to generate and match repo/group slugs. 2016-09-22 15:33:11 +02:00
Martin Bornhold
01b5812099 vcs: Add flag to indicate if repository is a shadow repository. 2016-09-21 13:07:20 +02:00
Martin Bornhold
8d288b7c5f vcs: Use correct repo name attribute and remove workaround. 2016-09-21 09:58:11 +02:00