Skip to content

feat: third party authentication provider change #8679

feat: third party authentication provider change

feat: third party authentication provider change #8679

GitHub Actions / Test report for security:test succeeded Mar 5, 2025 in 0s

55 passed, 0 failed and 0 skipped

Tests passed successfully

Report Passed Failed Skipped Time
backend/security/build/test-results/test/TEST-io.tolgee.security.authentication.AuthenticationDisabledFilterTest.xml 3✅ 155ms
backend/security/build/test-results/test/TEST-io.tolgee.security.authentication.AuthenticationFilterTest.xml 10✅ 151ms
backend/security/build/test-results/test/TEST-io.tolgee.security.authentication.AuthenticationInterceptorTest.xml 4✅ 133ms
backend/security/build/test-results/test/TEST-io.tolgee.security.authentication.EmailValidInterceptorTest.xml 2✅ 25ms
backend/security/build/test-results/test/TEST-io.tolgee.security.authentication.SsoAuthenticationInterceptorTest.xml 6✅ 76ms
backend/security/build/test-results/test/TEST-io.tolgee.security.authorization.OrganizationAuthorizationInterceptorTest.xml 5✅ 120ms
backend/security/build/test-results/test/TEST-io.tolgee.security.authorization.ProjectAuthorizationInterceptorTest.xml 11✅ 244ms
backend/security/build/test-results/test/TEST-io.tolgee.security.ratelimit.GlobalIpRateLimitFilterTest.xml 3✅ 9ms
backend/security/build/test-results/test/TEST-io.tolgee.security.ratelimit.GlobalUserRateLimitFilterTest.xml 3✅ 5ms
backend/security/build/test-results/test/TEST-io.tolgee.security.ratelimit.RateLimitInterceptorTest.xml 8✅ 131ms

✅ backend/security/build/test-results/test/TEST-io.tolgee.security.authentication.AuthenticationDisabledFilterTest.xml

3 tests were completed in 155ms with 3 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
io.tolgee.security.authentication.AuthenticationDisabledFilterTest 3✅ 155ms

✅ io.tolgee.security.authentication.AuthenticationDisabledFilterTest

✅ it does not filter when request is OPTIONS()
✅ it does not require authentication to go through()
✅ it does not authenticate when authentication is enabled()

✅ backend/security/build/test-results/test/TEST-io.tolgee.security.authentication.AuthenticationFilterTest.xml

10 tests were completed in 151ms with 10 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
io.tolgee.security.authentication.AuthenticationFilterTest 10✅ 151ms

✅ io.tolgee.security.authentication.AuthenticationFilterTest

✅ it does not allow request to go through with invalid JWT tokens()
✅ it does not filter when request is OPTIONS()
✅ it applies a rate limit on authentication attempts()
✅ it allows request to go through when using invalid PAK()
✅ it allows request to go through when using invalid PAT()
✅ it allows request to go through with valid JWT token()
✅ it allows request to go through when using expired PAK()
✅ it allows request to go through when using expired PAT()
✅ it allows request to go through when using valid PAK()
✅ it allows request to go through when using valid PAT()

✅ backend/security/build/test-results/test/TEST-io.tolgee.security.authentication.AuthenticationInterceptorTest.xml

4 tests were completed in 133ms with 4 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
io.tolgee.security.authentication.AuthenticationInterceptorTest 4✅ 133ms

✅ io.tolgee.security.authentication.AuthenticationInterceptorTest

✅ it ignores super JWT requirement when authentication is disabled()
✅ it doesn't allow API key authentication by default()
✅ it enforces the super JWT requirement()
✅ it doesn't interfere with basic endpoints()

✅ backend/security/build/test-results/test/TEST-io.tolgee.security.authentication.EmailValidInterceptorTest.xml

2 tests were completed in 25ms with 2 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
io.tolgee.security.authentication.EmailValidInterceptorTest 2✅ 25ms

✅ io.tolgee.security.authentication.EmailValidInterceptorTest

✅ not throw when annotated by email verification bypass()
✅ rejects access if the user does not have a verified email()

