Skip to content
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

Client type service account default type #29037

Conversation

patrickjennings
Copy link
Contributor

@patrickjennings patrickjennings commented Apr 23, 2024

Changes requested as part of #29198.

Removing reflection used in augmentation of the client representation during create and update. This is replaced by utilizing the TypeAwareClientModelDelegate to catch any ClientTypeExceptions that might be thrown on fields that are non-applicable or read-only.

Static methods updateClient and createClient of RepresentationToModel will handle updating the model from the client representation and consolidating validations error to report all failures of client type fields. Removed duplicate code used to update the properties in these two methods.

Created enums for well known client type attributes, in TypedClientAttribute and TypedClientExtendedAttribute. These also define non-applicable default values for each of the properties.

With this, you can create a service account with all relevant fields by only specifying the type:

curl --location 'http://localhost:8080/admin/realms/master/clients' \
--data '{
    "type": "service-account"
}'

@patrickjennings patrickjennings requested a review from a team as a code owner April 23, 2024 21:04
@patrickjennings
Copy link
Contributor Author

@mposolda @graziang @jsorah @vickeybrown , curious what you all think of these changes.

This would get rid of the reflection, as talked about here: #28529 (comment). As well as consolidate where client type configurations get applied and validated in the code.

I would want to go back and polish before having a true review but wanted to have eyes on this and see if you agree / disagree with the approaches.

Thanks!

@patrickjennings patrickjennings force-pushed the client-type-service-account-default-type branch 2 times, most recently from b1213ba to 2b6ea3c Compare April 25, 2024 20:22
@mposolda mposolda self-assigned this Apr 26, 2024
@patrickjennings patrickjennings force-pushed the client-type-service-account-default-type branch from 2b6ea3c to b2bea8b Compare April 26, 2024 20:29
Copy link

@keycloak-github-bot keycloak-github-bot bot left a comment

Choose a reason for hiding this comment

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

Unreported flaky test detected, please review

@keycloak-github-bot
Copy link

Unreported flaky test detected

If the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR.

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testWithOTPAndRecoveryCodesAtLevel2

Keycloak CI - Base IT (5)

org.junit.ComparisonFailure: expected:<[gold]> but was:<[2]>
	at org.junit.Assert.assertEquals(Assert.java:117)
	at org.junit.Assert.assertEquals(Assert.java:146)
	at org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest.assertLoggedInWithAcr(LevelOfAssuranceFlowTest.java:948)
	at org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest.testWithOTPAndRecoveryCodesAtLevel2(LevelOfAssuranceFlowTest.java:845)
...
org.openqa.selenium.NoSuchElementException: 
Unable to locate element with ID: username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1498-820', ip: '10.1.0.64', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testRealmAcrLoaMapping

Keycloak CI - Base IT (5)

jakarta.ws.rs.BadRequestException: HTTP 400 Bad Request
	at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.handleErrorStatus(ClientInvocation.java:236)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.extractors.DefaultEntityExtractorFactory$3.extractEntity(DefaultEntityExtractorFactory.java:41)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invokeSync(ClientInvoker.java:136)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:103)
...
org.openqa.selenium.NoSuchElementException: 
Unable to locate element with ID: username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1498-820', ip: '10.1.0.64', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testDeleteCredentialAction

Keycloak CI - Base IT (5)

java.lang.AssertionError: Event expected
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.junit.Assert.assertNotNull(Assert.java:713)
	at org.keycloak.testsuite.AssertEvents.poll(AssertEvents.java:85)
...
org.openqa.selenium.NoSuchElementException: 
Unable to locate element with ID: username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1498-820', ip: '10.1.0.64', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testDisableStepupFeatureTest

Keycloak CI - Base IT (5)

java.lang.AssertionError: Event expected
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.junit.Assert.assertNotNull(Assert.java:713)
	at org.keycloak.testsuite.AssertEvents.poll(AssertEvents.java:85)
...
java.lang.IllegalArgumentException: The flow with alias browser -  Level of Authentication FLow did not exist
	at org.keycloak.testsuite.forms.BrowserFlowTest.revertFlows(BrowserFlowTest.java:1290)
	at org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest.after(LevelOfAssuranceFlowTest.java:261)
	at jdk.internal.reflect.GeneratedMethodAccessor899.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#stepupAuthentication

