SAML authentication plugin automatic install

saml

(Ep4sh) #1

Are there any ways to setup settings for SAML authentication plugin (plugin already exists / install automatically)?
Or only manually via Web-console? ( https://docs.sonarqube.org/display/PLUG/SAML+Authentication+Plugin ). Other tricky ways? :slight_smile:


(Ep4sh) #2

%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5

Can I set these keys in conf/sonar.properties file? Is it correct?


(Colin Mueller) #3

Checkout this topic I found by searching β€œsonar.properties SAML” on this forum


(Ep4sh) #4

Thanks for your reply, but i have more questions:
I use curl to set up this setting:

# Auth and Get cookies 
curl -c /tmp/cookies -X POST -i 'http://sonarqube.localhost/api/authentication/login' --data 'login=admin&password=admin'
# Set up parametrs:
curl -b /tmp/cookies -X POST -i 'http://sonarqube.localhost/api/settings/set' --data 'key=sonar.auth.saml.enabled&value=true'

But there are no changes occur :frowning:

I hooked an HTTP packet:

POST /api/settings/set HTTP/1.1
Host: sonarqube.localhost
User-Agent: curl/7.58.0
Accept: /
Cookie: JWT-SESSION=eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJBV2xYajlpQUozOUVOcFdTQk5YdCIsInN1YiI6ImFkbWluIiwiaWF0IjoxNTUxOTUyMjM4LCJleHAiOjE1NTIyMTE0MzgsImxhc3RSZWZyZXNoVGltZSI6MTU1MTk1MjIzODcyMCwieHNyZlRva2VuIjoibmk0MW0zdDZndWxmcTNxcms3MzVwNXI5YzkifQ.yCA83d9Kng8u8beDz-z4Izd-m1Q1RdzuEEovAbdJUgc; XSRF-TOKEN=ni41m3t6gulfq3qrk735p5r9c9
Content-Length: 38
Content-Type: application/x-www-form-urlencoded

key=sonar.auth.saml.enabled&value=true

It is similar to the packet from browser, exluding some http headers.
What do I wrong?