下拉选择I have a metadata URL,然后填入配置CAS的地址http://cas.xyz327.cn/idp/metadata,点击Accpet all,点击import,点击下一步
选择匹配JirauserId的属性.使用默认的,点击下一步
选择同步用户到jira的方式,我这边选择Update Form SAML-Attributes,从登陆用户的信息中创建用户
勾选create New User和Update non-SAML Provisioned Users,Directory for New Users一栏选择Jira Internal Directory, Full Name Attribute输入{username},Email Attribute输入{email}.下拉到Group Settings->User Groups 点击Add one 输入jira-software-users. 点击下一步
对于Bitbucket 在Directory for New Users无法选择Jira Internal Directory.多以对于Bitbucket 可以选择不同用户信息.这样就会导致如果用户第一次登陆是登陆bitbucket的话那就会出现找不到用户的错误。可以在PageTemplate里面增加错误提示要求用户第一次登陆时需要先登录Jira/Confluence
<html> <head> <title>SAML Single Sign On failed</title> $webResourceManager.requireResource("$pluginproperties.pluginkey:resources") <metaname="decorator"content="atl.general"> </head> <bodyclass="aui-page-focused aui-page-medium" > <divclass="aui-page-panel"> <divclass="aui-page-panel-inner"> <sectionclass="aui-page-panel-content"> <h1>SAML Single Sign On failed</h1> <div>Please contact your administrator #if($tracker) and provide the tracker-id <b>$tracker</b> #end or log in at the <ahref="$loginurl">login page</a>.</div> #if($userid) <divclass="aui-message error">$userid could not be authorized. This userid is unknown or the user does not have sufficient permissions.</div> #end #if($message) <divclass="aui-message error">$message</div> <!-- 这里提示用户需要先登录jira --> <divclass="aui-message error">如果提示找不到用户请先登录<ahref="http://jira.xyz327.cn/"><b>jira</b></a></div> #end #if($stacktrace) <aid="show-stacktrace-trigger"data-replace-text="Hide Stack Trace"class="aui-expander-trigger button"aria-controls="stacktrace">Show Stack Trace</a> <divclass="aui-expander-content"id="stacktrace">$stacktrace</div> #end </section> </div> </div> </body> </html>