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

Add existing bearer token support to Azure DNS API #5276

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from

Conversation

stbeldarborge
Copy link

The Azure DNS API only works with provided service principal credentials, or if running on a resource with a managed identity.
If you want to run it in a pre authenticated context (e.g. on a local machine which is already authenticated with az cli or in a GitHub Action which already has authenticated with azure/login), there's no way to do this.

This PR adds support to skip the authentication by providing the Bearer token.
With az cli the bearer token can be extracted and used in Azure DNS API with this command

export AZUREDNS_BEARERTOKEN=$(az account get-access-token --query accessToken --output tsv)

Copy link

github-actions bot commented Sep 2, 2024

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, 都必须确保通过这个测试.

@stbeldarborge
Copy link
Author

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, 都必须确保通过这个测试.

PR to dev, and code tested in forked repo.

@stbeldarborge
Copy link
Author

stbeldarborge commented Sep 3, 2024

While #4981 is similar, these two are not the same, as #4981 does an authentication, while this PR supports authentication outside of the acme.sh context.

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.

2 participants