Keycloak CI - Base IT (5)

org.openqa.selenium.NoSuchElementException: 
Unable to locate element with ID: username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1498-820', ip: '10.1.0.64', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...
org.openqa.selenium.NoSuchElementException: 
Unable to locate element with ID: username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1498-820', ip: '10.1.0.64', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#multipleEssentialAcrValues

Keycloak CI - Base IT (5)

org.openqa.selenium.NoSuchElementException: 
Unable to locate element with ID: username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1498-820', ip: '10.1.0.64', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...
org.openqa.selenium.NoSuchElementException: 
Unable to locate element with ID: username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1498-820', ip: '10.1.0.64', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testChangingLoaConditionConfiguration

Keycloak CI - Base IT (5)

org.openqa.selenium.NoSuchElementException: 
Unable to locate element with ID: username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1498-820', ip: '10.1.0.64', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...
java.lang.AssertionError: expected:<silver> but was:<null>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotEquals(Assert.java:835)
	at org.junit.Assert.assertEquals(Assert.java:120)
	at org.junit.Assert.assertEquals(Assert.java:146)
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testMaxAgeConditionWithAcr

Keycloak CI - Base IT (5)

org.openqa.selenium.NoSuchElementException: 
Unable to locate element with ID: username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1498-820', ip: '10.1.0.64', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...
java.lang.AssertionError: expected:<3> but was:<null>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotEquals(Assert.java:835)
	at org.junit.Assert.assertEquals(Assert.java:120)
	at org.junit.Assert.assertEquals(Assert.java:146)
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testMaxAgeConditionWithSSO

Keycloak CI - Base IT (5)

org.openqa.selenium.NoSuchElementException: 
Unable to locate element with ID: username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1498-820', ip: '10.1.0.64', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...
java.lang.AssertionError: expected:<3> but was:<null>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotEquals(Assert.java:835)
	at org.junit.Assert.assertEquals(Assert.java:120)
	at org.junit.Assert.assertEquals(Assert.java:146)
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testWithOTPAndRecoveryCodesAtLevel2

Keycloak CI - Forms IT (chrome)

org.junit.ComparisonFailure: expected:<[gold]> but was:<[2]>
	at org.junit.Assert.assertEquals(Assert.java:117)
	at org.junit.Assert.assertEquals(Assert.java:146)
	at org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest.assertLoggedInWithAcr(LevelOfAssuranceFlowTest.java:948)
	at org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest.testWithOTPAndRecoveryCodesAtLevel2(LevelOfAssuranceFlowTest.java:845)
...
org.openqa.selenium.NoSuchElementException: 
no such element: Unable to locate element: {"method":"css selector","selector":"#username"}
  (Session info: chrome-headless-shell=124.0.6367.60)
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testRealmAcrLoaMapping

Keycloak CI - Forms IT (chrome)

jakarta.ws.rs.BadRequestException: HTTP 400 Bad Request
	at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.handleErrorStatus(ClientInvocation.java:236)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.extractors.DefaultEntityExtractorFactory$3.extractEntity(DefaultEntityExtractorFactory.java:41)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invokeSync(ClientInvoker.java:136)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:103)
...
org.openqa.selenium.NoSuchElementException: 
no such element: Unable to locate element: {"method":"css selector","selector":"#username"}
  (Session info: chrome-headless-shell=124.0.6367.60)
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testDeleteCredentialAction

Keycloak CI - Forms IT (chrome)

java.lang.AssertionError: Event expected
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.junit.Assert.assertNotNull(Assert.java:713)
	at org.keycloak.testsuite.AssertEvents.poll(AssertEvents.java:85)
...
org.openqa.selenium.NoSuchElementException: 
no such element: Unable to locate element: {"method":"css selector","selector":"#username"}
  (Session info: chrome-headless-shell=124.0.6367.60)
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testDisableStepupFeatureTest

Keycloak CI - Forms IT (chrome)

java.lang.AssertionError: Event expected
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.junit.Assert.assertNotNull(Assert.java:713)
	at org.keycloak.testsuite.AssertEvents.poll(AssertEvents.java:85)
