You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[extension/oauth2clientauth] Add Token expiry buffer for oauth2clientauthextension (#37334)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Adds an expiry_buffer config to the oauth2client extension, allowing
token refresh before expiration. The default buffer is set to 5 m,
preventing authentication failures due to token expiration.
<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes#35148
<!--Describe what testing was performed and which tests were added.-->
#### Testing
passes tests.
<!--Describe the documentation added.-->
#### Documentation
The README has been updated to include the expiry_buffer config option,
with instructions on how to use it and its default value.
<!--Please delete paragraphs that you did not use before submitting.-->
Copy file name to clipboardExpand all lines: extension/oauth2clientauthextension/README.md
+3
Original file line number
Diff line number
Diff line change
@@ -38,6 +38,8 @@ extensions:
38
38
key_file: keyfile
39
39
# timeout for the token client
40
40
timeout: 2s
41
+
# buffer time before token expiry to refresh
42
+
expiry_buffer: 10s
41
43
42
44
receivers:
43
45
hostmetrics:
@@ -84,5 +86,6 @@ Following are the configuration fields
84
86
- [**scopes**](https://datatracker.ietf.org/doc/html/rfc6749#section-3.3) - **Optional** optional requested permissions associated for the client.
85
87
- [**timeout**](https://golang.org/src/net/http/client.go#L90) - **Optional** specifies the timeout on the underlying client to authorization server for fetching the tokens (initial and while refreshing).
86
88
This is optional and not setting this configuration implies there is no timeout on the client.
89
+
- **expiry_buffer** - **Optional** Specifies the time buffer to refresh the access token before it expires, preventing authentication failures due to token expiration. The default value is 5m.
87
90
88
91
For more information on client side TLS settings, see [configtls README](https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/configtls).
0 commit comments