Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`StorageVirtualizeAPI` constructor ignores `Configuration` object, making it impossible to disable SSL

オープン 初心者向け
#1 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
api

調査の方向性

openapi_client/api/storage_virtualize_api.py の 53 行目付近にある init コードから始め、README の Troubleshooting セクションおよび再現スクリプトでの Configuration の使用方法と比較します。自己署名証明書を使用する環境でスタンドアロンの例を実行します。完了条件は、証明書検証エラーを発生させるのではなく、wrapper が verify_ssl=False を反映することです。

索引モデルが issue の本文から書いたものです。

説明

The README Troubleshooting section instructs users to disable SSL by setting config.verify_ssl = False.

However, the StorageVirtualizeAPI wrapper ignores this completely. The bug is right here in your constructor __init__ code (storage_virtualize_api.py#L53), where it overwrites the user's configuration with a blank one:

    def __init__(self, ip_address: str, username_or_token: str, password: Optional[str] = None):
        baseurl = f"https://{ip_address}:7443/rest/v1"
        config = Configuration()  # <--- BUG IS HERE: Creates new config, ignoring user's config
        config.host = baseurl

Because of this, it is impossible to pass verify_ssl=False into the StorageVirtualizeAPI.

Steps to reproduce and code

Attempt to run the following standalone script:

import warnings
warnings.filterwarnings("ignore", category=UserWarning, module="openapi_client")

from openapi_client.configuration import Configuration
from openapi_client.api.storage_virtualize_api import StorageVirtualizeAPI

config = Configuration()
config.host = "https://<YOUR_IP>:7443/rest/v1"
config.verify_ssl = False

client = StorageVirtualizeAPI(
    ip_address="<YOUR_IP>",
    username_or_token="<USERNAME>",
    password="<PASSWORD>"
)

result = client.svc_info_api.lshost_post()
print(result)
Errors
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='<YOUR_IP>', port=7443): Max retries exceeded with url: /rest/v1/auth (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1032)')))
主要言語
Python
スター
2
フォーク
2
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。