...
java.lang.IllegalArgumentException: The flow with alias browser -  Level of Authentication FLow did not exist
	at org.keycloak.testsuite.forms.BrowserFlowTest.revertFlows(BrowserFlowTest.java:1290)
	at org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest.after(LevelOfAssuranceFlowTest.java:261)
	at jdk.internal.reflect.GeneratedMethodAccessor723.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#stepupAuthentication

Keycloak CI - Forms IT (chrome)

org.openqa.selenium.NoSuchElementException: 
no such element: Unable to locate element: {"method":"css selector","selector":"#username"}
  (Session info: chrome-headless-shell=124.0.6367.60)
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
...
org.openqa.selenium.NoSuchElementException: 
no such element: Unable to locate element: {"method":"css selector","selector":"#username"}
  (Session info: chrome-headless-shell=124.0.6367.60)
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#multipleEssentialAcrValues

Keycloak CI - Forms IT (chrome)

org.openqa.selenium.NoSuchElementException: 
no such element: Unable to locate element: {"method":"css selector","selector":"#username"}
  (Session info: chrome-headless-shell=124.0.6367.60)
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
...
org.openqa.selenium.NoSuchElementException: 
no such element: Unable to locate element: {"method":"css selector","selector":"#username"}
  (Session info: chrome-headless-shell=124.0.6367.60)
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testChangingLoaConditionConfiguration

Keycloak CI - Forms IT (chrome)

org.openqa.selenium.NoSuchElementException: 
no such element: Unable to locate element: {"method":"css selector","selector":"#username"}
  (Session info: chrome-headless-shell=124.0.6367.60)
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
...
java.lang.AssertionError: expected:<silver> but was:<null>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotEquals(Assert.java:835)
	at org.junit.Assert.assertEquals(Assert.java:120)
	at org.junit.Assert.assertEquals(Assert.java:146)
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testMaxAgeConditionWithAcr

Keycloak CI - Forms IT (chrome)

org.openqa.selenium.NoSuchElementException: 
no such element: Unable to locate element: {"method":"css selector","selector":"#username"}
  (Session info: chrome-headless-shell=124.0.6367.60)
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
...
java.lang.AssertionError: expected:<3> but was:<null>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotEquals(Assert.java:835)
	at org.junit.Assert.assertEquals(Assert.java:120)
	at org.junit.Assert.assertEquals(Assert.java:146)
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testMaxAgeConditionWithSSO

Keycloak CI - Forms IT (chrome)

org.openqa.selenium.NoSuchElementException: 
no such element: Unable to locate element: {"method":"css selector","selector":"#username"}
  (Session info: chrome-headless-shell=124.0.6367.60)
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
...
java.lang.AssertionError: expected:<3> but was:<null>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotEquals(Assert.java:835)
	at org.junit.Assert.assertEquals(Assert.java:120)
	at org.junit.Assert.assertEquals(Assert.java:146)
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testWithOTPAndRecoveryCodesAtLevel2

Keycloak CI - Forms IT (firefox)

org.junit.ComparisonFailure: expected:<[gold]> but was:<[2]>
	at org.junit.Assert.assertEquals(Assert.java:117)
	at org.junit.Assert.assertEquals(Assert.java:146)
	at org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest.assertLoggedInWithAcr(LevelOfAssuranceFlowTest.java:948)
	at org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest.testWithOTPAndRecoveryCodesAtLevel2(LevelOfAssuranceFlowTest.java:845)
...
org.openqa.selenium.NoSuchElementException: 
Unable to locate element: #username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1424-953', ip: '10.1.0.98', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testRealmAcrLoaMapping

Keycloak CI - Forms IT (firefox)

jakarta.ws.rs.BadRequestException: HTTP 400 Bad Request
	at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.handleErrorStatus(ClientInvocation.java:236)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.extractors.DefaultEntityExtractorFactory$3.extractEntity(DefaultEntityExtractorFactory.java:41)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invokeSync(ClientInvoker.java:136)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:103)
...
org.openqa.selenium.NoSuchElementException: 
Unable to locate element: #username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1424-953', ip: '10.1.0.98', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testDeleteCredentialAction