✅ backend/security/build/test-results/test/TEST-io.tolgee.security.authentication.SsoAuthenticationInterceptorTest.xml

6 tests were completed in 76ms with 6 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
io.tolgee.security.authentication.SsoAuthenticationInterceptorTest 6✅ 76ms

✅ io.tolgee.security.authentication.SsoAuthenticationInterceptorTest

✅ it allows access when sso is not forced for the user()
✅ it allows access for user using sso authentication()
✅ it rejects access if sso is forced for the user()
✅ it allows access for user with invalid email as username()
✅ it allows access for user using sso global authentication()
✅ it allows access when annotated by email verification bypass()

✅ backend/security/build/test-results/test/TEST-io.tolgee.security.authorization.OrganizationAuthorizationInterceptorTest.xml

5 tests were completed in 120ms with 5 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
io.tolgee.security.authorization.OrganizationAuthorizationInterceptorTest 5✅ 120ms

✅ io.tolgee.security.authorization.OrganizationAuthorizationInterceptorTest

✅ rejects access if the user does not have a sufficiently high role()
✅ it hides the organization if the user cannot see it()
✅ it has no effect on endpoints not specific to a single organization()
✅ it requires an annotation to be present on the handler()
✅ it does not allow both annotations to be present()

✅ backend/security/build/test-results/test/TEST-io.tolgee.security.authorization.ProjectAuthorizationInterceptorTest.xml

11 tests were completed in 244ms with 11 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
io.tolgee.security.authorization.ProjectAuthorizationInterceptorTest 11✅ 244ms

✅ io.tolgee.security.authorization.ProjectAuthorizationInterceptorTest

✅ it hides the organization if the user cannot see it()
✅ permissions work as intended when using implicit project id()
✅ it does not let scopes on the key work if the authenticated user does not have them()
✅ it has no effect on endpoints not specific to a single project()
✅ ensures API key works only for the project it is bound to()
✅ rejects access if the user is admin and authorizes with API key()
✅ rejects access if the user does not have the required scope (single scope)()
✅ it restricts scopes (multiple scopes)()
✅ it requires an annotation to be present on the handler()
✅ it does not allow both annotations to be present()
✅ rejects access if the user does not have the required scope (multiple scopes)()

✅ backend/security/build/test-results/test/TEST-io.tolgee.security.ratelimit.GlobalIpRateLimitFilterTest.xml

3 tests were completed in 9ms with 3 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
io.tolgee.security.ratelimit.GlobalIpRateLimitFilterTest 3✅ 9ms

✅ io.tolgee.security.ratelimit.GlobalIpRateLimitFilterTest

✅ it lets requests through()
✅ it does not let rate limited requests through()
✅ it does rate limit if request is OPTIONS()

✅ backend/security/build/test-results/test/TEST-io.tolgee.security.ratelimit.GlobalUserRateLimitFilterTest.xml

3 tests were completed in 5ms with 3 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
io.tolgee.security.ratelimit.GlobalUserRateLimitFilterTest 3✅ 5ms

✅ io.tolgee.security.ratelimit.GlobalUserRateLimitFilterTest

✅ it lets requests through()
✅ it does not let rate limited requests through()
✅ it does rate limit if request is OPTIONS()

✅ backend/security/build/test-results/test/TEST-io.tolgee.security.ratelimit.RateLimitInterceptorTest.xml

8 tests were completed in 131ms with 8 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
io.tolgee.security.ratelimit.RateLimitInterceptorTest 8✅ 131ms

✅ io.tolgee.security.ratelimit.RateLimitInterceptorTest

✅ it rate limits requests according to the specified policy()
✅ endpoint rate limit policy is correctly extracted from annotations()
✅ endpoint rate limit bucket correctly discriminates against major path variables()
✅ endpoint rate limit uses the correct user or ip discrimination method()
✅ it uses different buckets for different paths()
✅ it does not rate limit when limits are disabled()
✅ it does not rate limit when there are no annotations()
✅ it uses the same buckets for paths with a shared bucket()