Skip to content
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

Log updater.secret creation and expiration #45714

Open
joshtrichards opened this issue Jun 7, 2024 · 0 comments
Open

Log updater.secret creation and expiration #45714

joshtrichards opened this issue Jun 7, 2024 · 0 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement feature: install and update

Comments

@joshtrichards
Copy link
Member

We should be logging whenever the updater.secret gets set and whenever it expires out. This may help catch some situations such as:

  • clicking on the "Open updater" button in different tabs/windows/browsers (which will break an existing Updater run in the original tab/window/browser)
  • ? not sure but that's why we should log this sort of thing to make debugging easier :)

The updater.secret is re-generated every time the "Open updater" button is clicked in the Administration settings->Overview screen.

@click="clickUpdaterButton">{{ t('updatenotification', 'Open updater') }}</a>

axios.get(generateUrl('/apps/updatenotification/credentials'))

public function createCredentials(): DataResponse {

The token is also automatically deleted 48 hours later:

// Delete old tokens after 2 days
if ($secretCreated >= 172800) {
$this->config->deleteSystemValue('updater.secret');

We should log:

  • when the updater.secret is generated
  • when an outdated updater.secret is removed

The log level should be WARN so that it's picked up by default in most environments. This should be acceptable because the secret is generated rarely and the expiration background job can only have a secret to clear (and thus log about) as often as a new secret is generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement feature: install and update
Projects
None yet
Development

No branches or pull requests

1 participant