你如何通过Crowd授予Sonar对Jira的访问权限?

我的Jenkins构build调用一个Sonar任务,从Jira中抽取已保存filter的结果。 我所遇到的问题是Sonar的请求总是被拒绝。 我有一个相当复杂的机器集群(吉拉4.4.3,声纳3.2.1,jenkins1.473等),所有通过Crowd 2.2.2authentication。

2012.10.17 12:00:03 INFO cacisscSecurityServerClientImpl Existing application token is null, authenticating ... 2012.10.17 12:00:03 ERROR ocxthHttpChannel Server returned error code = 403 for URI : http://10.74.47.12:8095/crowd/services/SecurityServer. Check server logs for details 2012.10.17 12:00:03 ERROR rails Error from external authenticator: org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Server returned error code = 403 for URI : http://10.74.47.12:8095/crowd/services/SecurityServer. Check server logs for details 

我已经确认Sonar帐户正在使用联系Jira是有效的并且有权访问Jira。 我已经根据文档安装并configuration了Sonar Crowd Plugin,但有些东西是不正确的。 当我login到Sonar时,我在sonar.log中看到以下错误(但是我的login成功):

 2012.10.17 15:49:53 INFO cacisscClientPropertiesImpl Loading property: 'application.name' : 'sonar' 2012.10.17 15:49:53 INFO cacisscClientPropertiesImpl Failed to find value for property: application.login.url 2012.10.17 15:49:53 INFO cacisscClientPropertiesImpl Loading property: 'crowd.server.url' : 'http://10.74.47.120:8095/crowd/services/' 2012.10.17 15:49:53 INFO cacisscClientPropertiesImpl Failed to find value for property: session.isauthenticated 2012.10.17 15:49:53 INFO cacisscClientPropertiesImpl Failed to find value for property: session.tokenkey 2012.10.17 15:49:53 INFO cacisscClientPropertiesImpl Failed to find value for property: session.lastvalidation 2012.10.17 15:49:53 INFO cacisscClientPropertiesImpl Loading property: 'session.validationinterval' : '5' 2012.10.17 15:49:53 INFO cacisscSecurityServerClientImpl Existing application token is null, authenticating ... 2012.10.17 15:49:54 ERROR ocxthHttpChannel Server returned error code = 403 for URI : http://10.74.47.12:8095/crowd/services/SecurityServer. Check server logs for details 2012.10.17 15:49:54 ERROR rails Error from external authenticator: org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Server returned error code = 403 for URI : http://10.74.47.12:8095/crowd/services/SecurityServer. Check server logs for details 
  • 关键点:
    • Crowd服务器上的服务器日志告诉我什么都没有。 Sonar身份validation请求的logging甚至没有到达Crowd。
    • 我已经在sonar-3.2.1 / conf / sonar.properties和Sonar-Tomcat / conf / crowd.properties中定义了application.login.url,但是sonar.log没有select它。
    • Sonar IS从sonar-3.2.1 / conf / sonar.properties中获取一些信息。 我改变了人群,看看声纳是否会logging下这个变化。
    • session.validationinterval在Sonar-Tomcat / conf / crowd.properties中被定义为0,但是sonar.log显示session.validationinterval为5.我无法确定它从哪里获取该值。
    • http://10.74.47.12:8095/crowd/services/SecurityServer是一个有效的URL,那里有一个可用的SOAP服务器。

我也有jenkins人群插件和jenkinsJira插件安装,我没有看到任何问题。

有没有其他人试过这个,有一些额外的步骤,我错过了?

:)我有一个答案给你! 当我一个星期前发现这个时,我很兴奋。 我有一个类似的问题。

http://wiki.idalko.com/display/SONAUT/Sonar+Authenticator+for+JIRA

这个人分解了代码,并将其固定到与Jiraembedded式人群一起工作。 我现在正在部署它来testing服务器…它的工作对我很好!