-
Notifications
You must be signed in to change notification settings - Fork 1.6k
test(e2e): sso tests #24957
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
base: main
Are you sure you want to change the base?
test(e2e): sso tests #24957
Conversation
|
gitar fix ci |
I've checked the CI status for this PR and all checks are passing successfully: ✅ Java checkstyle The skipped checks (playwright-ci-postgresql, py-checkstyle, ui-coverage-tests) are expected workflow skips for this PR type. Could you clarify which specific CI check you'd like me to address? If you're seeing a different failure, please let me know which check is failing. |
|
gitar fix this suggestion |
Co-authored-by: chirag-madlani <[email protected]>
Fixed! I've removed the redundant Since The token cleanup is now handled consistently by the single |
|
Code Review 👍 Approved with suggestionsComprehensive SSO testing infrastructure with excellent documentation. Two minor code quality issues identified. Suggestions 💡 2 suggestionsEdge Case: Request listener added but never removed in SSO-002 test📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Auth/SSOAuthentication.spec.ts:4667-4678 In test SSO-002, a request listener is added with Suggested fix: const requestHandler = (request: Request) => {
if (request.url().includes('/api/v1/')) {
const authHeader = request.headers()['authorization'];
if (authHeader && authHeader !== 'Bearer null') {
hasAuthToken = true;
}
}
};
page.on('request', requestHandler);
await page.waitForTimeout(2000);
page.off('request', requestHandler); // Clean up listener
expect(hasAuthToken).toBeFalsy();Code Quality: JWT decoding uses atob which can fail on non-standard padding📄 openmetadata-ui/src/main/resources/ui/playwright/utils/ssoAuthUtils.ts:6972-6975 The Suggested fix: export function getJWTExpiry(token: string): number | null {
try {
const parts = token.split('.');
if (parts.length !== 3) {
return null;
}
// Handle URL-safe Base64 and padding
let payload = parts[1].replace(/-/g, '+').replace(/_/g, '/');
while (payload.length % 4) {
payload += '=';
}
const decoded = JSON.parse(atob(payload));
return decoded.exp ? decoded.exp * 1000 : null;
} catch {
return null;
}
}Resolved ✅ 1 resolvedCode Quality: Inconsistent token clearing - refresh token still uses setRefreshToken('')
What Works WellWell-architected SSO testing infrastructure with local Docker-based providers (Keycloak SAML, LDAP) eliminating external dependencies. Excellent documentation including README, setup guides, and troubleshooting. The 18 comprehensive Playwright tests cover core flows, token refresh, multi-tab scenarios, and edge cases thoroughly. Clear separation of concerns between test helpers and test specs. Rules 🎸 1 action takenGitar Rules
2 rules not applicable. Show all rules by commenting OptionsAuto-apply is off Gitar will not commit updates to this branch. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | This comment will update automatically (Docs) |



Describe your changes:
Fixes
I worked on ... because ...
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>Summary by Gitar
This will update automatically on new commits.