Skip to content

Commit

Permalink
feat(okta): Enable SDK Debug Logs (#10889)
Browse files Browse the repository at this point in the history

#### Summary

Users have no visibility into the requests that CQ is making, which makes debugging nearly impossible. This PR allows users to see all of the requests being made
  • Loading branch information
bbernays committed May 22, 2023
1 parent 1a3a4d3 commit 4004bc9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions plugins/source/okta/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func Configure(_ context.Context, logger zerolog.Logger, srcSpec specs.Source, _
okta.WithRateLimitMaxBackOff(int64(spec.RateLimit.MaxBackoff/time.Second)), // this param takes int64 of seconds
okta.WithRateLimitMaxRetries(spec.RateLimit.MaxRetries),
)
cf.Debug = spec.Debug
c := okta.NewAPIClient(cf)

return New(logger, srcSpec, c), nil
Expand Down
1 change: 1 addition & 0 deletions plugins/source/okta/client/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ type (
Token string `json:"token,omitempty"`
Domain string `json:"domain,omitempty"`
RateLimit *RateLimit `json:"rate_limit,omitempty"`
Debug bool `json:"debug,omitempty"`
}
RateLimit struct {
MaxBackoff time.Duration `json:"max_backoff,omitempty"`
Expand Down
8 changes: 8 additions & 0 deletions website/pages/docs/plugins/sources/okta/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ The following example sets up the Okta plugin, and connects it to a postgresql d
Token for Okta API access.
You can set this with an `OKTA_API_TOKEN` environment variable.

- `debug` (`bool`, optional. Default: `false`)

Enables debug logs within the Okta SDK.
<Callout type="warning">
This feature will result in sensitive information being logged!
</Callout>


- `rate_limit` ([Rate limit](#rate-limit-spec) spec, optional. Default: see [rate limit](#rate-limit-spec) spec defaults)

Rate limit configuration.
Expand Down

0 comments on commit 4004bc9

Please sign in to comment.