Bonjour,
j'ai mis en place une configuration Authelia / Swag (sur un RPI4) grace à ce tuto et celui sur Authelia. Très bien. Une fois que l'on ne se trompe pas dans les instructions ou les adaptations, tout va bien.
Ensuite, j'ai dû faire malencontreusement une mauvaise manip quelque part (mauvaise bidouille ! ), et je me retrouve coincé avec swag et le renouvellement automatique du certificat.
Je m'explique :
la première mise en oeuvre et génération du premier certificat remonte au 14 novembre 2021, avec une validité jusqu'au 12 février 2022.
lorsque je me connecte sur le domaine concerné, je vérifie le certificat et il me dit : expire au 12 février 2022. Ok c'est le premier certificat généré à la création.
Donc je commence à me préoccuper du renouvellement, et dans le log du docker swag il me dit qu'il n'y a pas de tentative de renouvellement car la date d'expiration est le 25 avril 2022 ... !! Cf. log ci-dessous (avec ndd.tld) :
root@298e520433a1:/var/log/letsencrypt# cat letsencrypt.log
2022-01-31 02:08:08,944:DEBUG:certbot._internal.main:certbot version: 1.22.0
2022-01-31 02:08:08,945:DEBUG:certbot._internal.main:Location of certbot entry point: /usr/bin/certbot
2022-01-31 02:08:08,945:DEBUG:certbot._internal.main:Arguments: ['-n', '--post-hook', 'if ps aux | grep [n]ginx: > /dev/null; then s6-svc -h /var/run/s6/services/nginx; fi; cd /config/keys/letsencrypt && openssl pkcs12 -export -out privkey.pfx -inkey privkey.pem -in cert.pem -certfile chain.pem -passout pass: && sleep 1 && cat privkey.pem fullchain.pem > priv-fullchain-bundle.pem && chown -R abc:abc /config/etc/letsencrypt']
2022-01-31 02:08:08,946:DEBUG:certbot._internal.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#certbot-dns-aliyun:dns-aliyun,PluginEntryPoint#certbot-dns-cpanel:cpanel,PluginEntryPoint#certbot-dns-desec:dns-desec,PluginEntryPoint#certbot-dns-directadmin:directadmin,PluginEntryPoint#certbot-dns-dnspod:dns-dnspod,PluginEntryPoint#certbot-dns-domeneshop:dns-domeneshop,PluginEntryPoint#certbot-dns-he:dns-he,PluginEntryPoint#certbot-dns-hetzner:dns-hetzner,PluginEntryPoint#certbot-dns-infomaniak:dns-infomaniak,PluginEntryPoint#certbot-dns-inwx:dns-inwx,PluginEntryPoint#certbot-dns-ionos:dns-ionos,PluginEntryPoint#certbot-dns-netcup:dns-netcup,PluginEntryPoint#certbot-dns-njalla:dns-njalla,PluginEntryPoint#certbot-dns-transip:dns-transip,PluginEntryPoint#certbot-dns-vultr:dns-vultr,PluginEntryPoint#certbot-plugin-gandi:dns,PluginEntryPoint#certbot-plugin-gandi:dns-gandi,PluginEntryPoint#certbot-route53:auth,PluginEntryPoint#cpanel,PluginEntryPoint#directadmin,PluginEntryPoint#dns,PluginEntryPoint#dns-aliyun,PluginEntryPoint#dns-cloudflare,PluginEntryPoint#dns-cloudxns,PluginEntryPoint#dns-desec,PluginEntryPoint#dns-digitalocean,PluginEntryPoint#dns-dnsimple,PluginEntryPoint#dns-dnsmadeeasy,PluginEntryPoint#dns-dnspod,PluginEntryPoint#dns-domeneshop,PluginEntryPoint#dns-gandi,PluginEntryPoint#dns-google,PluginEntryPoint#dns-he,PluginEntryPoint#dns-hetzner,PluginEntryPoint#dns-infomaniak,PluginEntryPoint#dns-inwx,PluginEntryPoint#dns-ionos,PluginEntryPoint#dns-linode,PluginEntryPoint#dns-luadns,PluginEntryPoint#dns-netcup,PluginEntryPoint#dns-njalla,PluginEntryPoint#dns-nsone,PluginEntryPoint#dns-ovh,PluginEntryPoint#dns-rfc2136,PluginEntryPoint#dns-route53,PluginEntryPoint#dns-transip,PluginEntryPoint#dns-vultr,PluginEntryPoint#manual,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2022-01-31 02:08:09,082:DEBUG:certbot._internal.log:Root logging level set at 30
2022-01-31 02:08:09,087:DEBUG:certbot._internal.display.obj:Notifying user: Processing /etc/letsencrypt/renewal/ndd.tld-0001.conf
2022-01-31 02:08:10,178:DEBUG:certbot._internal.plugins.selection:Requested authenticator <certbot._internal.cli.cli_utils._Default object at 0x7fa4bc0d90> and installer <certbot._internal.cli.cli_utils._Default object at 0x7fa4bc0d90>
2022-01-31 02:08:10,179:DEBUG:certbot._internal.cli:Var post_hook=if ps aux | grep [n]ginx: > /dev/null; then s6-svc -h /var/run/s6/services/nginx; fi; cd /config/keys/letsencrypt && openssl pkcs12 -export -out privkey.pfx -inkey privkey.pem -in cert.pem -certfile chain.pem -passout pass: && sleep 1 && cat privkey.pem fullchain.pem > priv-fullchain-bundle.pem && chown -R abc:abc /config/etc/letsencrypt (set by user).
2022-01-31 02:08:11,154:DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): r3.o.lencr.org:80
2022-01-31 02:08:11,314:DEBUG:urllib3.connectionpool:http://r3.o.lencr.org:80 "POST / HTTP/1.1" 200 503
2022-01-31 02:08:11,318:DEBUG:certbot.ocsp:OCSP response for certificate /etc/letsencrypt/archive/ndd.tld-0001/cert3.pem is signed by the certificate's issuer.
2022-01-31 02:08:11,319:DEBUG:certbot.ocsp:OCSP certificate status for /etc/letsencrypt/archive/ndd.tld-0001/cert3.pem is: OCSPCertStatus.GOOD
2022-01-31 02:08:11,333:DEBUG:certbot._internal.display.obj:Notifying user: Certificate not yet due for renewal
2022-01-31 02:08:11,336:DEBUG:certbot._internal.plugins.selection:Requested authenticator dns-ovh and installer None
2022-01-31 02:08:11,336:DEBUG:certbot._internal.display.obj:Notifying user: Processing /etc/letsencrypt/renewal/ndd.tld.conf
2022-01-31 02:08:12,297:DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): r3.o.lencr.org:80
2022-01-31 02:08:12,307:DEBUG:urllib3.connectionpool:http://r3.o.lencr.org:80 "POST / HTTP/1.1" 200 503
2022-01-31 02:08:12,310:DEBUG:certbot.ocsp:OCSP response for certificate /etc/letsencrypt/archive/ndd.tld-0001/cert3.pem is signed by the certificate's issuer.
2022-01-31 02:08:12,312:DEBUG:certbot.ocsp:OCSP certificate status for /etc/letsencrypt/archive/ndd.tld-0001/cert3.pem is: OCSPCertStatus.GOOD
2022-01-31 02:08:12,315:DEBUG:certbot._internal.display.obj:Notifying user: Certificate not yet due for renewal
2022-01-31 02:08:12,317:DEBUG:certbot._internal.plugins.selection:Requested authenticator dns-ovh and installer None
2022-01-31 02:08:12,317:DEBUG:certbot._internal.display.obj:Notifying user:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2022-01-31 02:08:12,318:DEBUG:certbot._internal.display.obj:Notifying user: The following certificates are not due for renewal yet:
2022-01-31 02:08:12,318:DEBUG:certbot._internal.display.obj:Notifying user: /etc/letsencrypt/live/ndd.tld-0001/fullchain.pem expires on 2022-04-25 (skipped)
/etc/letsencrypt/live/ndd.tld-0001/fullchain.pem expires on 2022-04-25 (skipped)
2022-01-31 02:08:12,318:DEBUG:certbot._internal.display.obj:Notifying user: No renewals were attempted.
2022-01-31 02:08:12,319:DEBUG:certbot._internal.display.obj:Notifying user: No hooks were run.
2022-01-31 02:08:12,319:DEBUG:certbot._internal.display.obj:Notifying user: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2022-01-31 02:08:12,319:DEBUG:certbot._internal.renewal:no renewal failures
root@298e520433a1:/var/log/letsencrypt#
Donc quelque part le certificat a déjà été renouvellé, mais il n'est pas pris en compte.
Quel serait le moyen de s'en sortir ?
Merci d'avance, Bruno78