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

K8S中文社区微信公众号

评论 抢沙发

登录后评论

立即登录