Get the App
SLTechnology News&Howtos  ›  Development  › 

How to configure cas Integrated sonar

Shulou Source: shulou.com Published: 2022-06-01 04:33:49 11月16日 Update

This article focuses on "how to configure cas integration sonar", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "how to configure cas integrated sonar"!

1. Modify sonar configuration conf/sonar.properties

Modify the sonar configuration file conf/sonar.properties:

Sonar.security.realm = cas Sonar.authenticator.createUsers = true # sonar.cas.forceCasLogin = true Sonar.cas.protocol = cas3 sonar.cas.casServerUrlPrefix = http://192.168.1.58:8080/cas Sonar.cas.casServerLoginUrl = http://192.168.1.58:8080/cas/login sonar.cas.casServerLogoutUrl = http://192.168.1.58:8080/cas/logout Sonar.cas.sonarServerUrl = http://192.168.1.35:9200 sonar.cas.urlAfterCasRedirectCookieMaxAgeSeconds = 300sonar.cas.sessionStorePath = / opt/sonarqube/data/sonarcas/sessionstore sonar.cas.sessionStore.cleanUpIntervalInSeconds = 1800 # Specifies whether gateway=true should be sent to the CAS server. Default is false. # sonar.cas.sendGateway # Specifies how SonarQube groups should be replicated. A value of "CAS" always overwrites the user's local groups with # the group provided by CAS upon UI log-in. The user's local groups will be untouched, f. I. with the value "sonarqube". # Defaults to "CAS". Sonar.cas.groupReplication = CAS sonar.cas.rolesAttributes = groups sonar.cas.fullNameAttribute = displayName Sonar.cas.eMailAttribute = mail sonar.cas.saml11.toleranceMilliseconds = 1000 Sonar.cas.disableCertValidation = true II. Download the plug-in sonar-cas-plugin

Download the plug-in sonar-cas-plugin, copy the plug-in to sonar's extentions/plugins directory, and restart the sonar service.

3. Modify the cas configuration file application.yml

Modify the cas configuration file application.yml as follows:

# Application properties that need to be# embedded within the web application can be included herecas: authn: jdbc: query:-dialect: org.hibernate.dialect.MySQLDialect driverClass: com.mysql.jdbc.Driver fieldPassword: password password: 'xxxxxx' sql: select * from user where user_name=? Url: jdbc:mysql://192.168.1.32:3306/cas?useUnicode=true&characterEncoding=utf-8&useSSL=false user: root serviceRegistry: initFromJson: true tgc: secure: false IV. Modify cas configuration file HTTPSandIMAPS-10000001.json

Add cas/WEB-INF/classes/services/HTTPSandIMAPS-10000001.json file and add http support:

{"@ class": "org.apereo.cas.services.RegexRegisteredService", "serviceId": "^ (https? | http? | imaps?): / /. *", "name": "All", "id": 10000000, "description": "This service definition authorizes all application urls that support HTTPS and IMAPS protocols.", "evaluationOrder": 10000, "proxyPolicy": {"@ class": "org.apereo.cas.services.RegexMatchingRegisteredServiceProxyPolicy" "pattern": "^ (https? | http?): / /. *"}, "usernameAttributeProvider": {"@ class": "org.apereo.cas.services.DefaultRegisteredServiceUsernameProvider"}, "attributeReleasePolicy": {"@ class": "org.apereo.cas.services.ReturnAllAttributeReleasePolicy"}} so far I believe you have a deeper understanding of "how to configure cas integrated sonar", so you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Configuration files content plug-ins learning practical deeper interest practicality practical copy easy to operate methods more friends directories websites channels f. Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Xiaomi Docker Shulou Tech Info NVidia