Keycloak CI - Forms IT (firefox)

java.lang.AssertionError: Event expected
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.junit.Assert.assertNotNull(Assert.java:713)
	at org.keycloak.testsuite.AssertEvents.poll(AssertEvents.java:85)
...
org.openqa.selenium.NoSuchElementException: 
Unable to locate element: #username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1424-953', ip: '10.1.0.98', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testDisableStepupFeatureTest

Keycloak CI - Forms IT (firefox)

java.lang.AssertionError: Event expected
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.junit.Assert.assertNotNull(Assert.java:713)
	at org.keycloak.testsuite.AssertEvents.poll(AssertEvents.java:85)
...
java.lang.IllegalArgumentException: The flow with alias browser -  Level of Authentication FLow did not exist
	at org.keycloak.testsuite.forms.BrowserFlowTest.revertFlows(BrowserFlowTest.java:1290)
	at org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest.after(LevelOfAssuranceFlowTest.java:261)
	at jdk.internal.reflect.GeneratedMethodAccessor729.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#stepupAuthentication

Keycloak CI - Forms IT (firefox)

org.openqa.selenium.NoSuchElementException: 
Unable to locate element: #username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1424-953', ip: '10.1.0.98', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...
org.openqa.selenium.NoSuchElementException: 
Unable to locate element: #username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1424-953', ip: '10.1.0.98', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#multipleEssentialAcrValues

Keycloak CI - Forms IT (firefox)

org.openqa.selenium.NoSuchElementException: 
Unable to locate element: #username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1424-953', ip: '10.1.0.98', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...
org.openqa.selenium.NoSuchElementException: 
Unable to locate element: #username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1424-953', ip: '10.1.0.98', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testChangingLoaConditionConfiguration

Keycloak CI - Forms IT (firefox)

org.openqa.selenium.NoSuchElementException: 
Unable to locate element: #username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1424-953', ip: '10.1.0.98', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...
java.lang.AssertionError: expected:<silver> but was:<null>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotEquals(Assert.java:835)
	at org.junit.Assert.assertEquals(Assert.java:120)
	at org.junit.Assert.assertEquals(Assert.java:146)
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testMaxAgeConditionWithAcr

Keycloak CI - Forms IT (firefox)

org.openqa.selenium.NoSuchElementException: 
Unable to locate element: #username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1424-953', ip: '10.1.0.98', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...
java.lang.AssertionError: expected:<3> but was:<null>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotEquals(Assert.java:835)
	at org.junit.Assert.assertEquals(Assert.java:120)
	at org.junit.Assert.assertEquals(Assert.java:146)
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testMaxAgeConditionWithSSO

Keycloak CI - Forms IT (firefox)

org.openqa.selenium.NoSuchElementException: 
Unable to locate element: #username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1424-953', ip: '10.1.0.98', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...
java.lang.AssertionError: expected:<3> but was:<null>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotEquals(Assert.java:835)
	at org.junit.Assert.assertEquals(Assert.java:120)
	at org.junit.Assert.assertEquals(Assert.java:146)
...

Report flaky test

Copy link
Contributor

@mposolda mposolda left a comment

Choose a reason for hiding this comment

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

@patrickjennings Thanks! As long as the tests are ok, I think that changes are good.

I've added some comments inline (maybe the one about not throwing exception can help with failing tests, but not 100% sure...)

