-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow access to the underlying resty client (#76)
* allow access to the underlying resty client * Add generated changelog entries --------- Co-authored-by: Armin <[email protected]> Co-authored-by: svc-changelog <[email protected]>
- Loading branch information
1 parent
c73650e
commit 57d8779
Showing
3 changed files
with
41 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package main | ||
|
||
import ( | ||
"crypto/tls" | ||
"log" | ||
"os" | ||
|
||
"github.com/palantir/tenablesc-client/tenablesc" | ||
) | ||
|
||
func main() { | ||
client := tenablesc.NewClient( | ||
os.Getenv("TENABLE_URL"), // Tenable SC host. ensure the url has /rest in their path. | ||
).SetAPIKey( | ||
os.Getenv("TENABLE_ACCESS_KEY"), // Tenable SC access key. | ||
os.Getenv("TENABLE_SECRET_KEY"), // Tenable SC secret key. | ||
) | ||
|
||
// Configuring the client's minimum TLS version to be TLS v1.2 | ||
client.RestyClient().SetTLSClientConfig(&tls.Config{ | ||
MinVersion: tls.VersionTLS12, | ||
}) | ||
|
||
_, err := client.GetCurrentUser() | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
type: improvement | ||
improvement: | ||
description: allow access to the underlying resty client | ||
links: | ||
- https://github.com/palantir/tenablesc-client/pull/76 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters