Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Self-Signed Certs with http Executor #452

Open
mnmercer opened this issue Jun 19, 2023 · 3 comments
Open

Support Self-Signed Certs with http Executor #452

mnmercer opened this issue Jun 19, 2023 · 3 comments
Labels
feature request New feature or request

Comments

@mnmercer
Copy link

mnmercer commented Jun 19, 2023

Currently there isn't a way to use the http executor if you need to make a request to a site with a self-signed cert. I can accomplish something similar by using curl and the -k flag like so:

- name: insecure http request
  command: sh
  script: |
    curl -k -s https://example.com/api/colors
  output: RESULT

But it would be great to use the http executor instead of this.

@mnmercer
Copy link
Author

As a follow up to this, I cannot actually use the output of this type of curl request as an input to the jq executor. The actual request I am making returns formatted JSON, but if I have a step afterwards like this

  - name: unmarshal
    depends:
      - insecure http request
    executor:
      type: jq
        config:
          raw: true
    command: '.test'
    script: "$RESULT"
    output: TEST

I get an error from the jq executor that says Failed to start DAG: json: cannot unmarshal array into Go value of type map[string]interface {}.

@bbqi
Copy link

bbqi commented Jun 23, 2023

try:

curl -k -s "Content-Type: application/json" https://example.com/api/colors

@mnmercer
Copy link
Author

@bbqi Apologies, I meant to say that I had included the -s flag in the curl call in the first step. Even with that though, the jq executor still throws the same error.

@yohamta yohamta added the feature request New feature or request label Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants