8000 Update secret rotation when the policy is enabled using jwt by marcelomrwin · Pull Request #10853 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Update secret rotation when the policy is enabled using jwt - #10853

Merged
mposolda merged 5 commits into
keycloak:mainfrom
marcelomrwin:KEYCLOAK-10666-add-secret-rotation-to-JWTClientSecretAuthenticator
Mar 23, 2022
Merged

mposolda merged 5 commits into
keycloak:mainfrom
marcelomrwin:KEYCLOAK-10666-add-secret-rotation-to-JWTClientSecretAuthenticator

Conversation

@marcelomrwin
Copy link
Copy Markdown
Contributor

#10666

Update point 5 regarding the discussion on PR #10603

@marcelomrwin
8000
marcelomrwin requested a review from mposolda March 22, 2022 00:44
@mposolda mposolda left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@marcelomrwin Thanks for the PR! Nice work! Added few minor comments inline, but looks quite good in general.

@mposolda mposolda left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@marcelomrwin Thanks for the updates! I hope to merge the PR once tests are passing.

@mposolda
Copy link
Copy Markdown
Contributor

@marcelomrwin It seems the failed tests in the "undertow-map" group are regression of this PR :/ I suggest to properly revert the state after each test (EG. revert exactly to the same secret like was before the test instead of sharing the variable. Maybe it will help to revert client policies after each test as well).

@mposolda mposolda left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@marcelomrwin Marking as "Request changes" until test failures for "undertow-map" are investigated

@marcelomrwin
Copy link
Copy Markdown
Contributor Author

@marcelomrwin It seems the failed tests in the "undertow-map" group are regression of this PR :/ I suggest to properly revert the state after each test (EG. revert exactly to the same secret like was before the test instead of sharing the variable. Maybe it will help to revert client policies after each test as well).

@mposolda I reverted the test using the source of main branch and still the migration test fails:

Error: Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.003 s <<< FAILURE! - in org.keycloak.testsuite.model.MigrationModelTest
Error: org.keycloak.testsuite.model.MigrationModelTest.test Time elapsed: 0.003 s <<< FAILURE!
org.junit.ComparisonFailure: expected:<999[]> but was:<999[.0.0]>

Other errors are appearing, like below:

Error: ] Some problems were encountered while processing the POMs:
Error: Non-resolvable import POM: Could not find artifact org.keycloak.bom:keycloak-adapter-bom:pom:18.0.0-SNAPSHOT @ line 118, column 25
Error: Non-resolvable import POM: Could not find artifact org.keycloak.bom:keycloak-misc-bom:pom:18.0.0-SNAPSHOT @ line 125, column 25
Error: Non-resolvable import POM: Could not find artifact org.keycloak.bom:keycloak-spi-bom:pom:18.0.0-SNAPSHOT @ line 132, column 25
Error: 'dependencies.dependency.version' for org.keycloak:keycloak-test-helper:jar is missing. @ line 192, column 21
@
Error: The build could not read 1 project -> [Help 1]
Error:
Error: The project org.keycloak.quickstarts:keycloak-quickstart-parent:18.0.0-SNAPSHOT (/home/runner/work/keycloak/keycloak/pom.xml) has 4 errors
Error: Non-resolvable import POM: Could not find artifact org.keycloak.bom:keycloak-adapter-bom:pom:18.0.0-SNAPSHOT @ line 118, column 25 -> [Help 2]
Error: Non-resolvable import POM: Could not find artifact org.keycloak.bom:keycloak-misc-bom:pom:18.0.0-SNAPSHOT @ line 125, column 25 -> [Help 2]
Error: Non-resolvable import POM: Could not find artifact org.keycloak.bom:keycloak-spi-bom:pom:18.0.0-SNAPSHOT @ line 132, column 25 -> [Help 2]
Error: 'dependencies.dependency.version' for org.keycloak:keycloak-test-helper:jar is missing. @ line 192, column 21
Error:
Error: To see the full stack trace of the errors, re-run Maven with the -e switch.
Error: Re-run Maven using the -X switch to enable full debug logging.
Error:
Error: For more information about the errors and possible solutions, please read the following articles:
Error: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
Error: [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
Error: Process completed with exit code 1.

In the end, I stopped using the existing client and decided to create an exclusive client for my tests, thus avoiding changing a client that was already used in previous tests. I also gave up configuring a realm with client-id and decided to create all the artifacts at runtime.

Now it's a case of waiting for the pipeline to finish and check if errors persist and which errors.

@mposolda mposolda left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@marcelomrwin All "required" tests are ok now. Thanks for the fix!

@mposolda
mposolda merged commit 6efa45f into keycloak:main Mar 23, 2022
@mposolda mposolda linked an issue Mar 23, 2022 that may be closed by this pull request
@marcelomrwin
marcelomrwin deleted the KEYCLOAK-10666-add-secret-rotation-to-JWTClientSecretAuthenticator branch March 23, 2022 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add secret rotation to JWTClientSecretAuthenticator

2 participants

0