MyCustomerSecretKey is missing secret_key (secretKey)
まだ誰も着手していません。
評価
調査の方向性
まず MyCustomerSecretKey の Python モデル定義を見つけて CustomerSecretKey と比較し、次に issue にある create_my_customer_secret_key の例を再現します。SDK のレスポンスが API の secretKey の値と一貫して secret_key を公開し、関連するモデルの動作またはドキュメントが更新されていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Model MyCustomerSecretKey does not include secret_key attribute though it is absolutely returned from the API. I see secret_key is included in CustomerSecretKey model. In both cases the API documentation does not show secret_key is a return value though it absolutely is. Frankly, if it were not in the return the API would be pointless as creating a new key without being able to retrieve the new value is of no use.
Consider this example:
identity_domain_client = oci.identity_domains.IdentityDomainsClient(
config, signer=signer, service_endpoint=domain.url
)
new_key = oci.identity_domains.models.MyCustomerSecretKey(
display_name="SDK",
schemas=["urn:ietf:params:scim:schemas:oracle:idcs:customerSecretKey"],
)
resp = identity_domain_client.create_my_customer_secret_key(
my_customer_secret_key=new_key,
)
resp.data.display_name
'SDK'
resp.data.access_key
'bc8309f45128a4658b18d38fff3997d605d7c380'
resp.data.secret_key
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'MyCustomerSecretKey' object has no attribute 'secret_key'
…however, this works:
endpoint = "/admin/v1/MyCustomerSecretKeys"
body = {
"displayName": "REST",
"schemas": ["urn:ietf:params:scim:schemas:oracle:idcs:customerSecretKey"],
}
resp = requests.post(domain.url + endpoint, auth=signer, json=body)
jsonresp = json.loads(resp.content)
jsonresp["displayName"]
'REST'
jsonresp["accessKey"]
'e74aec6e2317b972691986696403f0b175f60880'
jsonresp["secretKey"]
'tXaYYB0gFUF2/4UthIyYZqCh4Y5tQ3Sp2lxVJKvF+RI='
…so obviously the value for secretKey (or secret_key) should be in the response (as I say, otherwise, what's the point of creating the key?).
- 主要言語
- Python
- スター
- 474
- フォーク
- 321
- 平均マージ
- 25分
- マージ済み PR(30日)
- 4
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
oracle/oci-python-sdk のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
oracle/oci-python-sdk#890 · コメント 3 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
oracle/oci-python-sdk#879 · コメント 3 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 66/100
oracle/oci-python-sdk#878 ·
-
SDK
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
oracle/oci-python-sdk#861 · コメント 5 件 ·
-
SDK
難易度 2/5 1〜3時間 初心者へのやさしさ 48/100
oracle/oci-python-sdk#852 ·
oracle/oci-python-sdk の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
qgis/QGIS-Plugins-Website#459 ·
-
bug severity:medium
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
bot-found bug priority: P3
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
madenvel/KalinkaPlayer#179 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
ls1intum/edutelligence#1098 ·
メンテナーはふだん 1 日以内に返信