Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

MyCustomerSecretKey is missing secret_key (secretKey)

Đang mở
#768 9 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
42/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
api, backend

Hướng nghiên cứu

Bắt đầu bằng cách xác định định nghĩa model Python cho MyCustomerSecretKey và so sánh với CustomerSecretKey, sau đó tái hiện ví dụ create_my_customer_secret_key từ issue. Hoàn thành khi phản hồi của SDK cung cấp secret_key nhất quán với giá trị secretKey của API và hành vi hoặc tài liệu của model liên quan được cập nhật.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Identity Domains

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?).

Ngôn ngữ chính
Python
Star
474
Fork
321
Merge trung bình
23 phút
Pull request đã merge (30 ngày)
4

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của oracle/oci-python-sdk

Tất cả issue của oracle/oci-python-sdk

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.