ARTIFACTORY:升级后LDAP用户无法访问用户配置文件的原因X到7。x ?
在人工工厂6。x, you could encounter a known bug in which an LDAP user was able to access to the user profile although NULL value of updatable_profile column is in access_users_custom_data table.
解决方案
有两种方法可以解决这个问题,通过Shell脚本或SQL查询。
1.通过shell脚本,您可以运行以下命令将profileUpdatable的值更新为true。#!/bin/bash
user_list=($(curl -s -u admin:Password1 "http://art7。Gcp:8081/artifactory/api/security/users" | jq -r '.[].name'))
${user_list[@]}中的用户名;做
如果([$用户名! = "管理 " ] && [ $ 用户名! =“匿名”);然后
user_info=$(curl -s -uadmin:Password1 "http://art7。gcp:8081/artifactory/api/security/users/$username" | jq -r '.profile - updatable,.realm')
Profile =$(echo $user_info | cut -d ' ' -f1)
Realm =$(echo $user_info | cut -d ' ' -f2)
echo " $用户名、概要= $概要域= $域”
如果([概要美元= "假的 " ] && [ $ 领域= " ldap "]);然后
将$username profile_value false更新为true
echo $(curl -s -uadmin:Password1 -XPOST "http://art7。gcp:8081/artifactory/api/security/users/$username" -H "Content-Type: application/json" -d '{"profileUpdatable":"true"}')
fi
fi
完成
2.您也可以同时运行下面的插入和更新查询。
一个。
更新access_users_custom_data
集Prop_value = 'true'
在哪里Prop_key = 'updatable_profile'
和(prop_value != 'true')或prop_value为空)
和User_id在选择user_id从access_users在哪里域= 'ldap')
B。
插入Access_users_custom_data (user_id, prop_key, prop_value, prop_sensitive, prop_cluster_local)
选择user_id updatable_profile”,“真正的”,0,0
从access_users
在哪里user_id不是在(选择user_id从access_users_custom_data在哪里prop_key =“updatable_profile”)
和Realm = 'ldap'
