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

SUBMARINE-1294. Add simple type authentication for REST api #979

Closed
wants to merge 6 commits into from

Conversation

cdmikechen
Copy link
Contributor

What is this PR for?

Add simple type authentication for REST api.
Use pac4j for token generation and validation. Considering need to adapt to java8, this PR is using 4.5.6 instead of version pac4j 5 for the time being.

What type of PR is it?

Feature

Todos

  • - Add some configs for authentication
  • - Add SimpleFilter
  • - Modified some login api processing logic (no logout available yet)
  • - Add test case

What is the Jira issue?

https://issues.apache.org/jira/projects/SUBMARINE/issues/SUBMARINE-1294

How should this be tested?

Have added a test case in org.apache.submarine.server.security.SubmarineAuthSimpleTest

Screenshots (if appropriate)

No

Questions:

@cdmikechen cdmikechen changed the title Submarine 1294. Add simple type authentication for REST api SUBMARINE-1294. Add simple type authentication for REST api Jul 17, 2022
@codecov
Copy link

codecov bot commented Jul 19, 2022

Codecov Report

Merging #979 (2fff5bd) into master (e7ed4a5) will increase coverage by 0.37%.
The diff coverage is 70.00%.

@@             Coverage Diff             @@
##             master    #979      +/-   ##
===========================================
+ Coverage      9.18%   9.55%   +0.37%     
- Complexity      670     698      +28     
===========================================
  Files           234     240       +6     
  Lines         23716   23832     +116     
  Branches       3475    3478       +3     
===========================================
+ Hits           2178    2278     +100     
- Misses        21407   21420      +13     
- Partials        131     134       +3     
Impacted Files Coverage Δ
...a/org/apache/submarine/server/SubmarineServer.java 62.28% <20.00%> (-1.25%) ⬇️
.../submarine/server/rest/workbench/LoginRestApi.java 60.00% <57.14%> (+60.00%) ⬆️
...server/security/simple/SimpleSecurityProvider.java 66.66% <66.66%> (ø)
...submarine/server/security/common/CommonConfig.java 75.00% <75.00%> (ø)
...che/submarine/server/security/SecurityFactory.java 78.57% <78.57%> (ø)
...rine/server/security/simple/SimpleLoginConfig.java 87.50% <87.50%> (ø)
...submarine/server/security/simple/SimpleFilter.java 92.30% <92.30%> (ø)
...che/submarine/commons/utils/SubmarineConfVars.java 75.80% <100.00%> (+0.59%) ⬆️
...submarine/server/security/common/CommonFilter.java 100.00% <100.00%> (ø)
...ubmarine/commons/utils/SubmarineConfiguration.java 36.72% <0.00%> (+1.12%) ⬆️
... and 3 more

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 e7ed4a5...2fff5bd. Read the comment docs.

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

2 participants