Commit Graph

27 Commits

Author SHA1 Message Date
Simone Gotti 2fab8ad85b configstore: check token name is not empty 2019-04-29 16:59:09 +02:00
Simone Gotti 95e73e66a0 oauth2: correctly populate token expiry data
* Populate the field when needed
* Convert it to a time instead of a duration
2019-04-29 14:57:07 +02:00
Simone Gotti a5d6ac85a6 configstore: namespace changegroups 2019-04-29 10:37:23 +02:00
Simone Gotti 159abffa06 configstore: fix changegroup names
changegroup names are based on names that will contain slashes and could be very
long. So calculate the sha256 sum of the starting name and use it as the
changegroup name.
2019-04-29 10:24:05 +02:00
Simone Gotti 19877e679c configstore readdb: also resync changegroups 2019-04-29 10:15:44 +02:00
Simone Gotti 2c3e6bf9e4 wal: update and rename to datamanager
* Rename to datamanager since it handles a complete "database" backed by an
objectstorage and etcd

* Don't write every single entry as a single file but group them in a single
file. In future improve this to split the data in multiple files of a max size.
2019-04-26 16:00:03 +02:00
Simone Gotti 41e333d7ec *: rename "lts" to "ost"
`lts` was choosen to reflect a "long term storage" but currently it's just an
object storage implementation. So use this term and "ost" as its abbreviation
(to not clash with "os").
2019-04-27 15:16:48 +02:00
Simone Gotti 3642be6f21 */api: Use helpers for error handling
* client: always parse the json error message field and return its contents
* Use ErrBadRequest and ErrNotFound in every handler and command
* Gateway: by default pass underlying service error (configstore, runservice) to
client keeping the status code and message. In future, if some errors must be
masked, we should change the specific parts that need special handling.
2019-04-09 14:53:00 +02:00
Simone Gotti 4fb250a668 configstore api: improve response handling
* Always return a json message also on error. For internal errors return a
generic "internal server error" message to not leak the real internal error to
clients
* Return 201 Created on resource creation
* Return 204 No Content on resource deletion and other action with no json
output
2019-04-08 12:29:25 +02:00
Simone Gotti 04f3905ea1 client: fix content type header case 2019-04-08 12:28:15 +02:00
Simone Gotti f3781c9087 *: fix rest methods
* use POST instead of PUT for resource creation
* use PUT instead of POST for resource special actions
2019-04-08 08:54:45 +02:00
Simone Gotti 595590e611 api: use httpError helper everywhere 2019-04-05 16:33:00 +02:00
Simone Gotti 200aef20b9 configstore: create token only if it doesn't exists 2019-04-05 15:06:26 +02:00
Simone Gotti c4310be7de Implement user token delete 2019-04-05 15:01:57 +02:00
Simone Gotti 42becb0505 update secret create 2019-04-05 10:32:32 +02:00
Simone Gotti f0e7ce4a96 cmd: implement project/projectgroup variable create 2019-04-02 11:07:39 +02:00
Simone Gotti 99a6c12f98 project delete: use project ref 2019-04-02 11:06:45 +02:00
Simone Gotti ed502276ba update configstore for previous wal changes 2019-04-03 18:11:31 +02:00
Simone Gotti fc891409ca update wal and readdb 2019-04-01 12:54:43 +02:00
Simone Gotti 704da47afc configstore: createuser also create linked account when requested
Useful to future user registration to create user and linked account in a unique
atomic call.
2019-03-29 17:50:51 +01:00
Simone Gotti 65c425b22b wal: report when wal is ready
in this way the wal instance will be used only after it's ready (initialized
etcd when needed)
2019-03-28 15:46:24 +01:00
Simone Gotti 50547a6490 initial secret and variables impl 2019-03-14 14:36:18 +01:00
Simone Gotti 8b92b6f55c initial project group impl
and related api updated
2019-03-14 14:36:18 +01:00
Simone Gotti 3b8a1d684b configstore: use httpError everywhere 2019-03-14 09:34:05 +01:00
Simone Gotti 7d105f1232 configstore: use ErrBadRequest 2019-03-12 15:12:19 +01:00
Simone Gotti 41002efbff *: add organizations 2019-02-28 15:52:35 +01:00
Simone Gotti 57c756a5a4 configstore: initial implementation 2019-02-21 16:08:30 +01:00