Skip to content

Commit

Permalink
Merge pull request #7 from digicert/develop
Browse files Browse the repository at this point in the history
Update to be compatible with Certbot 3
  • Loading branch information
mintopia authored Nov 19, 2024
2 parents 6b4c5f5 + 696f58c commit 109661e
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 194 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/snapcraft-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ jobs:
- uses: snapcore/action-build@v1
id: build
- uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
with:
store_login: ${{ secrets.STORE_LOGIN }}
snap: ${{ steps.build.outputs.snap }}
release: edge
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,4 @@ dmypy.json

# Pyre type checker
.pyre/
/.idea
8 changes: 1 addition & 7 deletions certbot_dns_constellix/dns_constellix.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
"""DNS Authenticator for Constellix."""
import json
import logging
import time
import hmac
import hashlib
from base64 import b64encode

import requests
import zope.interface

from certbot import errors
from certbot import interfaces
from certbot.plugins import dns_common

logger = logging.getLogger(__name__)


@zope.interface.implementer(interfaces.IAuthenticator)
@zope.interface.provider(interfaces.IPluginFactory)
class Authenticator(dns_common.DNSAuthenticator):
"""DNS Authenticator for Constellix
Expand Down Expand Up @@ -227,7 +221,7 @@ def _find_managed_zone_id(self, domain, record_name):
return result[0]['id'], result[0]['name']
except errors.PluginError as e:
pass
return None
return None, None

def get_existing_txt(self, zone_id, record_name, record_content):
"""
Expand Down
168 changes: 0 additions & 168 deletions certbot_dns_constellix/dns_constellix_test.py

This file was deleted.

24 changes: 11 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from setuptools import setup
from setuptools import find_packages

version = "0.2.1"
version = "0.3.0"

install_requires = [
"acme>=0.29.0",
"certbot>=0.31.0",
"certbot>=2.12.0,<4.0",
"setuptools",
"requests",
"mock",
Expand All @@ -25,25 +25,23 @@
description="Constellix DNS Authenticator plugin for Certbot",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/Constellix/certbot-constellix",
url="https://github.com/digicert/dnstrust-constellix-certbot",
author="Jessica Smith",
author_email="jsmith@tiggee.com",
author_email="jessica.smith@digicert.com",
license="Apache License 2.0",
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
python_requires=">=3.9",
classifiers=[
"Development Status :: 3 - Alpha",
"Development Status :: 5 - Production/Stable",
"Environment :: Plugins",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: Apache Software License",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Security",
"Topic :: System :: Installation/Setup",
Expand Down
14 changes: 9 additions & 5 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,22 @@ summary: Certbot DNS Plugin for Constellix
description: |
certbot-dns-constellix is a plugin for Certbot to perform dns-01
challenges against the Constellix DNS API
base: core20
base: core24
confinement: strict
grade: stable
adopt-info: certbot-dns-constellix
platforms:
amd64:
arm64:
armhf:

parts:
certbot-dns-constellix:
plugin: python
source: .
override-pull: |
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
craftctl default
craftctl set version=$(grep '^version' "$SNAPCRAFT_PART_SRC/setup.py" | cut -f2 -d= | tr -d '"[:space:]"')
build-environment:
- SNAP_BUILD: "True"
# To build cryptography and cffi if needed
Expand All @@ -25,15 +29,15 @@ parts:
source: .
stage: [setup.py, certbot-shared]
override-pull: |
snapcraftctl pull
craftctl default
mkdir -p $SNAPCRAFT_PART_SRC/certbot-shared
slots:
certbot:
interface: content
content: certbot-1
read:
- $SNAP/lib/python3.8/site-packages
- $SNAP/lib/python3.12/site-packages

plugs:
certbot-metadata:
Expand Down

0 comments on commit 109661e

Please sign in to comment.