Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storing CF API token data in domain config #5018

Closed
wants to merge 1 commit into from
Closed

Storing CF API token data in domain config #5018

wants to merge 1 commit into from

Conversation

yura3d
Copy link

@yura3d yura3d commented Feb 23, 2024

Fixes #2398

This PR changes the storage location of Cloudflare's API Token, Account ID and Zone ID from account config to domain config.

For now, to save these vars to domain config we need to set Zone ID, otherwise the vars will be stored to account (global) config:

acme.sh/dnsapi/dns_cf.sh

Lines 28 to 37 in aa8cf76

if [ "$CF_Zone_ID" ]; then
_savedomainconf CF_Token "$CF_Token"
_savedomainconf CF_Account_ID "$CF_Account_ID"
_savedomainconf CF_Zone_ID "$CF_Zone_ID"
else
_saveaccountconf_mutable CF_Token "$CF_Token"
_saveaccountconf_mutable CF_Account_ID "$CF_Account_ID"
_clearaccountconf_mutable CF_Zone_ID
_clearaccountconf CF_Zone_ID
fi

This makes it impossible to handle miltiple zones (using Account ID instead of Zone ID) from multiple Cloudflare accounts on the same server: we can't have different values of API Token and Account ID in account config.

Copy link

Welcome
First thing: don't send PR to the master branch, please send to the dev branch instead.
Please make sure you've read our DNS API Dev Guide and DNS-API-Test.
Then reply on this message, otherwise, your code will not be reviewed or merged.
We look forward to reviewing your Pull request shortly ✨
注意: 必须通过了 DNS-API-Test 才会被 review. 无论是修改, 还是新加的 dns api, 都必须确保通过这个测试.

@Neilpang Neilpang closed this Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants