Skip to content
This repository has been archived by the owner on Jul 23, 2020. It is now read-only.

Certain accounts cause: Unable to delete a space resource via auth service #2867

Closed
aslakknutsen opened this issue Apr 4, 2018 · 6 comments

Comments

@aslakknutsen
Copy link
Collaborator

https://errortracking.prod-preview.openshift.io/openshift_io/fabric8-wit/issues/2081/

Certain accounts casue a 500 error in Space API on Delete.

*errors.fundamental: unable to delete a space resource via auth service. Response status: 500 Internal Server Error. Response body: 
  File "/tmp/go/src/github.com/fabric8-services/fabric8-wit/auth/resource.go", line 134, in DeleteSpace
  File "/tmp/go/src/github.com/fabric8-services/fabric8-wit/controller/space.go", line 174, in Delete
  File "/tmp/go/src/github.com/fabric8-services/fabric8-wit/app/controllers.go", line 1995, in func2
  File "/tmp/go/src/github.com/fabric8-services/fabric8-wit/vendor/github.com/goadesign/goa/middleware/security/jwt/jwt.go", line 123, in 1
  File "/tmp/go/src/github.com/fabric8-services/fabric8-wit/app/security.go", line 49, in func1
...
(18 additional frame(s) were not displayed)

unable to delete a space resource via auth service. Response status: 500 Internal Server Error. Response body: 
@xcoulon
Copy link
Collaborator

xcoulon commented Apr 19, 2018

Looking at the logs for the auth service, the problem seems to come from the resource deletion in Keycloak:

{
  "file": "/tmp/go/src/github.com/fabric8-services/fabric8-auth/auth/authz.go",
  "func": "github.com/fabric8-services/fabric8-auth/auth.DeleteResource",
  "level": "error",
  "line": 425,
  "msg": "unable to delete the Keycloak resource",
  "pkg": "auth",
  "req_id": "89aea011-7d08-4b25-8c4a-aa12a6dbe052",
  "req_params": { "spaceID": ["145cf55b-940d-4c64-9ffd-3c81fb5061a5"] },
  "response_body":
    "\u003chtml\u003e\u003chead\u003e\u003ctitle\u003eError\u003c/title\u003e\u003c/head\u003e\u003cbody\u003eInternal Server Error\u003c/body\u003e\u003c/html\u003e",
  "response_status": "500 Internal Server Error",
  "time": "2018-04-18 21:08:32"
}

@xcoulon
Copy link
Collaborator

xcoulon commented Apr 19, 2018

@sbose78 @alexeykazakov is there something we can do about such errors ?

@alexeykazakov
Copy link
Member

@kwk
Copy link
Contributor

kwk commented May 8, 2018

I think this issue is related #3503

@alexeykazakov
Copy link
Member

think this issue is related #3503

I don't thin it's related to #3503
We don't prevent space deletion (and do not pass this error to UI) if auth failed to delete the space resource in Keycloak.

@alexeykazakov
Copy link
Member

We don't use Keycloak for space AuthZ anymore. Closing as resolved.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants