feat: basic authenticator (#254)
Basic authentication is sometimes useful for content that should not be publicly accessible, but does not need the level of security of other authentication methods. Ex. in-development web pages, temporarily hidden content.
It should work in combination with WWW-Authenticate error handler.
Related issue(s)
#254 This issue is quite old, but I today stumbled upon situation where basic authn could be useful to me - so I've decided to implement it.
Checklist
- [x] I have read the contributing guidelines.
- [ ] I have referenced an issue containing the design document if my change introduces a new feature.
- [x] I am following the contributing code guidelines.
- [x] I have read the security policy.
- [x] I confirm that this pull request does not address a security vulnerability. If this pull request addresses a security vulnerability, I confirm that I got the approval (please contact [email protected]) from the maintainers to push the changes.
- [x] I have added tests that prove my fix is effective or that my feature works.
- [ ] I have added or changed the documentation.
Further comments
I will prepare a PR to docs if this feat gets approved.
Codecov Report
Merging #1044 (7444f08) into master (7017fdf) will decrease coverage by
0.68%. The diff coverage is72.50%.
:exclamation: Current head 7444f08 differs from pull request most recent head d1b382c. Consider uploading reports for the commit d1b382c to get more accurate results
@@ Coverage Diff @@
## master #1044 +/- ##
==========================================
- Coverage 78.71% 78.03% -0.69%
==========================================
Files 83 84 +1
Lines 3871 4033 +162
==========================================
+ Hits 3047 3147 +100
- Misses 554 605 +51
- Partials 270 281 +11
| Impacted Files | Coverage Δ | |
|---|---|---|
| pipeline/authn/authenticator_basic.go | 71.79% <71.79%> (ø) |
|
| driver/registry_memory.go | 90.12% <100.00%> (+0.04%) |
:arrow_up: |
| internal/cloudstorage/setup.go | 60.13% <0.00%> (-9.10%) |
:arrow_down: |
| internal/driver.go | 100.00% <0.00%> (+22.22%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
@aeneasr