Coverage for certbot/plugins/manual.py : 100%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
"""Manual authenticator plugin"""
"""TLS-SNI-01 authenticator for the Manual plugin
:ivar configurator: Authenticator object :type configurator: :class:`~certbot.plugins.manual.Authenticator`
:ivar list achalls: Annotated class:`~certbot.achallenges.KeyAuthorizationAnnotatedChallenge` challenges
:param list indices: Meant to hold indices of challenges in a larger array. NginxTlsSni01 is capable of solving many challenges at once which causes an indexing issue within NginxConfigurator who must return all responses in order. Imagine NginxConfigurator maintaining state about where all of the http-01 Challenges, TLS-SNI-01 Challenges belong in the response array. This is an optional utility.
:param str challenge_conf: location of the challenge config file """
"""Create the SSL certificates and private keys"""
"""Manual authenticator
This plugin allows the user to perform the domain validation challenge(s) themselves. This either be done manually by the user or through shell scripts provided to Certbot.
"""
'Authenticate through manual configuration or custom shell scripts. ' 'When using shell scripts, an authenticator script must be provided. ' 'The environment variables available to this script depend on the ' 'type of challenge. $CERTBOT_DOMAIN will always contain the domain ' 'being authenticated. For HTTP-01 and DNS-01, $CERTBOT_VALIDATION ' 'is the validation string, and $CERTBOT_TOKEN is the filename of the ' 'resource requested when performing an HTTP-01 challenge. When ' 'performing a TLS-SNI-01 challenge, $CERTBOT_SNI_DOMAIN will contain ' 'the SNI name for which the ACME server expects to be presented with ' 'the self-signed certificate located at $CERTBOT_CERT_PATH. The ' 'secret key needed to complete the TLS handshake is located at ' '$CERTBOT_KEY_PATH. An additional cleanup script can also be ' 'provided and can use the additional variable $CERTBOT_AUTH_OUTPUT ' 'which contains the stdout output from the auth script.') Please deploy a DNS TXT record under the name {domain} with the following value:
{validation}
Before continuing, verify the record is deployed.""" Create a file containing just this data:
{validation}
And make it available on your web server at this URL:
{uri} """ Configure the service listening on port {port} to present the certificate {cert} using the secret key {key} when it receives a TLS ClientHello with the SNI extension set to {sni_domain} """ (This must be set up in addition to the previous challenges; do not remove, replace, or undo the previous challenge tasks yet.) """ (This must be set up in addition to the previous challenges; do not remove, replace, or undo the previous challenge tasks yet. Note that you might be asked to create multiple distinct TXT records with the same name. This is permitted by DNS standards.) """
# type: Dict[achallenges.KeyAuthorizationAnnotatedChallenge, Dict[str, str]]
def add_parser_arguments(cls, add): help='Path or command to execute for the authentication script') help='Path or command to execute for the cleanup script') help='Automatically allows public IP logging (default: Ask)')
'An authentication script must be provided with --{0} when ' 'using the manual plugin non-interactively.'.format( self.option_name('auth-hook')))
'This plugin allows the user to customize setup for domain ' 'validation challenges either through shell scripts provided by ' 'the user or by performing the setup manually.')
# pylint: disable=missing-docstring,no-self-use,unused-argument
else:
# Make a new ManualTlsSni01 instance for each challenge # because the manual plugin deals with one challenge at a time.
"having requested this certificate. If you're running " 'certbot in manual mode on a machine that is not your ' "server, please ensure you're okay with that.\n\n" 'Are you OK with your IP being logged?') else:
CERTBOT_VALIDATION=achall.validation(achall.account_key)) else: else:
achall=achall, encoded_token=achall.chall.encode('token'), port=self.config.http01_port, uri=achall.chall.uri(achall.domain), validation=validation) domain=achall.validation_domain_name(achall.domain), validation=validation) else: cert=self.tls_sni_01.get_cert_path(achall), key=self.tls_sni_01.get_key_path(achall), port=self.config.tls_sni_01_port, sni_domain=self.tls_sni_01.get_z_domain(achall)) # 2nd or later dns-01 challenge # 2nd or later challenge of another type
|