Object nonApplicableValue = getNonApplicableValue();
// Check if clientType supports the feature. If not, return directly
if (!clientType.isApplicable(propertyName) && !Objects.equals(nonApplicableValue, newValue)) {
throw new ClientTypeException(
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if we need this. Isn't it sufficient to just log the warning and return in this case?

If some property is non-applicable, we can ignore the value set on the client. IMO Throwing the clientTypeException seems to be quite invasive and error-prone considering various corner cases around compatibility etc...

import java.util.function.Consumer;
import java.util.function.Supplier;

enum TypedClientAttribute implements TypedClientAttributeInterface {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick:

How about renaming TypedClientAttributeInterface to TypedClientAttribute
and TypedClientAttribute to TypedClientSimpleAttribute ?

@patrickjennings patrickjennings force-pushed the client-type-service-account-default-type branch from b2bea8b to 4346e37 Compare April 29, 2024 20:51
@keycloak-github-bot
Copy link

Unreported flaky test detected

If the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR.

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testWithOTPAndRecoveryCodesAtLevel2

Keycloak CI - Forms IT (chrome)

org.junit.ComparisonFailure: expected:<[gold]> but was:<[2]>
	at org.junit.Assert.assertEquals(Assert.java:117)
	at org.junit.Assert.assertEquals(Assert.java:146)
	at org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest.assertLoggedInWithAcr(LevelOfAssuranceFlowTest.java:948)
	at org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest.testWithOTPAndRecoveryCodesAtLevel2(LevelOfAssuranceFlowTest.java:845)
...
org.openqa.selenium.NoSuchElementException: 
no such element: Unable to locate element: {"method":"css selector","selector":"#username"}
  (Session info: chrome-headless-shell=124.0.6367.60)
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testRealmAcrLoaMapping

Keycloak CI - Forms IT (chrome)

jakarta.ws.rs.BadRequestException: HTTP 400 Bad Request
	at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.handleErrorStatus(ClientInvocation.java:236)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.extractors.DefaultEntityExtractorFactory$3.extractEntity(DefaultEntityExtractorFactory.java:41)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invokeSync(ClientInvoker.java:136)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:103)
...
org.openqa.selenium.NoSuchElementException: 
no such element: Unable to locate element: {"method":"css selector","selector":"#username"}
  (Session info: chrome-headless-shell=124.0.6367.60)
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testDeleteCredentialAction

Keycloak CI - Forms IT (chrome)

java.lang.AssertionError: Event expected
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.junit.Assert.assertNotNull(Assert.java:713)
	at org.keycloak.testsuite.AssertEvents.poll(AssertEvents.java:85)
...
org.openqa.selenium.NoSuchElementException: 
no such element: Unable to locate element: {"method":"css selector","selector":"#username"}
  (Session info: chrome-headless-shell=124.0.6367.60)
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testDisableStepupFeatureTest

Keycloak CI - Forms IT (chrome)

java.lang.AssertionError: Event expected
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.junit.Assert.assertNotNull(Assert.java:713)
	at org.keycloak.testsuite.AssertEvents.poll(AssertEvents.java:85)
...
java.lang.IllegalArgumentException: The flow with alias browser -  Level of Authentication FLow did not exist
	at org.keycloak.testsuite.forms.BrowserFlowTest.revertFlows(BrowserFlowTest.java:1290)
	at org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest.after(LevelOfAssuranceFlowTest.java:261)
	at jdk.internal.reflect.GeneratedMethodAccessor723.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#stepupAuthentication

Keycloak CI - Forms IT (chrome)

org.openqa.selenium.NoSuchElementException: 
no such element: Unable to locate element: {"method":"css selector","selector":"#username"}
  (Session info: chrome-headless-shell=124.0.6367.60)
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
...
org.openqa.selenium.NoSuchElementException: 
no such element: Unable to locate element: {"method":"css selector","selector":"#username"}
  (Session info: chrome-headless-shell=124.0.6367.60)
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#multipleEssentialAcrValues

Keycloak CI - Forms IT (chrome)

org.openqa.selenium.NoSuchElementException: 
no such element: Unable to locate element: {"method":"css selector","selector":"#username"}
  (Session info: chrome-headless-shell=124.0.6367.60)
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
...
org.openqa.selenium.NoSuchElementException: 
no such element: Unable to locate element: {"method":"css selector","selector":"#username"}
  (Session info: chrome-headless-shell=124.0.6367.60)
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testChangingLoaConditionConfiguration

Keycloak CI - Forms IT (chrome)

org.openqa.selenium.NoSuchElementException: 
no such element: Unable to locate element: {"method":"css selector","selector":"#username"}
  (Session info: chrome-headless-shell=124.0.6367.60)
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
...
java.lang.AssertionError: expected:<silver> but was:<null>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotEquals(Assert.java:835)
	at org.junit.Assert.assertEquals(Assert.java:120)
	at org.junit.Assert.assertEquals(Assert.java:146)
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testMaxAgeConditionWithAcr

Keycloak CI - Forms IT (chrome)

org.openqa.selenium.NoSuchElementException: 
no such element: Unable to locate element: {"method":"css selector","selector":"#username"}
  (Session info: chrome-headless-shell=124.0.6367.60)
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
...
java.lang.AssertionError: expected:<3> but was:<null>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotEquals(Assert.java:835)
	at org.junit.Assert.assertEquals(Assert.java:120)
	at org.junit.Assert.assertEquals(Assert.java:146)
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testMaxAgeConditionWithSSO

Keycloak CI - Forms IT (chrome)

org.openqa.selenium.NoSuchElementException: 
no such element: Unable to locate element: {"method":"css selector","selector":"#username"}
  (Session info: chrome-headless-shell=124.0.6367.60)
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
...
java.lang.AssertionError: expected:<3> but was:<null>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotEquals(Assert.java:835)
	at org.junit.Assert.assertEquals(Assert.java:120)
	at org.junit.Assert.assertEquals(Assert.java:146)
...

Report flaky test

org.keycloak.testsuite.federation.ldap.LDAPReadOnlyTest#testReadOnlyWithTOTPEnabled

Keycloak CI - Base IT (5)

org.openqa.selenium.TimeoutException: 
java.net.SocketTimeoutException: Read timed out
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az975-832', ip: '10.1.0.182', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
Driver info: driver.version: HtmlUnitDriver
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testWithOTPAndRecoveryCodesAtLevel2

Keycloak CI - Base IT (5)

org.junit.ComparisonFailure: expected:<[gold]> but was:<[2]>
	at org.junit.Assert.assertEquals(Assert.java:117)
	at org.junit.Assert.assertEquals(Assert.java:146)
	at org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest.assertLoggedInWithAcr(LevelOfAssuranceFlowTest.java:948)
	at org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest.testWithOTPAndRecoveryCodesAtLevel2(LevelOfAssuranceFlowTest.java:845)
...
org.openqa.selenium.NoSuchElementException: 
Unable to locate element with ID: username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az975-832', ip: '10.1.0.182', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testRealmAcrLoaMapping

Keycloak CI - Base IT (5)

jakarta.ws.rs.BadRequestException: HTTP 400 Bad Request
	at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.handleErrorStatus(ClientInvocation.java:236)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.extractors.DefaultEntityExtractorFactory$3.extractEntity(DefaultEntityExtractorFactory.java:41)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invokeSync(ClientInvoker.java:136)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:103)
...
org.openqa.selenium.NoSuchElementException: 
Unable to locate element with ID: username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az975-832', ip: '10.1.0.182', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testDeleteCredentialAction

Keycloak CI - Base IT (5)

java.lang.AssertionError: Event expected
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.junit.Assert.assertNotNull(Assert.java:713)
	at org.keycloak.testsuite.AssertEvents.poll(AssertEvents.java:85)
...
org.openqa.selenium.NoSuchElementException: 
Unable to locate element with ID: username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az975-832', ip: '10.1.0.182', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testDisableStepupFeatureTest

Keycloak CI - Base IT (5)

java.lang.AssertionError: Event expected
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.junit.Assert.assertNotNull(Assert.java:713)
	at org.keycloak.testsuite.AssertEvents.poll(AssertEvents.java:85)
...
java.lang.IllegalArgumentException: The flow with alias browser -  Level of Authentication FLow did not exist
	at org.keycloak.testsuite.forms.BrowserFlowTest.revertFlows(BrowserFlowTest.java:1290)
	at org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest.after(LevelOfAssuranceFlowTest.java:261)
	at jdk.internal.reflect.GeneratedMethodAccessor899.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#stepupAuthentication

Keycloak CI - Base IT (5)

org.openqa.selenium.NoSuchElementException: 
Unable to locate element with ID: username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az975-832', ip: '10.1.0.182', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...
org.openqa.selenium.NoSuchElementException: 
Unable to locate element with ID: username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az975-832', ip: '10.1.0.182', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#multipleEssentialAcrValues

Keycloak CI - Base IT (5)

org.openqa.selenium.NoSuchElementException: 
Unable to locate element with ID: username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az975-832', ip: '10.1.0.182', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...
org.openqa.selenium.NoSuchElementException: 
Unable to locate element with ID: username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az975-832', ip: '10.1.0.182', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testChangingLoaConditionConfiguration

Keycloak CI - Base IT (5)

org.openqa.selenium.NoSuchElementException: 
Unable to locate element with ID: username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az975-832', ip: '10.1.0.182', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...
java.lang.AssertionError: expected:<silver> but was:<null>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotEquals(Assert.java:835)
	at org.junit.Assert.assertEquals(Assert.java:120)
	at org.junit.Assert.assertEquals(Assert.java:146)
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testMaxAgeConditionWithAcr

Keycloak CI - Base IT (5)

org.openqa.selenium.NoSuchElementException: 
Unable to locate element with ID: username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az975-832', ip: '10.1.0.182', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...
java.lang.AssertionError: expected:<3> but was:<null>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotEquals(Assert.java:835)
	at org.junit.Assert.assertEquals(Assert.java:120)
	at org.junit.Assert.assertEquals(Assert.java:146)
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testMaxAgeConditionWithSSO

Keycloak CI - Base IT (5)

org.openqa.selenium.NoSuchElementException: 
Unable to locate element with ID: username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az975-832', ip: '10.1.0.182', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...
java.lang.AssertionError: expected:<3> but was:<null>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotEquals(Assert.java:835)
	at org.junit.Assert.assertEquals(Assert.java:120)
	at org.junit.Assert.assertEquals(Assert.java:146)
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testWithOTPAndRecoveryCodesAtLevel2

Keycloak CI - Forms IT (firefox)

org.junit.ComparisonFailure: expected:<[gold]> but was:<[2]>
	at org.junit.Assert.assertEquals(Assert.java:117)
	at org.junit.Assert.assertEquals(Assert.java:146)
	at org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest.assertLoggedInWithAcr(LevelOfAssuranceFlowTest.java:948)
	at org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest.testWithOTPAndRecoveryCodesAtLevel2(LevelOfAssuranceFlowTest.java:845)
...
org.openqa.selenium.NoSuchElementException: 
Unable to locate element: #username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1542-362', ip: '10.1.0.45', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testRealmAcrLoaMapping

Keycloak CI - Forms IT (firefox)

jakarta.ws.rs.BadRequestException: HTTP 400 Bad Request
	at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.handleErrorStatus(ClientInvocation.java:236)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.extractors.DefaultEntityExtractorFactory$3.extractEntity(DefaultEntityExtractorFactory.java:41)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invokeSync(ClientInvoker.java:136)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:103)
