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

Feature: configuration based rest ssl suppression #1074

Merged
merged 3 commits into from
Jan 17, 2025

Conversation

jmartin-tech
Copy link
Collaborator

@jmartin-tech jmartin-tech commented Jan 13, 2025

Adds configuration based support to suppress ssl verification to the rest.RestGenerator.

This extracts the capability from @au70ma70n's PR #878

Verification

example rest_config.json, add any required configuration for your rest endpoint found here:

{
    "rest": {
        "RestGenerator": {
           "uri": "http://my_internal_llm_endpoint",
           "verify_ssl": false
        }
    }
}
  • garak -m rest -G rest_config.json -p lmrc
  • Verify test with a self signed certificate not in the local certificate store
  • Verify test with an http only endpoint

Copy link
Collaborator

@leondz leondz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment re: CLI warning spam, otherwise lgtm

docs/source/garak.generators.rest.rst Outdated Show resolved Hide resolved
garak/generators/rest.py Show resolved Hide resolved
tests/generators/test_rest.py Show resolved Hide resolved
@jmartin-tech jmartin-tech force-pushed the feature/rest-ssl-suppression branch from b514ff7 to ac2621b Compare January 16, 2025 23:40
* expand the docs to note acceptance of file path to CA bundle
* suppress warnings when validation is fully disabled
@jmartin-tech jmartin-tech merged commit 5c0731b into NVIDIA:main Jan 17, 2025
9 checks passed
@jmartin-tech jmartin-tech deleted the feature/rest-ssl-suppression branch January 17, 2025 17:29
@github-actions github-actions bot locked and limited conversation to collaborators Jan 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants