2017-07-25 63 views
0

我正在創建一個聲明式管道項目,並希望採用門控機制,只允許某些AD組中存在的用戶「促進」構建。爲了做到這一點,我使用input step pluginJenkins的管道輸入步驟插件如何與SAML/AD組一起使用?

我開始使用以下:

input(message: 'Do you want to deploy to the Development Environment?)'

這工作好,那我利用submitter參數,並提供我的電子郵件

input(message: 'Do you want to deploy to the Development Environment?', submitter: "[email protected]")

這隻讓我通過構建。現在我想基於AD羣組中的用戶來完成此操作。我們使用SAML plugin與詹金斯整合,看來,我們的小組最終看起來就像這樣:

CN=OS-AWS-XYZAdministrator,OU=Security,OU=Groups,OU=The XYZ Group Object,DC=XYZCORP,DC=local

我們利用基於項目的矩陣授權策略插件和「用戶/組」之一正在使用上面的組來訪問Jenkins UI以及我們確認作品的Build Now特權。

當試圖做

input(message: 'Do you want to deploy to the Development Environment?', submitter: "CN=OS-AWS-XYZAdministrator,OU=Security,OU=Groups,OU=The XYZ Group Object,DC=XYZCORP,DC=local")

當該廣告組的點擊繼續任何用戶,他們得到一個錯誤說:

You need to be CN=OS-AWS-XYZAdministrator,OU=Security,OU=Groups,OU=The XYZ Group Object,DC=XYZCORP,DC=local to submit this

我自己也嘗試CN=OS-AWS-XYZAdministratorOS-AWS-XYZAdministrator與沒有運氣。我甚至嘗試

input(message: 'Do you want to deploy to the Development Environment?', submitter: '"CN=OS-AWS-XYZAdministrator,OU=Security,OU=Groups,OU=The XYZ Group Object,DC=XYZCORP,DC=local"')

,但沒有奏效

是否input實際上與AD組工作?一些組中的空間是否會把它扔掉?

感謝 卡爾

回答

0

原來CN=OS-AWS-XYZAdministrator,OU=Security,OU=Groups,OU=The XYZ Group Object,DC=XYZCORP,DC=local被認爲是無效的格式。 AD組中不能有逗號或空格。我們必須調整LDAP查詢,所以根據Jenkins的說法,我們只得到AWS-XYZAdministrator作爲ADGroup。這固定它

相關問題