saLeox opened a new pull request, #2776:
URL: https://github.com/apache/incubator-streampark/pull/2776

   <!--
   Thank you for contributing to StreamPark! Please make sure that your code 
changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   -->
   
   ## What changes were proposed in this pull request
   
   Issue Number: close #2736 
   
   This pull request proposed to implement Single Sign-On (SSO) in the 
Streampark.
   
   ## Brief change log
   
   It's known that Streampark use Apache Shiro for authetication and 
authorization purpose, and we are going to use Pac4j framework to achive the 
Single Sign-On (SSO) feature, which is recommented by Shiro community, and also 
applied by other Apache project, like Knox, Durid, Zeppelin, etc.
   
   We come up the design with three main use cases:
   
   a) New user login when SSO is enabled
   
![image](https://github.com/apache/incubator-streampark/assets/23732067/381c8ee7-d3e2-4fc1-aa98-f74646b28ed5)
   
   b) Existing user login when SSO is enabled
   
![image](https://github.com/apache/incubator-streampark/assets/23732067/2ed7c7bb-9ef8-4d27-a80a-d0ffbd7906c4)
   
   c) User login when when SSO is not enabled
   
![image](https://github.com/apache/incubator-streampark/assets/23732067/0e8caa93-02eb-4237-b9d7-f5477d8a8369)
   
   ## Verifying this change
   
   <!--*(Please pick either of the following options)*-->
   
   This change added tests and can be verified as follows:
   - Enable the SSO from `application.yml` and select preferred 3rd party login 
approch between Github and Google auth from `application-sso.yml`, and see 
whether it will redirect to external login page correctly and comple the 
authentication process.
   
   
![image](https://github.com/apache/incubator-streampark/assets/23732067/771280bd-bd00-447c-920e-57568982760a)
   
![image](https://github.com/apache/incubator-streampark/assets/23732067/62958efe-3de4-4a4c-9207-45639c3f4b23)
   
![image](https://github.com/apache/incubator-streampark/assets/23732067/2c0673c5-d5fd-4f02-a0c8-83c12b31732c)
   
![image](https://github.com/apache/incubator-streampark/assets/23732067/ba04c19a-0a40-4190-b28f-9605af47f29b)
   
   - Disable the SSO from `application.yml` , and check the error message.
   
![image](https://github.com/apache/incubator-streampark/assets/23732067/c1079a5b-03cc-49c7-b639-943e0c2e1885)
   
   
   ## Does this pull request potentially affect one of the following parts
    - Dependencies (does it add or upgrade a dependency):  yes 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to