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

Add support for managing client-policies #865

Merged
merged 6 commits into from
Jul 13, 2023

Conversation

thomasdarimont
Copy link
Contributor

@thomasdarimont thomasdarimont commented Apr 18, 2023

What this PR does / why we need it:
Adds support for managing client-profiles.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

fixes #863

Special notes for your reviewer:

Some executors such as secret-rotation in client-policies are only available in recent Keycloak versions.

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR
  • add tests for client-policy profiles referencing profiles
  • add tests for client-policy policies referencing profiles
  • document client-policy support

@thomasdarimont thomasdarimont changed the title Add assertj to ease writing assertions Add support for managing client-policies Apr 18, 2023
@thomasdarimont
Copy link
Contributor Author

@st3v0rr I think the current CI build failures are unrelated to this PR, would you mind taking a look?

All test runs fail with this test:

...
Error: org.jboss.resteasy.client.jaxrs.internal.proxy.extractors.BodyEntityExtractor#extractEntity: HTTP 404 Not Found
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.498 s <<< FAILURE! - in de.adorsys.keycloak.config.mock.CookieMockIT
[ERROR] de.adorsys.keycloak.config.mock.CookieMockIT.run  Time elapsed: 0.239 s  <<< ERROR!
javax.ws.rs.NotFoundException: HTTP 404 Not Found
	at de.adorsys.keycloak.config.mock.CookieMockIT.run(CookieMockIT.java:77)
...
	````

@thomasdarimont
Copy link
Contributor Author

@st3v0rr I think this PR is ready now for review, would you mind taking a look?

@thomasdarimont
Copy link
Contributor Author

@st3v0rr once #861 is merged (with the fix for the build errors) we can rebase and add this PR too.

@thomasdarimont thomasdarimont marked this pull request as ready for review May 31, 2023 07:50
@thomasdarimont
Copy link
Contributor Author

@st3v0rr I just noticed that I forgot to click "ready for review". I just updated the PR. Could you take a look?

@thomasdarimont thomasdarimont mentioned this pull request Jul 12, 2023
1 task
@thomasdarimont
Copy link
Contributor Author

Rebased on current main

@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Merging #865 (5259ba3) into main (bef94e9) will increase coverage by 0.05%.
The diff coverage is 92.72%.

@@             Coverage Diff              @@
##               main     #865      +/-   ##
============================================
+ Coverage     95.45%   95.50%   +0.05%     
- Complexity     1304     1322      +18     
============================================
  Files            76       78       +2     
  Lines          4220     4272      +52     
  Branches        469      475       +6     
============================================
+ Hits           4028     4080      +52     
+ Misses           94       91       -3     
- Partials         98      101       +3     
Impacted Files Coverage Δ
...ak/config/repository/ClientPoliciesRepository.java 89.47% <89.47%> (ø)
...ak/config/service/ClientPoliciesImportService.java 100.00% <100.00%> (ø)
...ys/keycloak/config/service/RealmImportService.java 100.00% <100.00%> (ø)
...cloak/config/util/resteasy/CookieClientFilter.java 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sonarcloud
Copy link

sonarcloud bot commented Jul 12, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@st3v0rr st3v0rr merged commit 49ecfe7 into adorsys:main Jul 13, 2023
11 checks passed
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 support for management of Client Policies
2 participants