continue icon indicating copy to clipboard operation
continue copied to clipboard

@Jira context: error "self signed certificate in certificate chain" - lost of global `requestOptions` used in fetch with YAML config

Open zigarn opened this issue 1 year ago • 11 comments

Before submitting your bug report

Relevant environment info

- OS: Windows 11
- Continue version: 1.1.31
- IDE version: VSCode 1.99.3
- Model: N/A
- config:
  
  context:
  - provider: jira
    params:
      domain: jira.mycompany.com
      apiVersion: "2"
      token: *****
      requestOptions:
        verifySsl: false
        noProxy: true
        caBundlePath:
        - C:/certs/root-ca.crt
        - C:/certs/inter-ca.crt

Description

Using a company hosted JIRA instance with a certificate signed by an internal CA. This CA is available in system store. Whatever the options I tried, always getting empty JIRA list in the UI and this error in the developer tools logs:

[Extension Host] Unable to get jira tickets: FetchError: request to https://jira.mycompany.com/rest/api/2/search?fields=summary&jql=assignee%20=%20currentUser()%20AND%20resolution%20=%20Unresolved%20order%20by%20updated%20DESC&maxResults=10 failed, reason: self signed certificate in certificate chain

I tried to set requestOptions.verifySsl=false or requestOptions.caBundlePath on the context configuration (should be available according to https://github.com/continuedev/continue/blob/2bfe7948c0eb14725ae881bdfad391be9fa67069/core/context/providers/JiraIssuesContextProvider/JiraClient.ts#L13), but no success.

To reproduce

  1. Setup a JIRA instance with self-signed CA in certificate chain
  2. Setup @Jira context provider to use it
  3. Type @jira in the chat:
    • Expected: a list of JIRA
    • Actual: no JIRA ("Reference Jira issues / No result") and error in the logs

Log output

[Extension Host] Unable to get jira tickets: FetchError: request to https://jira.mycompany.com/rest/api/2/search?fields=summary&jql=assignee%20=%20currentUser()%20AND%20resolution%20=%20Unresolved%20order%20by%20updated%20DESC&maxResults=10 failed, reason: self signed certificate in certificate chain

zigarn avatar May 02 '25 12:05 zigarn

From what I can understand, the requestOptions at context level is useless, and this issue is only with YAML config as with JSON config there was a global requestOptions that was injected in the fetch function (https://github.com/continuedev/continue/blob/260866a67f112a2513597f068adbd3904e694c8d/core/core.ts#L420) I confirm that it is OK with JSON config and global requestOptions.

zigarn avatar May 02 '25 13:05 zigarn

Custom Certificates seem to be a general problem, not just related to your jira context case, see https://github.com/continuedev/continue/issues/5115

MMunier avatar May 02 '25 13:05 MMunier

Custom Certificates seem to be a general problem, not just related to your jira context case, see #5115

Yes, but at least in YAML configuration it is possible to set requestOptions.verifySsl=false or requestOptions.caBundlePath at model level and it works (would be better if the system CA would work, but this is a workaround).

From my analysis, there is a global issue of places in code relying on a config-global requestOptions that was there in JSON config (https://docs.continue.dev/json-reference#requestoptions) but not anymore in YAML config (https://docs.continue.dev/reference#properties).

zigarn avatar May 02 '25 14:05 zigarn

Similar problem with our internal context providers ! Lack of support of requestOptions in yaml configuration compared to json one

rhlarora84 avatar May 03 '25 13:05 rhlarora84

Thanks all for the reports, looking into ways we can add this

RomneyDa avatar May 26 '25 20:05 RomneyDa

Confirming interest in this.

ctwardy avatar Jul 16 '25 17:07 ctwardy

I know this is a Todo , any timeframe for implementation?

thomaspmorgan avatar Aug 04 '25 18:08 thomaspmorgan

We could really use requestOptions in the YAML config. Would this be a good beginner task?

ctwardy avatar Aug 25 '25 19:08 ctwardy

Maybe not exactly the solution for your problem, but CA integration seems to work in my organization by using the following configuration in the config.yaml:

  - name: "gpt-oss:20b"
    provider: ollama
    model: gpt-oss:20b
    apiBase: https://ollama-test.at/
    requestOptions:
      verifySsl: false
      caBundlePath: C:\Users\Developer\CA\chain.pem

Also, @Jira context provider seems to be deprecated https://docs.continue.dev/customize/deep-dives/custom-providers#%40open

faetschi avatar Nov 03 '25 09:11 faetschi

This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.

github-actions[bot] avatar Feb 02 '26 02:02 github-actions[bot]

This issue was closed because it wasn't updated for 10 days after being marked stale. If it's still important, please reopen + comment and we'll gladly take another look!

github-actions[bot] avatar Feb 12 '26 02:02 github-actions[bot]