Repository navigation
Talk to Infisical through its SDK - #41
Merged
Merged
Conversation
PSI's own httpx client for Infisical goes. InfisicalClient keeps its interface, each call taking a token from PSI's token file cache, and Infisical's SDK (infisicalsdk 1.0.17) makes the requests, retries them and raises their errors. What the SDK has no call for (batch creates, certificates, GCP and Azure logins) goes through its request layer, so every call to Infisical shares one session; that session gets what the SDK leaves unset, a timeout on every request and the CA bundle PSI is given: ca_cert, else the bundle the container units mount as SSL_CERT_FILE (which requests ignores), else requests' own. Errors become InfisicalAPIError, a ProviderError with the HTTP status (None when Infisical could not be reached), and lookup, setup's retries and the importer read the status instead of httpx's exceptions. Universal-auth and AWS logins are the SDK's; the SDK signs AWS logins for the region's STS endpoint, so an AWS identity in Infisical must name it, as the docs now say. GCP and Azure fetch the metadata token with httpx, and a failing metadata service is now a ProviderError rather than an uncaught error. PSI checks for AWS credentials before the SDK's login, which raises botocore's NoCredentialsError with a message it does not take, so a missing role would surface as a TypeError. The tests run the real SDK against a stand-in Infisical where the adapter hands a request to the network, including psi infisical env as qvm's CI runner runs it.
The TLS renewal service and Quadlet ran `psi tls renew`, which psi does not have (the command is `psi infisical tls renew`), so every scheduled renewal failed and certificates were never renewed. The units now run the real command, and a test runs each unit's command line through psi's own CLI with --help, so a unit cannot name a command psi lacks.
PyKCS11 ships only as source, and 1.5.18's wrapper calls PyInt_FromLong, which Python 3.14 does not declare, so building it fails with any SWIG (bookworm's 4.1.0 and trixie's 4.3.0 alike). CI got by on build layers cached in May; once the cache expired, every build, a docs-only one included, failed in the builder's uv sync. 1.5.20 builds with the builder's SWIG on CPython 3.14.2, the test image passes every check and test, and the production image imports PyKCS11.
jdoss
added a commit
that referenced
this pull request
Oct 6, 2026
Infisical goes through its SDK since #41. Part 1 now records what was built where it differs from the plan: GCP and Azure logins, batch creates and certificates go through the SDK's request layer rather than token_auth, one-at-a-time creates or dropping certificates; ca_cert is read rather than removed; imports stay unmerged, as before. It notes the SDK's AWS credentials bug, the renewal units' missing command and the PyKCS11 build, and leaves the runner's pin move as the last step.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 1 of #40's plan, plus the renewal-unit bug it found.
infisical: talk to Infisical through its SDK
InfisicalClientkeeps its interface, where each call takes a token from PSI's token file cache, andinfisicalsdk1.0.17 makes the requests, retries them and raises their errors.InfisicalSDKClient.api): batch create, certificates, and GCP and Azure login. So every Infisical call shares one session.ca_cert, which was documented but never used until now; elseSSL_CERT_FILE, which the container units set but requests ignores; else requests' default.InfisicalAPIError, aProviderErrorwith the HTTP status (Nonewhen Infisical couldn't be reached). Lookup, setup's retries and the importer read that status instead of httpx's exceptions; setup still retries an unreachable instance and 404/502/503.aws-iam.ProviderErrorrather than an uncaught error.NoCredentialsErrorwith a message that class doesn't accept, so the caller gets aTypeError. PSI checks for credentials before the SDK's login, as its old code did.infisicalsdkandrequestsare added. boto3 stays, for that credential check.tests/fake_infisical.py), answering where the adapter hands a request to the network. That includespsi infisical envas qvm's CI runner runs it: exports, quoting, and a refused login.unitgen: run
psi infisical tls renewfrom the renewal unitspsi tls renew, which doesn't exist, so scheduled renewals always failed.--help. It fails on the old string.deps: move PyKCS11 to 1.5.20, which builds on Python 3.14
PyInt_FromLong, which Python 3.14 doesn't declare. Building it fails with bookworm's SWIG 4.1.0 and trixie's SWIG 4.3.0 alike.uv sync, docs-only Plan Infisical through its SDK, then each cloud's secret store #40 included.ruff check,ruff format --checkandty checkare clean; 397 tests pass, locally and inside the test image. Once this is released, qvm's runner can move its PSI image pin to the new image afterpsi infisical envhas fetched its pipeline folder from the real instance.