Skip to content

Read AYON_CA_FILE and use the same CA in generativeCorePost - #62

Open
MustafaJafar wants to merge 1 commit into
developfrom
feature/ayon-ca-file-env
Open

MustafaJafar wants to merge 1 commit into
developfrom
feature/ayon-ca-file-env

Conversation

@MustafaJafar

@MustafaJafar MustafaJafar commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Description

The CA lookup only knew AYON_SSL_CERT_PATH, while ayon-python-api and the AYON launcher read AYON_CA_FILE. With a self-signed server (for example a local ayon-docker behind Caddy), the resolver fell back to SSL_CERT_FILE, which the launcher sets to certifi, and failed with Failed to connect to the Ayon server.

Also, generativeCorePost builds its own httplib::Client per call, and a new client does not inherit the CA of the main client.

Changelog

  • The constructor checks AYON_CA_FILE first, then AYON_SSL_CERT_PATH, then the existing setSSL() lookup. AYON_SSL_CERT_PATH keeps working.
  • A variable that points at something that is not an existing file is logged and skipped, instead of being handed to httplib.
  • generativeCorePost applies m_caCertPath (already recorded by every lookup branch) to its client and enables server certificate verification when the server URL is https.

Testing:

manual Testing notes:

I believe it resolves down to:

  • AYON_CA_FILE set to a valid file: used
  • AYON_CA_FILE set to a missing path, AYON_SSL_CERT_PATH valid: warning, falls back to AYON_SSL_CERT_PATH
  • Neither set: unchanged behaviour (setSSL())

- The constructor now checks AYON_CA_FILE first (the variable
  ayon-python-api and the AYON launcher read), then AYON_SSL_CERT_PATH,
  then the existing setSSL() lookup. A variable that points at something
  that is not a file is reported and skipped instead of being handed to
  httplib.
- generativeCorePost creates its own httplib::Client per call, which did
  not inherit the CA of the main client. It now applies m_caCertPath, so a
  self-signed AYON server is trusted on that path too.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@MustafaJafar MustafaJafar added the type: enhancement Improvement of existing functionality or minor addition label Nov 10, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement Improvement of existing functionality or minor addition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant