Impossible to get workspace list with machine token #17246
Labels
area/editor/theia
Issues related to the che-theia IDE of Che
kind/bug
Outline of a bug - must adhere to the bug report template.
severity/P1
Has a major impact to usage or development of the system.
Milestone
Describe the bug
Due to filtering restrictions for some REST service methods it is impossible to retrieve workspace list using workspace-client library with machine token.
Workspace service is configured for blocking some requests that comes with machine token: getByKey and getWorkspaces and the following filter: https://github.com/eclipse/che/blob/master/multiuser/machine-auth/che-multiuser-machine-authentication/src/main/java/org/eclipse/che/multiuser/machine/authentication/server/MachineAuthModule.java#L55-L56
che-workspace-client library's methods require user token, not machine. And on the other hand, che-theia doesn't have fully functional mechanism, which allow developer obtain user token without any workaround. So by obtaining user token means communication with keycloak authorization mechanism. Theia editor locates in iframe and there is only way to get user token is to make some "bridge" between Theia and parent inframe (Dashboard). This is the first way which can be made as a workaround, discussed with Platform Team. As for the second workaround, we may update filters by removing those two methods from filtering (
getByKey
andgetWorkspaces
), but this is not convenient, because it breaks the conception of workspace sharing. cc @skabashnyukIn terms of Che-Theia (editor as a subject) there should be some API, which allow developer to get user token like it has been done for machine token to allow make such requests.
On the other hand, it requires modification API in che-workspace-client which will allow pass user token as parameter for such type of call.
Dependent issue: #17034
Che version
Runtime
kubectl version
)oc version
)minikube version
andkubectl version
)minishift version
andoc version
)docker version
andkubectl version
)Screenshots
Installation method
chectl version
commandEnvironment
The text was updated successfully, but these errors were encountered: