openSUSE / open-build-service

Build and distribute Linux packages from sources in an automatic, consistent and reproducible way #obs
https://openbuildservice.org
GNU General Public License v2.0
923 stars 437 forks source link

Introduce CORS in the API #2273

Open kalabiyau opened 7 years ago

kalabiyau commented 7 years ago

To build a frontend app on top of OBS that is essential to define rules for CORS on the server side.

Here is a story for you

As a developer of a frontend app I would like to get information from IBS API in order to add value on top of existing OBS instance.

At the moment there is no way to do that as CORS policy is not defined. I don't want to imply any tech decisions, so the user-story pretty much describes what I want.

kalabiyau commented 7 years ago

@adrianschroeter could you please evaluate that?

hennevogel commented 7 years ago

You are talking about Cross-Origin Resource Sharing right? What is it you imagine as frontend app exactly?

kalabiyau commented 7 years ago

@hennevogel exactly what I mean. As a front-end app I assume something lie vue.js or angular2 which talks directly to public namespace of OBS

hennevogel commented 7 years ago

As we are still using rack this is fairly easy done with rack-cors. Are you planing to do some app or is this just an nice-to-have idea? :-)

kalabiyau commented 7 years ago

@hennevogel I have a project of SCC self-service app and absence of CORS is pretty much a blocker for me :)

adrianschroeter commented 7 years ago

It is not so easy, since it requires changes in our api permission handling. We may also need to support app tokens for general api requests...

Or we provide some of the needed functionality via the webui routes. But we would need to know the exact interfaces which are wanted then.