...
org.openqa.selenium.NoSuchElementException: 
Unable to locate element: #username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1542-362', ip: '10.1.0.45', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testDeleteCredentialAction

Keycloak CI - Forms IT (firefox)

java.lang.AssertionError: Event expected
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.junit.Assert.assertNotNull(Assert.java:713)
	at org.keycloak.testsuite.AssertEvents.poll(AssertEvents.java:85)
...
org.openqa.selenium.NoSuchElementException: 
Unable to locate element: #username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1542-362', ip: '10.1.0.45', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testDisableStepupFeatureTest

Keycloak CI - Forms IT (firefox)

java.lang.AssertionError: Event expected
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.junit.Assert.assertNotNull(Assert.java:713)
	at org.keycloak.testsuite.AssertEvents.poll(AssertEvents.java:85)
...
java.lang.IllegalArgumentException: The flow with alias browser -  Level of Authentication FLow did not exist
	at org.keycloak.testsuite.forms.BrowserFlowTest.revertFlows(BrowserFlowTest.java:1290)
	at org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest.after(LevelOfAssuranceFlowTest.java:261)
	at jdk.internal.reflect.GeneratedMethodAccessor729.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#stepupAuthentication

Keycloak CI - Forms IT (firefox)

org.openqa.selenium.NoSuchElementException: 
Unable to locate element: #username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1542-362', ip: '10.1.0.45', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...
org.openqa.selenium.NoSuchElementException: 
Unable to locate element: #username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1542-362', ip: '10.1.0.45', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#multipleEssentialAcrValues

