-
Notifications
You must be signed in to change notification settings - Fork 644
Make the REST API flow and WebSocket flow consistent for IS 7 client credentials opaque tokens #13068
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
Make the REST API flow and WebSocket flow consistent for IS 7 client credentials opaque tokens #13068
Conversation
…credentials opaque tokens
📝 WalkthroughWalkthroughThis pull request updates two gateway components that process WebSocket API requests. In the first update, the user identifier in the WebSocket utility is modified by introducing a new variable that appends the tenant domain if it is missing. In the second update, the OAuth authenticator now checks if the end user name is null and explicitly sets it to an anonymous value. Both changes are intended to ensure that a consistent and non-null user identity is used during authentication and request blocking checks. Changes
Sequence Diagram(s)sequenceDiagram
participant Handler as WebsocketUtil:validateDenyPolicies
participant InfoDTO as infoDTO
participant BlockCheck as isRequestBlocked
Handler->>InfoDTO: Retrieve endUserName
alt Tenant domain not appended to user
Handler->>Handler: Append tenant domain (authorizedUser@apiTenantDomain)
else Tenant domain already appended
Note over Handler: No modification needed
end
Handler->>BlockCheck: Call isRequestBlocked with authorizedUser
sequenceDiagram
participant Auth as OAuthAuthenticator:authenticate
participant APIKey as APIKeyValidationInfoDTO
Auth->>APIKey: Validate API key and populate info DTO
alt endUserName is null
Auth->>Auth: Set endUserName to anonymous constant
else endUserName is present
Note over Auth: Use the provided endUserName
end
Auth->>...: Continue authentication flow
Assessment against linked issues
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (2)
⏰ Context from checks skipped due to timeout of 90000ms (6)
🔇 Additional comments (4)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
This PR makes the REST API flow and WebSocket flow consistent for IS 7 client credentials opaque tokens.
Fixes wso2/api-manager#3829