Access to permission templates API from custom web service


(Raul Aonofriesei) #1

Hello all!

I am trying to create a SonarQube web application extension that allows regular users access to permission templates under certain conditions.
The solution I have arrived at is a web service which makes http calls from the plugin, using an admin token, after making some security checks. This works fine but seems a bit clunky.
After looking around online I came across the sonar.ws libraries, which is close to what I need, but I could not find a way to access admin sections when called by regular user.
Is there a way to do that? Or a better way to achieve what I’m trying to do?

Thanks,
Raul


(Julien Lancelot) #2

Hi @r.aon,

The only way to access to secured action from a Web Service extension is indeed to use either a token, or login/password.

Regards,
Julien Lancelot