Keycloak CI - Forms IT (firefox)

org.openqa.selenium.NoSuchElementException: 
Unable to locate element: #username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1542-362', ip: '10.1.0.45', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...
org.openqa.selenium.NoSuchElementException: 
Unable to locate element: #username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1542-362', ip: '10.1.0.45', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testChangingLoaConditionConfiguration

Keycloak CI - Forms IT (firefox)

org.openqa.selenium.NoSuchElementException: 
Unable to locate element: #username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1542-362', ip: '10.1.0.45', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...
java.lang.AssertionError: expected:<silver> but was:<null>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotEquals(Assert.java:835)
	at org.junit.Assert.assertEquals(Assert.java:120)
	at org.junit.Assert.assertEquals(Assert.java:146)
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testMaxAgeConditionWithAcr

Keycloak CI - Forms IT (firefox)

org.openqa.selenium.NoSuchElementException: 
Unable to locate element: #username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1542-362', ip: '10.1.0.45', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...
java.lang.AssertionError: expected:<3> but was:<null>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotEquals(Assert.java:835)
	at org.junit.Assert.assertEquals(Assert.java:120)
	at org.junit.Assert.assertEquals(Assert.java:146)
...

Report flaky test

org.keycloak.testsuite.forms.LevelOfAssuranceFlowTest#testMaxAgeConditionWithSSO

