summaryrefslogtreecommitdiff
path: root/server/src
AgeCommit message (Collapse)Author
2015-10-29[feat] remove SSL tsafe monkeypatchVictor Shyba
This was added for a Twisted 12 bug that should be gone by now.
2015-10-28[style] fix pep8 warnigsFolker Bernitt
2015-10-28[feat] read security doc from configurationVictor Shyba
LEAP Platform needs to granularly allow access on user database for other services, like mx. This is now possible by editing soledad-server.conf file. A new section 'database-security' was added and it is parsed during 'create-user-db' to be set on security design document, present on every per-user database.
2015-10-19[bug] remove instance cachingVictor Shyba
couchdb library relies on garbage collector to close remaining connections. Somehow, caching the instance is avoiding gc to call __del__ on underlying couchdb sessions.
2015-10-14[bug] reduce overall sync session caching to 120sVictor Shyba
It was 3600s, but closing connections seems to yet depend on garbage collection and now causes server to leak file handlers. 120s should be enough to a sync session finish. Also, lowering this value will only make very long syncs use more of couch every 2 minutes, while raising this value will keep memory busy for useless time.
2015-10-05[feat] Move config dir to /etc/soledadvarac
- Resolves: #7509
2015-10-01[feat] read netrc path from configuration fileVictor Shyba
netrc file was hardcoded inside create-user-db. Now it reads the path from /etc/leap/soledad-server.conf as done on server process. The new configuration property is called 'admin_netrc'.
2015-09-28[feat] conf for enabling db creation via custom shVictor Shyba
We can now use a custom script to create databases by setting a parameter 'create_cmd' on soledad configuration. This will set CouchServerState to use it on ensure_database.
2015-09-24[style] pep8Victor Shyba
2015-09-24[refactor] init_caching instead of setting attrVictor Shyba
As meskio found commented, setting this attribute directly is ugly, CouchDatabase now has a init_caching method for setting up cache instance.
2015-09-24[feat] adds cache expirationVictor Shyba
Now each backend object will be retrieved from cache for sync.py and values will live for 3600 by default. That is changed via parameter if needed.
2015-09-24[feat] full caching for each sync_id sessionVictor Shyba
The CouchDB backend implementation was accessing CouchDB too many times for the same values. Those values are known inside the same sync_id, which is the id of current sync session. This commit adds caching for all redundant calls to Couch inside the same sync_id for each replica. Refactoring is still needed, but for now couch.py works normally as if caching is not present, while sync.py injects the cache as a attribute to enable it. This needs a simpler implementation.
2015-09-24[feat] adds caching for other gen and trans idVictor Shyba
There are two functions in couch.py used to save and retrieve the last know gen and trans id for the syncing replica. The get function is called very often, but is only set on one point. Added a simple caching to avoid queying couch for a value that we already have. If cache is empty, it just query as usual and fills it.
2015-09-24[feat] first draft of sync_state in memoryVictor Shyba
This commit changes sync_state to be in memory, with all tests passing. The memory variable for now is a dict with each key composed by source_replica_uid and sync_id, replicating CouchDB implementation. Next steps includes migrating this to Beaker and refactor/clean up code. Changed the module's INFO dict to use Beaker's caching and adapted methods to get and save from it. Still needs refactoring, all tests passes. Beaker is now using memory as default; It is configurable, but we aren't opening the possibility of config now for security. We need to check what can be misconfigured first. We are not sure if beaker will be the definitive solution for server side caching. This change isolates it with more granularity. In order to replace it, just change get_cache_for to return the proper caching object using another implementation. This caching object is supposed to behave as a dict.
2015-08-26[bug] process put after last BadRequest checkVictor Shyba
If we check for a BadRequest after calling meth_put we will end up on a scenario where the server replies with an error, but everything got processed.
2015-08-24[refactor] remove simplejson dep on serverdrebs
2015-08-17[bug] add missing parameter to unauthorized errordrebs
2015-08-04[style] pep8 cleanupKali Kaneko
2015-07-24[style] fixed pep8 warnings on the soledad server codeBruno Wagner
2015-04-09[fix] remove unneded params to CouchServerStatedrebs
This commit removes some leftover code from a time when Soledad Server used to check for permissions on certain databases when starting (i.e. shared and tokens databases). This was later removed as correct permissions enforcement was relayed to tapicero. Closes: #6833.
2015-03-19[feat] use monthly tokens databasedrebs
Any solead release that includes this commit will be incompatible with LEAP Platform < 0.6.1 because only from that version on the platform implements the ephemeral monthly tokens databases. Closes: #6785.
2014-07-08Update target sync with sequential info (#5869).drebs
2014-07-02Split sync_exchange into many requests (#5517).drebs
2014-06-05Make server auth time-insensitive.drebs
2014-06-05Replace client sync state by a sync_id.drebs
2014-05-28Fix stuff from kali's review.drebs
2014-05-23Fix tests for new sync process.drebs
2014-05-22Split sync in multiple POST requests in server (#5571).drebs
2014-05-22Cleanup and pep8 fix.drebs
2014-03-17Fix raising of auth token errors (#5191).drebs
2014-03-12Do not ensure shared database upon Soledad Server start (#5302).drebs
2014-01-25Improve unauthorized error messages.drebs
2014-01-20Allow sync of large files (~100MB) (#4836).drebs
2014-01-20Move lock resource to its own file.drebs
2014-01-17Fix typo on tempfile.gettempdir() call.drebs
2014-01-07Use temp dir for server side locks (#4918).drebs
2014-01-06Add proper error reporting to shared db lock.drebs
2013-12-19add http-encoding header, decode it tooKali Kaneko
2013-12-18remove conditional gzip, fix importKali Kaneko
2013-12-16patch the _version file so it reports the running versionKali Kaneko
until now this was only possible when running python setup.py version from the source tree. now the <module>.__version__ also reports correctly the runnng version
2013-12-13enable gzip compressionKali Kaneko
2013-12-09pep8 happyKali Kaneko
2013-10-28Add shared db locking.drebs
* Improve bootstrap sequence: - stages are more organized. - there are less useless requests to server. * Improve shared db access: - instantiate the shared db only once. - also results in less requests to server. * Handle unicode passphrases. * Move some common functions and global variables to common. * Improve security of recovery document: - access to the recovery document now depends on the user password. * Improve documentation.
2013-09-18Add couch permission check.drebs
2013-08-29Use soledad.server namespace in init scriptTomás Touceda
2013-08-23packaging improvementsKali Kaneko
* add versioneer (patched for our particular repo config) * add parse_requirements to unify requirement handling
2013-08-21Split soledad into common, client and server.drebs