caddy-dns / azure Goto Github PK
View Code? Open in Web Editor NEWCaddy module: dns.providers.azure
License: MIT License
Caddy module: dns.providers.azure
License: MIT License
When sending through my credentials as expected I got the following error:
tls {
dns azure {
tenant_id f837e147-205f-4bdf-9cfe-d07587a9ae3c
client_id fe95b136-687a-4a86-ac38-dccae7ae32fa
client_secret hunter2
subscription_id 0f63fc1a-b8fc-4f0f-b401-e84305428a29
resource_group_name dns
}
}
[mynewdomain.example.org] solving challenges: presenting for challenge:
adding temporary record for zone example.org.: azure.BearerAuthorizer#WithAuthorization:
Failed to refresh the Token for request to https://management.azure.com/subscriptions/0f63fc1a-b8fc-4f0f-b401-e84305428a29/resourceGroups/dns/providers/Microsoft.Network/dnsZones/example.org/TXT/_acme-challenge.mynewdomain?api-version=2018-05-01: StatusCode=400
--
Original Error:
adal: Refresh request failed. Status Code = '400'.
Response body:
{
"error": "invalid_request",
"error_description": "
AADSTS900023: Specified tenant identifier 'f837e147-205f-4bdf-9cfe-d07587a9ae3c' is neither a valid DNS name, nor a valid external domain.
Trace ID: 75814be0-6217-44f9-896d-44a2063ffcd9
Correlation ID: ee2dfe4b-f230-42e0-b571-f44387acfccb
Timestamp: 2022-04-16 10:51:29Z
"
}
Endpoint https://login.microsoftonline.com/e63649b2-07c0-49ed-a24b-87381dac292/oauth2/token?api-version=1.0 (order=https://acme-v02.api.letsencrypt.org/acme/order/499698030/80626411640) (ca=https://acme-v02.api.letsencrypt.org/directory)
Even though f837e147-205f-4bdf-9cfe-d07587a9ae3c
was the correct ID for the tenant my Application & Service Principal were in. I found that I had to replace this with mycorporatedomain.com
or mycorporatedomaincom.onmicrosoft.com
(that is the DNS name of my tenant, unrelated to the DNS entry I am trying to get a certificate for) to get things to work.
tls {
dns azure {
tenant_id mycorporatedomain.com
...snip
Found in:
It would be great to be able to use DNS alias mode.
Here's an explanation of how it works: https://github.com/acmesh-official/acme.sh/wiki/DNS-alias-mode
This effectively just a CNAME from the original zone to a custom zone and providing a custom alias to write the TXT record to.
Would it be possible to add support for Managed Identity authentication to Azure DNS?
Instead of providing client_id
and client_secret
for a service principal, the configuration would include a managed_identity
property that could be either System
or the Client ID of a user-assigned managed identity. Caddy could then use the instance metadata service to get a bearer token, and then use that token to configure Azure DNS.
Ideally this would support both the cloud instance metadata service and the Arc agent identity service
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.