Keycloak CI - Forms IT (firefox)

org.openqa.selenium.NoSuchElementException: 
Unable to locate element: #username
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'fv-az1542-362', ip: '10.1.0.45', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1018-azure', java.version: '17.0.10'
...
java.lang.AssertionError: expected:<3> but was:<null>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotEquals(Assert.java:835)
	at org.junit.Assert.assertEquals(Assert.java:120)
	at org.junit.Assert.assertEquals(Assert.java:146)
...

Report flaky test

Copy link

@keycloak-github-bot keycloak-github-bot bot left a comment

Choose a reason for hiding this comment

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

Unreported flaky test detected, please review

…-account client type configuration.

Signed-off-by: Patrick Jennings <pajennin@redhat.com>
…rd client type configurations.

Adding overrides for fields in TypeAwareClientModelDelegate required for
service-account client type.

Signed-off-by: Patrick Jennings <pajennin@redhat.com>
the top level ClientModel fields, the extended attributes through the
client_attributes table, and the composable fields on
ClientRepresentation.

Signed-off-by: Patrick Jennings <pajennin@redhat.com>
Validation will be done in the RepresentationToModel methods that are responsible for the ClientRepresentation -> ClientModel create and update static methods.

Signed-off-by: Patrick Jennings <pajennin@redhat.com>

More updates

Signed-off-by: Patrick Jennings <pajennin@redhat.com>
Signed-off-by: Patrick Jennings <pajennin@redhat.com>
…e, try to get property value from the client. Type aware client model will return non-applicable or default value to keep fields consistent.

Signed-off-by: Patrick Jennings <pajennin@redhat.com>
Signed-off-by: Patrick Jennings <pajennin@redhat.com>
Signed-off-by: Patrick Jennings <pajennin@redhat.com>
…because getter is a boolean and so cannot be null.

Signed-off-by: Patrick Jennings <pajennin@redhat.com>
…ed before and causing failures in integration tests.

Signed-off-by: Patrick Jennings <pajennin@redhat.com>
…clients.

Signed-off-by: Patrick Jennings <pajennin@redhat.com>
…g update.

Signed-off-by: Patrick Jennings <pajennin@redhat.com>
Signed-off-by: Patrick Jennings <pajennin@redhat.com>
Signed-off-by: Patrick Jennings <pajennin@redhat.com>
@patrickjennings patrickjennings force-pushed the client-type-service-account-default-type branch from 386c12a to 4e8f474 Compare May 1, 2024 19:04
…rmining whether to set sane default on create.

Signed-off-by: Patrick Jennings <pajennin@redhat.com>
@patrickjennings patrickjennings force-pushed the client-type-service-account-default-type branch from 4e8f474 to 188e36d Compare May 1, 2024 19:27
Copy link
Contributor

@mposolda mposolda left a comment

Choose a reason for hiding this comment

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

@mposolda mposolda merged commit 64824bb into keycloak:main May 2, 2024
65 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants