acme.sh
acme.sh copied to clipboard
[FEATURE-REQ] Need IAM sub-account support for HUAWEICloud.
Why need it?
The script cannot get the right token due to my HUAWEI account has been enabled MFA Two-factor authentication for some security reasons. So we need the IAM sub-account supports.
How to?
I have moded the file dns_huaweicloud.sh
to support HUAWEI IAM sub-account.
before https://github.com/acmesh-official/acme.sh/blob/9293bcfb1cd5a56c6cede3f5f46af8529ee99624/dnsapi/dns_huaweicloud.sh#L239-L267
after
_get_token() {
_username=$1
_password=$2
_project=$3
_iamuser=`echo $_username | awk -F@ '{print $1}'`
_iamdomain=`echo $_username | awk -F@ '{print $2}'`
_debug "Getting Token"
body="{
\"auth\": {
\"identity\": {
\"methods\": [
\"password\"
],
\"password\": {
\"user\": {
\"name\": \"${_iamuser}\",
\"password\": \"${_password}\",
\"domain\": {
\"name\": \"${_iamdomain}\"
}
}
}
},
\"scope\": {
\"project\": {
\"id\": \"${_project}\"
}
}
}
}"
How to use?
export HUAWEICLOUD_Username=subaccount@MyMainAccount
export HUAWEICLOUD_Password=SubAccountPassword
export HUAWEICLOUD_ProjectID=ProjectID
/root/.acme.sh/acme.sh --issue --dns dns_huaweicloud -d www.acgdraw.com --test
I use this success
https://gist.github.com/OrangeGeeker/3b841aa237dc3b7065f2baa8167914db
export HUAWEICLOUD_Username=xxx export HUAWEICLOUD_Password=xxx export HUAWEICLOUD_ProjectID=xxx export HUAWEICLOUD_DomainName=xxx
acme.sh --issue --dns dns_huaweicloud -d *.example.com --debug
I use this success
https://gist.github.com/OrangeGeeker/3b841aa237dc3b7065f2baa8167914db
export HUAWEICLOUD_Username=xxx export HUAWEICLOUD_Password=xxx export HUAWEICLOUD_ProjectID=xxx export HUAWEICLOUD_DomainName=xxx
acme.sh --issue --dns dns_huaweicloud -d *.example.com --debug
works for me! thx! fix a bug in line 88: before:
token="$(_get_token "${HUAWEICLOUD_Username}" "${HUAWEICLOUD_Password}" "${HUAWEICLOUD_ProjectID}")"
after:
token="$(_get_token "${HUAWEICLOUD_Username}" "${HUAWEICLOUD_Password}" "${HUAWEICLOUD_ProjectID}" "${HUAWEICLOUD_DomainName}")"
There is a PR for this,but it was removed and marked a lebel named "rev", I don't konw what means the label,and why dose the PR was removed ORZ.
Any update for this?
Any update for this?
https://gist.github.com/OrangeGeeker/3b841aa237dc3b7065f2baa8167914db 用这
Any update for this?
https://gist.github.com/OrangeGeeker/3b841aa237dc3b7065f2baa8167914db 用这
Works fine, replacing original shell. Just wait for the official version.