MyCustomerSecretKey is missing secret_key (secretKey)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 42/100
Direzione di ricerca
Inizia individuando la definizione del modello Python per MyCustomerSecretKey e confrontala con CustomerSecretKey, quindi riproduci l'esempio create_my_customer_secret_key dell'issue. Il lavoro è completato quando la risposta dell'SDK espone secret_key in modo coerente con il valore secretKey dell'API e il comportamento o la documentazione del modello pertinente è aggiornato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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?).
- Lingua principale
- Python
- Stelle
- 474
- Fork
- 321
- Merge medio
- 23m
- PR unite (30g)
- 4
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di oracle/oci-python-sdk
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
oracle/oci-python-sdk#890 · 3 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
oracle/oci-python-sdk#879 · 3 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 66/100
oracle/oci-python-sdk#878 ·
-
SDK
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
oracle/oci-python-sdk#861 · 5 commenti ·
-
SDK
Difficoltà 2/5 1-3 ore Idoneità per principianti 48/100
oracle/oci-python-sdk#852 ·
Tutte le issue di oracle/oci-python-sdk
Issue simili
-
area: harness bug status: needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Human-Agent-Society/reef#625 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
learningequality/kolibri#15351 · 2 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Name consistency Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
eellak/triplestore#65 · 1 commento ·