Unable to query local Viya 4 with self-signed certificate

Open
#256 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Quiet
Tech stack
python
Domain
api, cli

Research direction

Reproduce the failure with listcaslibs.py after reviewing loginviauthinfo.py and the REQUESTS_CA_BUNDLE and SSL_CERT_FILE settings. Compare the supplied certificate files with trustedcerts.pem and verify the tool can query CAS libraries against the self-signed local environment without an SSL or CA bundle error.

Written by the indexing model from the issue text.

Description

I am trying to use the pyviyatool with my internal SAS Viya 4 LTS 2025.09 environment, but am unable to query anything.

I have cloned the repo on 30-03-2026 and installed the following version of sas-viya cli.

.\sas-viya.exe --version
sas-viya version 1.37.2

I am able to login viya the following command
(I have create a venv for python 3.11.9)

python .\loginviauthinfo.py
Logging in with profile:  Default
Getting Credentials for: eclviya.woodpecker.com
Logging in as user: demo1
https://eclviya.woodpecker.com
Login succeeded. Token saved.

I have passed the following environment variables:--

echo $env:REQUESTS_CA_BUNDLE
E:\cli\sas-ingress-ca-certificate.pem

echo $env:SSL_CERT_FILE
E:\cli\sas-ingress-certificate.pem

While trying to use any tool for example to list caslibs I am getting the following error

python .\listcaslibs.py
server,caslib
ERROR: SSL or CA Bundle Error occurred.
Error details: HTTPSConnectionPool(host='eclviya.woodpecker.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: invalid CA certificate (_ssl.c:1006)')))
REQUESTS_CA_BUNDLE file path is: E:\cli\sas-ingress-ca-certificate.pem
Tip: Check if the path is correct.

I am currently using the same ingress certificate for sas-viya cli and facing no issues.

As we are using self-signed certificates i have also tried using the ca certificate that is create from the below command but to no avail.

kubectl -n ecl cp $(kubectl get pod -n ecl | grep "sas-logon-app" | head -1 | awk -F" " '{print $1}'):/security/trustedcerts.pem ./trustedcerts.pem

Any help would be appreciated.

Dominant language
Python
Stars
50
Forks
42
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sassoftware/pyviyatools

All issues in sassoftware/pyviyatools

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.