Artifactory製品庫的密碼管理及策略配置

密碼安全管理

通常我們在企業內部對平臺帳號進行管理時,安全團隊都會對我們的帳號體系有一定要求。

通常情況下有以下幾點:

  • 密碼設定的要求,比如密碼的長度,複雜度。
  • 密碼管理的要求,如密碼過期時間,錯誤嘗試次數等等。
  • 密碼安全的的要求,比如密碼是否加密。

JFrog Access 服務

本篇文章就爲您介紹一下Artifactory的帳號管理體系如何設定以上規則,對於使用Artifactory製品庫的公司來說,這是一項必須要瞭解的內容。

那麼說到Artifactory的帳號管理體系,就要給大家介紹一下JFrog Access,它JFrog產品中的一項服務,作用是在後臺管理所有JFrog服務的身份驗證和授權的相關事務。Artifactory中任何配置的所有用戶,組,權限和密碼,都有這項服務來管理和存儲。JFrog Access作爲JFrog Artifactory安裝的組成部分,Access服務將作爲單獨的WAR文件安裝在  $ARTIFACTORY_HOME/webapps 文件夾下。

Access相關配置

那麼根據Access的服務所承擔的工作來說,我們的密碼規則配置,也自然是由這項服務來管理。

對我們當前已經運行的服務來說Access的配置文件,對於Artifactory 6.x的版本來說,文件存儲在$ARTIFACTORY_HOME/access/etc目錄下,如果是Artifactory 7.x的版本,文件存儲在$JFROG_HOME/artifactory/var/etc/access目錄下,文件名爲:access.config.latest.yml

該文件中與密碼安全性相關的配置項如下:

security:

    password-policy:    # users' password policy (用戶的密碼策略)

        uppercase: 0      # minimum number of uppercase letters that the password must contain (密碼必須包含的最小小寫字母數)

        lowercase: 0      # minimum number of lowercase letters that the password must contain (密碼必須包含的最小大寫字母數)

        digit: 0          # minimum number of digits that the password must contain (密碼必須包含的最小數字數)

        length: 4         # minimum length of the password (密碼最小長度)

        not-match-old: true # should access allow setting a new password to the same one currently set for the user (禁止與新舊密碼相同)

    user-lock-policy:

        attempts: 0                     # number of failed login attempts to allow before locking a user. 0 (default) means the feature is disabled (鎖定用戶之前允許的失敗登錄嘗試次數)

        seconds-to-unlock: 0            # number of seconds to wait before re-enabling login for a user that has been locked out (爲已鎖定的用戶重新啓用登錄之前等待的秒數)

        password-expiry-days: 0         # number of days before a password expires. Set by Artifactory (密碼過期)

        admin-password-expirable: false # does the access admin password expire (訪問管理員密碼是否過期)

    audit:

        enabled: true           # should access log all requests to a specific file or not (是否應訪問將所有請求記錄到指定文件)

        password-strength: 8      # bcrypt password strength. A higher value means better security, but password verification will be slower (密碼加密強度,更高的值意味着更好的安全性,但是密碼驗證會慢一些)

        local-interfaces-expire-in-seconds: 60 * 10 # number of seconds for which local server ips should be cached for users’ allowed-ips (用戶允許的IP緩存本地服務器IP的秒數)

        encryption-enabled: true  # specifies if users’ custom data encryption is allowed (指定是否允許用戶的自定義數據加密)

完成配置一個樣例

僅僅展示參數可能不是很直觀,我們現在就來定一個規則,並且把配置內容完成一遍。

要求密碼長度大於12位,包含大小寫字母與數字,新舊密碼不能相同。登錄5次失敗後鎖定,鎖定時間30秒,密碼到期時間90天。具體配置如下圖所示:

更多Access文件的相關配置可以參考我們JFrog官方Wiki鏈接。

https://www.jfrog.com/confluence/display/ACC1X/YAML+Configuration+File

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章