Skip to content

access_token_ttl#15648

Open
Ashod wants to merge 15 commits intomainfrom
private/ash/ttl
Open

access_token_ttl#15648
Ashod wants to merge 15 commits intomainfrom
private/ash/ttl

Conversation

@Ashod
Copy link
Copy Markdown
Contributor

@Ashod Ashod commented Apr 24, 2026

  • wsd: convert Authorization::Type to STATE_ENUM
  • browser: support non-wopi url and undefined accessTokenTtl
  • wsd: better RequestDetails serialization
  • browser: use legacy WS URL path for non-WOPI documents
  • wsd: resetaccesstoken supports access_token_ttl
  • wsd: Authorization supports refreshing tokens
  • wsd: dump state for Authorization
  • wsd: use Authorization::isValid() instead of isExpired()
  • browser: reset token expiry timer on Reset_Access_Token
  • browser: send App_TokenExpiring PostMessage to host
  • wsd: retry save on uplaod failure after requesting token refresh
  • wsd: add new configuration for access_token management
  • wsd: test: access_token_ttl tests

@Ashod Ashod changed the title private/ash/ttl access_token_ttl Apr 24, 2026
@Ashod Ashod requested a review from caolanm April 24, 2026 12:54
Ashod added 15 commits April 24, 2026 21:37
Change-Id: I63a7cbca24222c3dcf4d034d387777a70bd826d3
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Change-Id: Ieb4cc1a38a1e6322dd319c98df91c4d4a9fc93cf
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Change-Id: I3ffbeb3adbf25d80c8d47821aa1ccbdf4ee7b8e7
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Change-Id: I49d08ef5ab4594132765b3ade2e9f1cf1e13fbf9
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Adds an optional expiry time to the resetaccesstoken
command. Authorization object also adds support
to tracking this expiry time.

Change-Id: I2c3b810bf73d6e03fc1ef22fd8fb6c08ee797efb
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
With tests.

Change-Id: I37debc0123e46e582d6506c57326405cdb22d946
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Change-Id: Ibedbf4126bdb45422a99c94b9bb52e557bd4b6ee
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
isValid covers the new Refresh-Token state.

With tests.

Change-Id: Ic9a8ebd1010195118fc143f74f9a598bd35a5092
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Change-Id: Ie9b20763c9cfb1e115156b8c063f9d6e37fa73a3
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
When the token expiry warning timer fires, send an
App_TokenExpiring PostMessage to the integration.

This prompts the integration to take action and keep
the user's session valid.

Change-Id: Iee7d838c173d40b33954807aa92ca6fc1e5ac7eb
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
When a PutFile gets an unauthorized respose, instead of immediately
invalidating the token and going read-only, notify the client via
a 'tokenexpired' message. The client sends App_TokenExpired
PostMessage to the host, giving it a chance to send a fresh token
via Reset_Access_Token.

Change-Id: I183a442ddf7908065d89d2f334ea9647e34d683e
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This adds default lifetime (when access_token_ttl
is missing), a timeout for refreshing tokens that
are about to expire, and finally a time offset
between the host and us.

Change-Id: Id2f6601c19234b34de3c12cf7129b8098f6db439
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Change-Id: I0b213c975fd5265b5ffe1fa12cb5759a9782ff1f
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
We give up warning of the access_token expiry
roughly 5 minutes after it expires.

Change-Id: I06c1b252f291985a4fa0d0090a55c00a415b53a6
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
We retry resetaccesstoken up to 3 times
before we give up and invalidate the access_token.

Change-Id: I0a5fa9cad90bac9b3a397024b5a5e15f59f4a418
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
@Ashod Ashod force-pushed the private/ash/ttl branch from 2a594b4 to 573f2e7 Compare April 25, 2026 22:54
Copy link
Copy Markdown
Contributor

@caolanm caolanm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you might have to go via gerrit for new prs now (not sure of status of existing ones)

@github-project-automation github-project-automation Bot moved this from To Review to To Test in Collabora Online Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To Test

Development

Successfully merging this pull request may close these issues.

2 participants