reanahub / reana-server

REANA API server
http://reana-server.readthedocs.io/
MIT License
5 stars 37 forks source link

api: 201 but secrets were not updated #141

Closed okraskaj closed 4 years ago

okraskaj commented 5 years ago

When REANA-Cluster does set correct permissions so Kubernetes secrets can be updated (i.e. using old REANA-Cluster), REANA-Client reports that secrets were uploaded correctly:

$ reana-client -l DEBUG secrets-add --from-literal PASSWORD=password
Secrets PASSWORD were successfully uploaded.

But they weren't:

$ kubectl logs server-66f4d75c47-lw6sm server -f
HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json', 'X-Content-Type-Options': 'nosniff', 'Date': 'Thu, 06 Jun 2019 08:54:21 GMT', 'Content-Length': '380'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"secrets \"00000000-0000-0000-0000-000000000000\" is forbidden: User \"system:serviceaccount:default:default\" cannot update resource \"secrets\" in API group \"\" in the namespace \"default\"","reason":"Forbidden","details":{"name":"00000000-0000-0000-0000-000000000000","kind":"secrets"},"code":403}

2019-06-06 08:54:21,727 | werkzeug | Thread-3 | INFO | 172.17.0.1 - - [06/Jun/2019 08:54:21] "POST /api/secrets/?access_token=xyyJtH2GWCkfCbVM1mpXGWuueb3D2JygPfBmhzGb8qI&overwrite=false HTTP/1.1" 201 -
roksys commented 4 years ago

I don't think it is the case anymore.

$ reana-client -l DEBUG secrets-add --env PASSWORD1=password1
Secrets PASSWORD1 were successfully uploaded.
$ kubectl logs server-d574d5d96-p84w8 server
172.17.0.1 - - [25/Nov/2019 15:34:01] "POST /api/secrets/?access_token=rZRcm7A2sjOVlqROcnf8pnAWMDUK5HLX7oIfwqoZPNM&overwrite=false HTTP/1.1" 201 -

@diegodelemos, can we close this one?