Normalize Bearer tokens for session-bound logout - #33
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
根因
DELETE /v2-beta/token/current從 Authorization header 取得的目前 token 保留為Bearer <key>,但資料庫 ownership 查詢需要 bare key。Cookie 路徑正常、Bearer 路徑因此成為冪等 no-op,讓整合發行測試在 matching session delete 後仍取得 HTTP 200。修正
驗證
TokenResourceManagerTest: 5/5 PASS(含真實 Bearer transport、Cookie bare key、非法 scheme/格式)mvn -pl code/iaas/auth-logic -am test: 38/38 reactor modules PASS;auth-logic 81/81 PASSscripts/check-pasturestack-source: PASS,version=0.183.307,auth_token_transport=bare-or-bearer-normalizedgit diff --check: PASSServer 整合 runtime gate 會在 immutable Engine artifact 發行後重新驗證 matching/missing/mismatched/repeated DELETE。