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

refactor(dashboard): use AuthConfiguration to manage bean of auth #2059

Merged
merged 6 commits into from
Mar 8, 2021

Conversation

Anilople
Copy link
Contributor

Describe what this PR does / why we need it

That will make auth module more flexible.

Does this pull request fix one issue?

#2053

Describe how you did it

Use AuthConfiguration to manage bean under package com.alibaba.csp.sentinel.dashboard.auth.

Change AuthorizationInterceptor to an interface, and support a default implementation.

Change LoginAuthenticationFilter to an interface, and support a default implementation.

Describe how to verify it

The beans are created successfully, and not break old testes.

Special notes for reviews

@sczyh30 sczyh30 added area/dashboard Issues or PRs about Sentinel Dashboard to-review To review labels Feb 28, 2021
@Anilople Anilople requested a review from cdfive March 1, 2021 11:32
Copy link
Collaborator

@cdfive cdfive left a comment

Choose a reason for hiding this comment

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

LGTM
After refactoring, it's convenient for users to customize their own implementation of AuthService,LoginAuthenticationFilter,AuthorizationInterceptor, the dashboard module becomes more extensible. The idea of interface design and auto configuration is smart.
Thanks! @Anilople

Copy link
Member

@sczyh30 sczyh30 left a comment

Choose a reason for hiding this comment

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

LGTM

@sczyh30 sczyh30 removed the to-review To review label Mar 8, 2021
@sczyh30 sczyh30 merged commit 069f618 into alibaba:master Mar 8, 2021
@sczyh30 sczyh30 added the kind/enhancement Category issues or prs related to enhancement. label Mar 8, 2021
@sczyh30
Copy link
Member

sczyh30 commented Mar 8, 2021

Nice work. Thanks for contributing and look forward to more!

@Anilople Anilople deleted the refactor/auth/config/20210227 branch April 12, 2021 15:13
hughpearse pushed a commit to hughpearse/Sentinel that referenced this pull request Jun 2, 2021
…ns (alibaba#2059)

* refactor(dashboard): use AuthConfiguration to manage the bean of auth
* refactor(dashboard): change AuthorizationInterceptor to an interface
* refactor(dashboard): change LoginAuthenticationFilter to an interface
* refactor(dashboard): use AuthProperties to manage auth config
* test(dashboard): use NoAuthConfigurationTest to create no auth configuration for testing
linkolen pushed a commit to shivagowda/Sentinel that referenced this pull request Aug 4, 2021
…ns (alibaba#2059)

* refactor(dashboard): use AuthConfiguration to manage the bean of auth
* refactor(dashboard): change AuthorizationInterceptor to an interface
* refactor(dashboard): change LoginAuthenticationFilter to an interface
* refactor(dashboard): use AuthProperties to manage auth config
* test(dashboard): use NoAuthConfigurationTest to create no auth configuration for testing
linkolen pushed a commit to shivagowda/Sentinel that referenced this pull request Aug 4, 2021
…ns (alibaba#2059)

* refactor(dashboard): use AuthConfiguration to manage the bean of auth
* refactor(dashboard): change AuthorizationInterceptor to an interface
* refactor(dashboard): change LoginAuthenticationFilter to an interface
* refactor(dashboard): use AuthProperties to manage auth config
* test(dashboard): use NoAuthConfigurationTest to create no auth configuration for testing
linkolen pushed a commit to shivagowda/Sentinel that referenced this pull request Aug 14, 2021
…ns (alibaba#2059)

* refactor(dashboard): use AuthConfiguration to manage the bean of auth
* refactor(dashboard): change AuthorizationInterceptor to an interface
* refactor(dashboard): change LoginAuthenticationFilter to an interface
* refactor(dashboard): use AuthProperties to manage auth config
* test(dashboard): use NoAuthConfigurationTest to create no auth configuration for testing
linkolen pushed a commit to shivagowda/Sentinel that referenced this pull request Aug 14, 2021
…ns (alibaba#2059)

* refactor(dashboard): use AuthConfiguration to manage the bean of auth
* refactor(dashboard): change AuthorizationInterceptor to an interface
* refactor(dashboard): change LoginAuthenticationFilter to an interface
* refactor(dashboard): use AuthProperties to manage auth config
* test(dashboard): use NoAuthConfigurationTest to create no auth configuration for testing
linkolen pushed a commit to shivagowda/Sentinel that referenced this pull request Aug 16, 2021
…ns (alibaba#2059)

* refactor(dashboard): use AuthConfiguration to manage the bean of auth
* refactor(dashboard): change AuthorizationInterceptor to an interface
* refactor(dashboard): change LoginAuthenticationFilter to an interface
* refactor(dashboard): use AuthProperties to manage auth config
* test(dashboard): use NoAuthConfigurationTest to create no auth configuration for testing
CST11021 pushed a commit to CST11021/Sentinel that referenced this pull request Nov 3, 2021
* fix DefaultLitePullConsumerImpl NPE

* add ut
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dashboard Issues or PRs about Sentinel Dashboard kind/enhancement Category issues or prs related to enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants