Giter Club home page Giter Club logo

desec's Introduction

deSEC for libdns

Go Reference

This package implements the libdns interfaces for deSEC.

Authentication

Authentication performed using a token created on https://desec.io/tokens. A basic token without the permission to manage tokens is sufficient. For security reasons it's strongly recommended to not use tokens that allow token management.

Limitations and Caveats

  • Concurrent updates from multiple processes can result in an inconsistent state
  • The TTL attribute is not settable per record (zone, name, type, value), only per record set (zone, name, type). If different TTL values are specified, it's undefined which one wins.
  • Large zones with more than 500 resource record sets only have limited support
  • Rate limiting always results in retries if no context deadline is specified

Please refer to the Go reference for detailed documentation.

desec's People

Contributors

znkr avatar

Stargazers

 avatar Ferdinand Mütsch avatar Peter Thomassen avatar Ethan Li avatar Fabricio Silva avatar

Watchers

Matt Holt avatar Peter Thomassen avatar  avatar  avatar

desec's Issues

Docs issues

desec/provider.go

Lines 6 to 7 in 7f39ae0

// The deSEC API doesn't map 1:1 to the libdns API. The main issue with that is that it's not
// possible to update records atomically. The implementation here goes to great lengths to avoid

How do you mean, it's not possible to update records atomically? (You can submit a bulk update request, which is executed atomically: https://desec.readthedocs.io/en/latest/dns/rrsets.html#bulk-operations)

Also:

desec/provider.go

Lines 18 to 22 in 7f39ae0

// # TTL attribute
//
// For a the same reason as above, the TTL attribute cannot be set on the per record level. If
// multiple different TTLs are specified for different records of the same name and type, one of
// them wins. It's not defined which on that is.

The deSEC API only accepts one TTL value per RRset, so it's not possible to specify multiple. OTOH, when this library is provided with several values, you could make a deterministic pick (such as "use first", "use lowest") or throw an error.

Disclaimer: I'm a deSEC maintainer.

Support subdomain under authoritative zone for DNS challenge

For context sub.example.dedyn.io DNS name belongs to example.dedyn.io authoritative zone. In caddy, while trying to solve DNS challenge the deSEC libns tries to make a record under sub.example.dedyn.io instead of example.dedyn.io resulting in
RRSets: unexpected status code 404: {\"detail\":\"Not found.\"}

May you update deSEC provider to support subdomain? For this case, I believe deSEC provider should send a record to example.dedyn.io with with a subname value of _acme-challenge.sub

https://desec.readthedocs.io/en/latest/dns/domains.html#identifying-the-responsible-domain-for-a-dns-name

Snippet of caddy error logs:

2023/08/21 23:26:50.273 INFO    tls.issuance.zerossl.acme_client        trying to solve challenge       
{
    "identifier": "*.sub.example.dedyn.io",
    "challenge_type": "dns-01",
    "ca": "https://acme-staging-v02.api.letsencrypt.org/directory"
}
2023/08/21 23:26:51.180 ERROR   tls.issuance.zerossl.acme_client        cleaning up solver      
{
    "identifier": "*.sub.example.dedyn.io",
    "challenge_type": "dns-01",
    "error": "no memory of presenting a DNS record for \"_acme-challenge.sub.example.dedyn.io\" (usually OK if presenting also failed)"
}
2023/08/21 23:26:51.234 ERROR   tls.obtain      could not get certificate from issuer   
{
    "identifier": "*.sub.example.dedyn.io",
    "issuer": "acme-staging-v02.api.letsencrypt.org-directory",
    "error": "[*.sub.example.dedyn.io] solving challenges: presenting for challenge: adding temporary record for zone \"_acme-challenge.sub.example.dedyn.io.\": writing RRSets: unexpected status code 404: {\"detail\":\"Not found.\"} (order=https://acme-staging-v02.api.letsencrypt.org/acme/order/115592954/10422849924) (ca=https://acme-staging-v02.api.letsencrypt.org/directory)"
}
2023/08/21 23:26:51.235 ERROR   tls.obtain      will retry      
{
    "error": "[*.sub.example.dedyn.io] Obtain: [*.sub.example.dedyn.io] solving challenges: presenting for challenge: adding temporary record for zone \"_acme-challenge.sub.example.dedyn.io.\": writing RRSets: unexpected status code 404: {\"detail\":\"Not found.\"} (order=https://acme-staging-v02.api.letsencrypt.org/acme/order/115592954/10422849924) (ca=https://acme-staging-v02.api.letsencrypt.org/directory)",
    "attempt": 1,
    "retrying_in": 60,
    "elapsed": 3.0121087,
    "max_duration": 2592000
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.