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

enhancement(auth): basic auth use kcc as backend #305

Merged
merged 1 commit into from
Oct 13, 2023

Conversation

zzzzhhb
Copy link
Collaborator

@zzzzhhb zzzzhhb commented Oct 8, 2023

What type of PR is this?

Enhancements

What this PR does / why we need it:

use kcc as authentication backend store

Which issue(s) this PR fixes:

Special notes for your reviewer:

@zzzzhhb zzzzhhb self-assigned this Oct 8, 2023
@zzzzhhb zzzzhhb added enhancement New feature or request workflow/need-review review: test succeeded, need to review labels Oct 8, 2023
@codecov
Copy link

codecov bot commented Oct 10, 2023

Codecov Report

Attention: 53 lines in your changes are missing coverage. Please review.

Comparison is base (35c0eb0) 53.39% compared to head (852551f) 53.35%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #305      +/-   ##
==========================================
- Coverage   53.39%   53.35%   -0.04%     
==========================================
  Files         401      401              
  Lines       43913    43924      +11     
==========================================
- Hits        23448    23437      -11     
- Misses      17878    17908      +30     
+ Partials     2587     2579       -8     
Flag Coverage Δ
unittest 53.35% <50.92%> (-0.04%) ⬇️

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

Files Coverage Δ
cmd/base/context_fake.go 71.52% <100.00%> (+4.16%) ⬆️
cmd/base/options/auth.go 71.42% <100.00%> (+9.89%) ⬆️
...kg/util/credential/authorization/authorizations.go 80.64% <100.00%> (ø)
pkg/util/credential/authorization/insecure.go 100.00% <100.00%> (ø)
pkg/util/credential/credentials.go 70.00% <100.00%> (ø)
pkg/util/credential/insecure.go 84.61% <100.00%> (ø)
pkg/util/credential/authorization/static.go 28.57% <0.00%> (ø)
pkg/util/credential/authorization/dynamic.go 92.00% <92.00%> (ø)
pkg/util/credential/basic.go 63.51% <78.94%> (+1.54%) ⬆️
cmd/katalyst-agent/app/agent/eviction.go 0.00% <0.00%> (ø)
... and 2 more

... and 10 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zzzzhhb zzzzhhb requested a review from csfldf October 11, 2023 10:59
return verify(authInfo, targetResource, s.subjectToPermissions)
}

func (s *dynamicConfAccessControl) updateAuthInfoFromSecret() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

this function rename toupdateAuthInfoFromDynamicConf maybe more properly?

)

const (
secretSyncInterval = 5 * time.Minute
Copy link
Collaborator

Choose a reason for hiding this comment

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

the interval sync auth config from dynamic config may be too long, just 30s is ok, because the dynamic config use local cache

pkg/util/credential/authorization/dynamic.go Show resolved Hide resolved
pkg/util/credential/basic.go Show resolved Hide resolved
@zzzzhhb zzzzhhb added the workflow/merge-ready merge-ready: code is ready and can be merged label Oct 13, 2023
@zzzzhhb zzzzhhb requested a review from luomingmeng October 13, 2023 08:10
@waynepeking348 waynepeking348 merged commit 38af357 into kubewharf:main Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request workflow/merge-ready merge-ready: code is ready and can be merged workflow/need-review review: test succeeded, need to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants