Red Hat Á 358È¿Æf 403 Forbidden

Forbidden

You don't have permission to access this resource.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

!� 355È¿Æc! 404 Not Found

Not Found

The requested URL was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

:#ˆl–Ðz¾”Ji?u4 ^¸ËwÒ˜´oÅ ƒu�‹Äa–ß=¿JJj"Tâ�vãoÜ jbÑ¿È�## -*- coding: utf-8 -*- # Copyright: (c) 2022, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Signature verification helpers.""" from ansible.errors import AnsibleError from ansible.galaxy.user_agent import user_agent from ansible.module_utils.urls import open_url import contextlib import os import subprocess import sys import typing as t from dataclasses import dataclass, fields as dc_fields from functools import partial from urllib.error import HTTPError, URLError if t.TYPE_CHECKING: from ansible.utils.display import Display IS_PY310_PLUS = sys.version_info[:2] >= (3, 10) frozen_dataclass = partial(dataclass, frozen=True, **({'slots': True} if IS_PY310_PLUS else {})) def get_signature_from_source(source, display=None): # type: (str, t.Optional[Display]) -> str if display is not None: display.vvvv(f"Using signature at {source}") try: with open_url( source, http_agent=user_agent(), validate_certs=True, follow_redirects='safe' ) as resp: signature = resp.read() except (HTTPError, URLError) as e: raise AnsibleError( f"Failed to get signature for collection verification from '{source}': {e}" ) from e return signature def run_gpg_verify( manifest_file, # type: str signature, # type: str keyring, # type: str display, # type: Display ): # type: (...) -> tuple[str, int] status_fd_read, status_fd_write = os.pipe() # running the gpg command will create the keyring if it does not exist remove_keybox = not os.path.exists(keyring) cmd = [ 'gpg', f'--status-fd={status_fd_write}', '--verify', '--batch', '--no-tty', '--no-default-keyring', f'--keyring={keyring}', '-', manifest_file, ] cmd_str = ' '.join(cmd) display.vvvv(f"Running command '{cmd}'") try: p = subprocess.Popen( cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, pass_fds=(status_fd_write,), encoding='utf8', ) except (FileNotFoundError, subprocess.SubprocessError) as err: raise AnsibleError( f"Failed during GnuPG verification with command '{cmd_str}': {err}" ) from err else: stdout, stderr = p.communicate(input=signature) finally: os.close(status_fd_write) if remove_keybox: with contextlib.suppress(OSError): os.remove(keyring) with os.fdopen(status_fd_read) as f: stdout = f.read() display.vvvv( f"stdout: \n{stdout}\nstderr: \n{stderr}\n(exit code {p.returncode})" ) return stdout, p.returncode def parse_gpg_errors(status_out): # type: (str) -> t.Iterator[GpgBaseError] for line in status_out.splitlines(): if not line: continue try: _dummy, status, remainder = line.split(maxsplit=2) except ValueError: _dummy, status = line.split(maxsplit=1) remainder = None try: cls = GPG_E