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

feat: Add login filter of OpenID-Connect Login #2608

Merged
merged 50 commits into from
Oct 28, 2022
Merged

Conversation

ljzsmllx
Copy link
Contributor

@ljzsmllx ljzsmllx commented Aug 29, 2022

Please answer these questions before submitting a pull request, or your PR will get closed.

Why submit this pull request?

  • Bugfix
  • New feature provided
  • Improve performance
  • Backport patches

What changes will this PR take into?

feat: The series PR will add a new feature to the Dashboard to make it support login through OpenID-Connect.
This PR will adds a login filter.

Related issues

Checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

@ljzsmllx ljzsmllx changed the title Add login filter of OpenID-Connect Login feat: Add login filter of OpenID-Connect Login Aug 29, 2022
@codecov-commenter
Copy link

codecov-commenter commented Aug 29, 2022

Codecov Report

Merging #2608 (cb84bf7) into master (14ffc58) will decrease coverage by 8.85%.
The diff coverage is 63.52%.

❗ Current head cb84bf7 differs from pull request most recent head a39c916. Consider uploading reports for the commit a39c916 to get more accurate results

@@            Coverage Diff             @@
##           master    #2608      +/-   ##
==========================================
- Coverage   76.49%   67.63%   -8.86%     
==========================================
  Files         139      181      +42     
  Lines        3748     7345    +3597     
  Branches      872      800      -72     
==========================================
+ Hits         2867     4968    +2101     
- Misses        881     2018    +1137     
- Partials        0      359     +359     
Flag Coverage Δ
backend-e2e-test-ginkgo 64.81% <63.52%> (?)
frontend-e2e-test 71.07% <ø> (-5.42%) ⬇️

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

Impacted Files Coverage Δ
api/internal/filter/authentication.go 54.76% <38.70%> (ø)
api/internal/filter/oidc.go 73.91% <73.91%> (ø)
api/internal/conf/conf.go 60.66% <100.00%> (ø)
api/internal/route.go 87.50% <100.00%> (ø)
...mponents/Upstream/components/active-check/Host.tsx 33.33% <0.00%> (-66.67%) ⬇️
...mponents/Upstream/components/active-check/Port.tsx 33.33% <0.00%> (-66.67%) ⬇️
...mponents/Upstream/components/active-check/Type.tsx 33.33% <0.00%> (-66.67%) ⬇️
...nents/Upstream/components/active-check/Timeout.tsx 33.33% <0.00%> (-66.67%) ⬇️
...ents/Upstream/components/active-check/HttpPath.tsx 33.33% <0.00%> (-66.67%) ⬇️
...s/Upstream/components/active-check/Concurrency.tsx 33.33% <0.00%> (-66.67%) ⬇️
... and 111 more

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

api/internal/conf/conf.go Outdated Show resolved Hide resolved
api/internal/filter/oidc.go Outdated Show resolved Hide resolved
api/internal/filter/oidc.go Outdated Show resolved Hide resolved
api/internal/filter/oidc.go Outdated Show resolved Hide resolved
api/internal/filter/oidc.go Outdated Show resolved Hide resolved
api/internal/filter/oidc.go Outdated Show resolved Hide resolved
api/internal/filter/oidc.go Outdated Show resolved Hide resolved
api/internal/filter/oidc.go Outdated Show resolved Hide resolved
api/internal/filter/oidc.go Outdated Show resolved Hide resolved
api/internal/filter/oidc.go Outdated Show resolved Hide resolved
Copy link
Contributor

@starsz starsz left a comment

Choose a reason for hiding this comment

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

Can you add some e2e testcase.

api/internal/filter/oidc_test.go Outdated Show resolved Hide resolved
api/internal/filter/authentication_test.go Outdated Show resolved Hide resolved
api/test/e2e/oidc/oidc_test.go Outdated Show resolved Hide resolved
api/test/e2e/oidc/oidc_test.go Outdated Show resolved Hide resolved
api/test/e2e/oidc/oidc_test.go Outdated Show resolved Hide resolved
api/internal/filter/oidc.go Show resolved Hide resolved
api/test/e2e/oidc/oidc_test.go Show resolved Hide resolved
api/test/e2e/oidc/oidc_test.go Outdated Show resolved Hide resolved
api/test/e2e/oidc/oidc_test.go Outdated Show resolved Hide resolved
@ljzsmllx ljzsmllx marked this pull request as ready for review October 27, 2022 18:02
"github.com/gin-gonic/gin"
"github.com/golang-jwt/jwt"
"net/http"
"strings"
Copy link
Contributor

Choose a reason for hiding this comment

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

Code style.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

@starsz starsz merged commit 831df82 into apache:master Oct 28, 2022
hongbinhsu added a commit to fitphp/apix-dashboard that referenced this pull request Nov 7, 2022
* upstream/master:
  fix: change default CSP value (apache#2601)
  fix: ant-table unable to request (apache#2641)
  fix: plugin_config missing on service exist (apache#2657)
  feat: add etcd store auto re-initialize (apache#2650)
  feat: add login filter of OpenID-Connect (apache#2608)
  feat:Configure plug-ins to support this feature (apache#2647)
  feat: Adding a Loading state to buttons (apache#2630)
  feat: dashboard support windows (apache#2619)
  Feat: add tip and preset model for plugin editor, improve e2e stability (apache#2581)
  docs: add Slack invitation link badge (apache#2617)

# Conflicts:
#	.github/workflows/backend-cli-test.yml
#	Dockerfile
#	api/test/shell/cli_test.sh
#	web/src/components/Footer/index.tsx
#	web/src/components/RightContent/index.tsx
#	web/src/pages/ServerInfo/List.tsx
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.

4 participants