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

CCS-4249 sso enhancement #542

Merged
merged 9 commits into from
Mar 12, 2021

Conversation

xdavidson
Copy link
Collaborator

This PR introduces the following changes:

  • create a login servlet so that when users visit pantheon homepage, it's not automatically redirected to SSO
  • create a logout filter that users can sign out the keycloak/SSO session if choose to.

Copy link
Contributor

@carlosmunoz carlosmunoz left a comment

Choose a reason for hiding this comment

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

nothing major. can't wait to see this released!

// const wrapper = mount(<Router><User {...mockStateUser} /></Router>)
// const navLinks = wrapper.find(Link)
// expect(navLinks.exists()).toBe(true)
// })
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's remove these code block comments

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@Component(
service = Servlet.class,
property = {
"sling.servlet.methods={GET, POST}",
Copy link
Contributor

Choose a reason for hiding this comment

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

minor: there is a @SlingServlet (or something like that) annotation that makes this a bit cleaner.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

according to this documentation, osgi annotation is preferred.
The @SlingServlet annotation (evaluated by maven-scr-plugin, use only if you can neither use 1. nor 2.)
https://sling.apache.org/documentation/the-sling-engine/servlets.html

@codecov-io
Copy link

codecov-io commented Mar 12, 2021

Codecov Report

Merging #542 (c66bf5e) into master (c749788) will decrease coverage by 0.30%.
The diff coverage is 6.06%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #542      +/-   ##
============================================
- Coverage     55.93%   55.63%   -0.31%     
  Complexity      513      513              
============================================
  Files           139      141       +2     
  Lines          4389     4404      +15     
  Branches        610      614       +4     
============================================
- Hits           2455     2450       -5     
- Misses         1811     1831      +20     
  Partials        123      123              
Flag Coverage Δ Complexity Δ
java 55.63% <6.06%> (-0.31%) 0.00 <0.00> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
pantheon-bundle/frontend/src/app/searchResults.tsx 59.40% <0.00%> (-1.82%) 0.00 <0.00> (ø)
...n/auth/keycloak/KeycloakAuthenticationHandler.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
.../redhat/pantheon/auth/keycloak/KeycloakFilter.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
...ava/com/redhat/pantheon/auth/sso/LoginServlet.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...ava/com/redhat/pantheon/auth/sso/LogoutFilter.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...frontend/src/app/components/Chrome/Header/User.tsx 78.26% <66.66%> (+16.09%) 0.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c749788...c66bf5e. Read the comment docs.

carlosmunoz
carlosmunoz previously approved these changes Mar 12, 2021
@xdavidson xdavidson changed the title CCC\S-4249 sso enhancement CCS-4249 sso enhancement Mar 12, 2021
@xdavidson xdavidson merged commit 93cff4d into redhataccess:master Mar 12, 2021
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.

None yet

3 participants