Skip to content

Commit

Permalink
Merge pull request #6894 from suqld/fix-google-dns-private-zones
Browse files Browse the repository at this point in the history
Detect private DNS zones in Google and skip them
  • Loading branch information
schoen committed Jun 19, 2019
2 parents 8efe3fb + 6172821 commit 03cf5d1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -111,6 +111,10 @@ More details about these changes can be found on our GitHub repo.
`malformed` error to be received from the ACME server.
* Linode DNS plugin now supports api keys created from their new panel
at [cloud.linode.com](https://cloud.linode.com)

### Fixed

* Fixed Google DNS Challenge issues when private zones exist
* Adding a warning noting that future versions of Certbot will automatically configure the
webserver so that all requests redirect to secure HTTPS access. You can control this
behavior and disable this warning with the --redirect and --no-redirect flags.
Expand Down
9 changes: 5 additions & 4 deletions certbot-dns-google/certbot_dns_google/dns_google.py
Expand Up @@ -274,10 +274,11 @@ def _find_managed_zone_id(self, domain):
raise errors.PluginError('Encountered error finding managed zone: {0}'
.format(e))

if zones:
zone_id = zones[0]['id']
logger.debug('Found id of %s for %s using name %s', zone_id, domain, zone_name)
return zone_id
for zone in zones:
zone_id = zone['id']
if 'privateVisibilityConfig' not in zone:
logger.debug('Found id of %s for %s using name %s', zone_id, domain, zone_name)
return zone_id

raise errors.PluginError('Unable to determine managed zone for {0} using zone names: {1}.'
.format(domain, zone_dns_name_guesses))
Expand Down

0 comments on commit 03cf5d1

Please sign in to comment.