Commit Graph

11 Commits

Author SHA1 Message Date
Simone Gotti 92de7591da gitsources: implement gitea oauth2 auth
As from https://github.com/go-gitea/gitea/pull/5378 gitea is an oauth2 provider.
2019-05-09 14:14:13 +02:00
Simone Gotti 83273489e0 jwt: unify token generation functions 2019-05-07 18:30:20 +02:00
Simone Gotti afae185e11 *: rework run approval and annotations
* runservice: use generic task annotations instead of approval annotations
* runservice: add method to set task annotations

* gateway: when an user call the run task approval action, it will set in the
task annotations the approval users ids. The task won't be approved.

* scheduler: when the number of approvers meets the required minimum number
(currently 1) call the runservice to approve the task

In this way we could easily implement some approval features like requiring a
minimum number of approvers (saved in the task annotations) before marking the
run as approved in the runservice.
2019-05-06 15:19:29 +02:00
Simone Gotti a04dd62e91 gateway: initial authorization 2019-05-03 23:19:23 +02:00
Simone Gotti 081ac8a44f gateway: move webhook genGroup to common as GenRunGroup 2019-05-05 23:58:40 +02:00
Simone Gotti f73f0ba434 gateway: move variable logic from api to actions 2019-05-04 15:16:49 +02:00
Simone Gotti 60feff5cef configstore: add more validations
All the validation must be done inside the configstore since it's the source of
truth.

The gateway could also do some validation to avoid bad requests to the
configstore when needed or when the logic resides outside the configstore (like
project setup or user registration)
2019-05-03 12:41:49 +02:00
Simone Gotti 984efb539e configstore: use augmented types for vars/secrets dynamic values 2019-04-30 16:28:01 +02:00
Simone Gotti cbd971619b gateway: refresh oauth2 token when needed
refresh the oauth2 access token when needed and update the related linked
account.
2019-04-29 15:42:10 +02:00
Simone Gotti 50547a6490 initial secret and variables impl 2019-03-14 14:36:18 +01:00
Simone Gotti 021a0465ce gateway: initial implementation 2019-02-21 17:58:25 +01:00