diff --git a/doc/changelog.rst b/doc/changelog.rst index 17a98a5..6e88463 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -1,6 +1,13 @@ Changelog ========= +[0.2.3] - Unreleased +-------------------- + +Added +^^^^^ +- Add the ``--no-verify`` parameter to skip certificate verifications. :issue:`20` + [0.2.2] - 2024-12-06 -------------------- diff --git a/scim2_cli/__init__.py b/scim2_cli/__init__.py index afe13c6..a921120 100644 --- a/scim2_cli/__init__.py +++ b/scim2_cli/__init__.py @@ -76,6 +76,12 @@ def load_config_files( help="Headers to pass in the HTTP requests. Can be passed multiple times.", envvar="SCIM_CLI_HEADERS", ) +@click.option( + "--no-verify", + is_flag=True, + default=False, + help="Don't perform https certificate verifications.", +) @click.option( "-s", "--schemas", @@ -99,7 +105,13 @@ def load_config_files( ) @click.pass_context def cli( - ctx, url: str, header: list[str], schemas, resource_types, service_provider_config + ctx, + url: str, + header: list[str], + no_verify, + schemas, + resource_types, + service_provider_config, ): """SCIM application development CLI.""" ctx.ensure_object(dict) @@ -108,7 +120,7 @@ def cli( raise click.ClickException("No SCIM server URL defined.") headers_dict = split_headers(header) - client = Client(base_url=url, headers=headers_dict) + client = Client(base_url=url, headers=headers_dict, verify=not no_verify) resource_models, resource_types_obj, spc_obj = load_config_files( schemas, resource_types, service_provider_config