netbox-community / go-netbox

The official Go API client for Netbox IPAM and DCIM service.
Other
194 stars 144 forks source link

Netbox Secrets Session Key #114

Closed sc0ttes closed 1 year ago

sc0ttes commented 3 years ago

Does go-netbox support "X-Session-Key" for returning plaintext secrets as so? From what I can gather it appears I would need to implement a custom client to make the initial POST with the user's private key, returning the session key and would then need to create another custom client that calls the Secrets endpoints with both the API Key and the Session Key correct?

Would love any thoughts on any better ways to do this. Was originally thinking of adding the optional private key path during client init, then using the above to get the session key, and subsequently using APIKeyAuth to pass both the API Key and Session Key on all requests.

v0ctor commented 1 year ago

Closing, as secrets were removed from Netbox.