yahoojapan / athenz-client-sidecar

Moved to https://github.com/AthenZ/athenz-client-sidecar
https://github.com/AthenZ/athenz-client-sidecar
Apache License 2.0
15 stars 5 forks source link

[minor] support mTLS request to ZTS #44

Closed WindzCUHK closed 3 years ago

WindzCUHK commented 4 years ago

Description

Support requesting ZTS with client certificate.

Changes

  1. add enable flag for each sidecar API endpoints
    1. endpoints
      1. ntoken
      2. role token
      3. proxy
    2. hard-coded to true for backward compatibility
      1. inside usecase.New()
      2. remove in next major release
  2. when both client certificate and ntoken are set,
    1. use client certificate (endpoint level) over ntoken (application level)
  3. disable ntokend
    1. when /ntoken is disabled and NO other endpoints uses ntoken

Type of change

Flags

Related issue/PR

Delete if not applicable


Checklist

Checklist for maintainer

codecov-io commented 3 years ago

Codecov Report

Merging #44 (2f0783a) into master (1e6172a) will increase coverage by 1.12%. The diff coverage is 98.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #44      +/-   ##
==========================================
+ Coverage   90.86%   91.98%   +1.12%     
==========================================
  Files          13       13              
  Lines        1127     1136       +9     
==========================================
+ Hits         1024     1045      +21     
+ Misses         79       71       -8     
+ Partials       24       20       -4     
Impacted Files Coverage Δ
usecase/tenantd.go 94.68% <93.33%> (+11.13%) :arrow_up:
config/config.go 100.00% <100.00%> (+11.76%) :arrow_up:
main.go 53.48% <100.00%> (-0.36%) :arrow_down:
router/routes.go 100.00% <100.00%> (ø)
service/access.go 94.14% <100.00%> (+0.22%) :arrow_up:
service/role.go 94.63% <100.00%> (+0.21%) :arrow_up:
service/server.go 94.91% <100.00%> (-0.40%) :arrow_down:
service/svccert.go 92.43% <100.00%> (-0.43%) :arrow_down:
service/tls.go 96.22% <100.00%> (+1.48%) :arrow_up:
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1e6172a...2f0783a. Read the comment docs.