Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Fang-
Copy link
Collaborator

@Fang- Fang- commented Feb 16, 2024

We always update the eauth endpoint based on new logins from the local identity. We also let the user configure a hardcoded endpoint url. In both cases, we update a recency timestamp for the endpoint, to help us keep our scry namespace responses immutable.

However, we even updated this timestamp if the visible endpoint didn't change. That is, if the new value was identical, or if the auto-detected endpoint changed, but it was actively being overridden by a user-configured url.

Here, we update the stored timestamp only if the visible url actually changed. This should help us respond to (remote) scry requests more consistently.

(See also the note in +send-keen:)

:: we round down the time to make it more likely to hit cache,
:: at the expense of not working if the endpoint changed within
:: the last hour.
::
=/ =wire /eauth/keen/(scot %p ship)/(scot %uv nonce)
=. time (sub time (mod time ~h1))
=/ =spar:ames [ship /e/x/(scot %da time)//eauth/url]

We always update the eauth endpoint based on new logins from the local
identity. We also let the user configure a hardcoded endpoint url. In
both cases, we update a recency timestamp for the endpoint, to help us
keep our scry namespace responses immutable.

However, we even updated this timestamp if the visible endpoint didn't
change. That is, if the new value was identical, or if the auto-detected
endpoint changed, but it was actively being overridden by a
user-configured url.

Here, we update the stored timestamp only if the visible url actually
changed. This should help us respond to (remote) scry requests more
consistently.

(See also the note in +send-keen.)
@Fang- Fang- added the eyre label Feb 16, 2024
@Fang- Fang- requested a review from pkova February 16, 2024 20:06
@pkova pkova merged commit 2accc05 into develop Feb 19, 2024
@pkova pkova deleted the m/eyre-stabler-eauth branch February 19, 2024 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants