Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
github.com/tencent/bk-bcs/bcs-services/bcs-cli/bcs-user-manager
配置文件默认放在 /etc/bcs/bcs-user-manager.yaml
文件:
config:
apiserver: "${BCS APISERVER地址}"
bcs_token: "${Token信息}"
kubectl-bcs-user-manager create admin-user --help
参数详情:
-u, --user_name string "用户名称,通过该字段创建admin用户信息"
示例:
kubectl-bcs-user-manager create admin-user -u [user_name to create]
kubectl-bcs-user-manager create au -u [user_name to create]
kubectl-bcs-user-manager get admin-user --help
参数详情:
-u, --user_name string "用户名称,通过该字段查询admin用户信息"
示例:
kubectl-bcs-user-manager get admin-user -u [user_name to query]
kubectl-bcs-user-manager get au -u [user_name to query]
kubectl-bcs-user-manager create saas-user --help
参数详情:
-u, --user_name string "用户名称,通过该字段创建saas用户信息"
示例:
kubectl-bcs-user-manager create saas-user -u [user_name to create]
kubectl-bcs-user-manager create su -u [user_name to create]
kubectl-bcs-user-manager get saas-user --help
参数详情:
-u, --user_name string "用户名称,通过该字段查询saas用户信息"
示例:
kubectl-bcs-user-manager get saas-user -u [user_name to query]
kubectl-bcs-user-manager get su -u [user_name to query]
kubectl-bcs-user-manager update saas-token --help
参数详情:
-u, --user_name string "用户名称,通过该字段刷新saas用户token信息"
示例:
kubectl-bcs-user-manager update saas-token -u [user_name]
kubectl-bcs-user-manager update st -u [user_name]
kubectl-bcs-user-manager create plain-user --help
参数详情:
-u, --user_name string "用户名称,通过该字段创建plain用户信息"
示例:
kubectl-bcs-user-manager create plain-user -u [user_name to create]
kubectl-bcs-user-manager create pu -u [user_name to create]
kubectl-bcs-user-manager get plain-user --help
参数详情:
-u, --user_name string "用户名称,通过该字段查询plain用户信息"
示例:
kubectl-bcs-user-manager get plain-user -u [user_name to query]
kubectl-bcs-user-manager get pu -u [user_name to query]
kubectl-bcs-user-manager update plain-token --help
参数详情:
-u, --user_name string "用户名称,通过该字段创建admin用户信息"
-t, --expire_time string "过期时间,过期天数,整数 >=0,0为立即过期"
示例:
kubectl-bcs-user-manager update plain-token -u [user_name] -t [expire_time]
kubectl-bcs-user-manager update pt -u [user_name] -t [expire_time]
kubectl-bcs-user-manager create cluster --help
参数详情:
-b, --cluster-body string "json类型"
cluster-body json说明
{
"cluster_id": "",
"cluster_type": "", //string类型,值范围["k8s","mesos","tke"]
"tke_cluster_id": "",
"tke_cluster_region": ""
}
示例:
kubectl-bcs-user-manager create cluster --cluster-body '{"cluster_id":"","cluster_type":"", "tke_cluster_id":"","tke_cluster_region":""}'
kubectl-bcs-user-manager create register-tokenr --help
参数详情:
-i, --cluster_id string "集群id,通过该字段创建register-token信息"
示例:
kubectl-bcs-user-manager create register-token --cluster_id [cluster_id]
kubectl-bcs-user-manager create rt --cluster_id [cluster_id]
kubectl-bcs-user-manager get register-token --help
参数详情:
-i, --cluster_id string "集群id,通过该字段获取register-token信息"
示例:
kubectl-bcs-user-manager get register-token --cluster_id [cluster_id]
kubectl-bcs-user-manager get rt --cluster_id [cluster_id]
kubectl-bcs-user-manager update credentials --help
参数详情:
-i, --cluster_id string "集群id,通过该字段更新credential信息"
-f, --credentials_form string "json类型"
credentials_form json说明
{
"register_token": "",
"server_addresses": "",
"cacert_data": "",
"user_token": ""
}
示例:
kubectl-bcs-user-manager update credentials --cluster_id [cluster_id] --credentials_form ' {"register_token":"","server_addresses":"","cacert_data":"","user_token":""}'
kubectl-bcs-user-manager get credentials --help
参数详情:
-i, --cluster_id string "集群id,通过该字段获取credential信息"
示例:
kubectl-bcs-user-manager get credentials --cluster_id [cluster_id]
kubectl-bcs-user-manager get c --cluster_id [cluster_id]
kubectl-bcs-user-manager list credentials --help
参数详情:
无参数
示例:
kubectl-bcs-user-manager list credentials
kubectl-bcs-user-manager list c
kubectl-bcs-user-manager grant permission --help
参数详情:
-f, --permission_form string "json类型"
permission_form json说明
{
"apiVersion": "",
"kind": "",
"metadata": {
"name": "",
"namespace": "",
"creationTimestamp": "0001-01-01T00:00:00Z",
"labels": { //map[string]string
"a": "a"
},
"annotations": { //map[string]string
"a": "a"
},
"clusterName": ""
},
"spec": {
"permissions": [
{
"user_name": "",
"resource_type": "",
"resource": "",
"role": ""
}
]
}
}
示例:
kubectl-bcs-user-manager grant permission --permission_form '{
"apiVersion": "",
"kind": "",
"metadata": {
"name": "",
"namespace": "",
"creationTimestamp": "0001-01-01T00:00:00Z",
"labels": {
"a": "a"
},
"annotations": {
"a": "a"
},
"clusterName": ""
},
"spec": {
"permissions": [
{
"user_name": "",
"resource_type": "",
"resource": "",
"role": ""
}
]
}
}'
kubectl-bcs-user-manager get permission --help
参数详情:
-f, --permission_form string "json类型"
permission_form json说明
{
"user_name": "",
"resource_type": ""
}
示例:
kubectl-bcs-user-manager get permission -f '{"user_name":"","resource_type":""}'
kubectl-bcs-user-manager delete permission --help
参数详情:
-f, --permission_form string "json类型"
permission_form json说明
{
"apiVersion": "",
"kind": "",
"metadata": {
"name": "",
"namespace": "",
"creationTimestamp": "0001-01-01T00:00:00Z",
"labels": { //map[string]string
"a": "a"
},
"annotations": { //map[string]string
"a": "a"
},
"clusterName": ""
},
"spec": {
"permissions": [
{
"user_name": "",
"resource_type": "",
"resource": "",
"role": ""
}
]
}
}
示例:
kubectl-bcs-user-manager delete permission --permission_form '{
"apiVersion": "",
"kind": "",
"metadata": {
"name": "",
"namespace": "",
"creationTimestamp": "0001-01-01T00:00:00Z",
"labels": {
"a": "a"
},
"annotations": {
"a": "a"
},
"clusterName": ""
},
"spec": {
"permissions": [
{
"user_name": "",
"resource_type": "",
"resource": "",
"role": ""
}
]
}
}'
kubectl-bcs-user-manager verify permissions --help
参数详情:
-f, --form string "json类型"
form json说明
{
"user_token": "",
"resource_type": "",
"resource": "",
"action": ""
}
示例:
kubectl-bcs-user-manager verify permissions --form '{"user_token":"","resource_type":"","resource":"","action":""}'
kubectl-bcs-user-manager verify permissionsv2 --help
参数详情:
-f, --form string "json类型"
form json说明
{
"user_token": "",
"resource_type": "",
"resource": "",
"action": ""
}
示例:
kubectl-bcs-user-manager verify permissionsv2 --form '{"user_token":"","resource_type":"","resource":"","action":""}'
kubectl-bcs-user-manager create token --help
参数详情:
-f, --token_form string "json类型"
form json说明
{
"usertype":1, //int类型 AdminUser=1 SaasUser=2 PlainUser=3 ClientUser=4
"username":"",
"expiration":-1 //token expiration second, -1: never expire
}
示例:
kubectl-bcs-user-manager create token --token_form '{"usertype":1,"username":"", "expiration":-1}'
kubectl-bcs-user-manager get token --help
参数详情:
-n, --user_name string "用户名称,通过该字段创建admin用户信息"
示例:
kubectl-bcs-user-manager get token -u [user_name to create]
kubectl-bcs-user-manager get t -u [user_name to create]
kubectl-bcs-user-manager delete token --help
参数详情:
-t, --token string "token"
示例:
kubectl-bcs-manager delete token -t [token]
kubectl-bcs-user-manager update token --help
参数详情:
-t, --token string "token"
-f, --token_form string "json类型"
token_form json说明
{
"expiration":-1 //token expiration second, -1: never expire
}
示例:
kubectl-bcs-manager update token --token [token] --form '{"expiration":-1}'
kubectl-bcs-user-manager create temp-token --help
参数详情:
-f, --token_form string "json类型"
token_form json说明
{
"usertype": 1, //int类型 AdminUser=1 SaasUser=2 PlainUser=3 ClientUser=4
"username": "",
"expiration": -1 //int类型 token expiration second, -1: never expire
}
示例:
kubectl-bcs-user-manager create temp-token --token_form '{"usertype":1,"username":"", "expiration":-1}'
kubectl-bcs-user-manager create client-token --help
参数详情:
-f, --token_form string "json类型"
token_form json说明
{
"clientName": "",
"clientSecret": "",
"expiration": -1 //int类型 token expiration second, -1: never expire
}
示例:
kubectl-bcs-user-manager create client-token --token_form '{"clientName":"","clientSecret":"", "expiration":-1}'
kubectl-bcs-user-manager get extra-token --help
参数详情:
注意:三个参数需要同时传递
-n, --user_name string "用户名称,通过该字段获取token信息"
--cluster_id string "集群id,通过该字段获取token信息"
--business_id string "业务id,通过该字段获取token信息"
示例:
kubectl-bcs-user-manager get extra-token -u [user_name] --cluster_id [cluster_id] --business_id [business_id]
kubectl-bcs-user-manager create tkecidrs --help
参数详情:
-f, --tkecidr_form string "json类型"
tkecidr_form json说明
{
"vpc": "",
"tke_cidrs": [
{
"cidr": "",
"ip_number": "",
"status": "" //"string ["available","used","reserved"]
}
]
}
示例:
kubectl-bcs-user-manager create tkecidrs --tkecidr_form '{
"vpc": "",
"tke_cidrs": [
{
"cidr": "",
"ip_number": "",
"status": "available"
}
]
}'
kubectl-bcs-user-manager apply tkecidrs --help
参数详情:
-f, --tkecidr_form string "json类型"
tkecidr_form json说明
{
"vpc": "",
"cluster": "",
"ip_number": 1 //uint 正整数
}
示例:
kubectl-bcs-user-manager apply tkecidrs --tkecidr_form '{\"vpc\":\"\",\"cluster\":\"\", \"ip_number\":}'
kubectl-bcs-user-manager release tkecidrs --help
参数详情:
-f, --tkecidr_form string "json类型"
tkecidr_form json说明
{
"vpc": "",
"cidr": "",
"cluster": "",
}
示例:
kubectl-bcs-user-manager release tkecidrs --tkecidr_form '{"vpc":"","cidr":"","cluster":""}'
kubectl-bcs-user-manager list tkecidrs --help
参数详情:
无参数
示例:
kubectl-bcs-user-manager list tkecidrs
kubectl-bcs-user-manager sync tkecidrs --help
参数详情:
-i, --cluster_id string "集群id,通过该字段同步tke集群redential信息"
示例:
kubectl-bcs-user-manager sync tkecidrs --cluster_id [cluster_id]
执行下述命令编译 Client 工具
make bin
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.