明码平安治理

通常咱们在企业外部对平台帐号进行治理时,平安团队都会对咱们的帐号体系有肯定要求。

通常状况下有以下几点:

  • 明码设定的要求,比方明码的长度,复杂度。
  • 明码治理的要求,如明码过期工夫,谬误尝试次数等等。
  • 明码平安的的要求,比方明码是否加密。

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/conflue...