Repository navigation
Raise relay token and policy TTL from 300s to 3600s #10731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,8 +12,10 @@ import { configuredRelayCatalog } from "./catalog"; | |
|
|
||
| export const RELAY_TOKEN_ISS = "cmux"; | ||
| export const RELAY_TOKEN_AUD = "cmux-relay"; | ||
| export const RELAY_TOKEN_TTL_SECONDS = 300; // short-lived; the client refreshes | ||
| export const RELAY_TOKEN_REFRESH_LEAD_SECONDS = 60; | ||
| // One hour keeps the credential device-bound and revocable-by-rotation while | ||
| // cutting an always-on endpoint from ~288 refreshes/day (at 300 s) to 24. | ||
| export const RELAY_TOKEN_TTL_SECONDS = 3_600; // the client refreshes before expiry | ||
| export const RELAY_TOKEN_REFRESH_LEAD_SECONDS = 300; | ||
|
Comment on lines
+17
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When an installed client predating Useful? React with 👍 / 👎. |
||
|
|
||
| export type ManagedRelayCredentialGrant = { | ||
| readonly relayUrl: string; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a client predating
relayCredentialssupport calls this endpoint, it ignores the new array and falls back to the still-emittedtoken/ttlSecondsfields. The current client fallback still requiresttlSeconds == 300, so changing this shared constant to3600makes those responses invalid and prevents older clients from obtaining relay connectivity. Fresh evidence in the current tree is the hard-coded legacy check inCmxIrohTrustBrokerClient.relayTokenResponse; retain the legacy TTL for that compatibility path or version/negotiate the contract before raising it.Useful? React with 👍 / 👎.