mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-02 19:04:14 +02:00
policy: add new certificate-authority option for downstream mTLS client certificates (#1835)
* policy: add new certificate-authority option for downstream mTLS client certificates * update proto, docs
This commit is contained in:
parent
8e3404e7be
commit
cc85ea601d
15 changed files with 490 additions and 406 deletions
|
@ -6,6 +6,7 @@ import (
|
|||
"encoding/base64"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
@ -634,9 +635,11 @@ func (o *Options) Validate() error {
|
|||
}
|
||||
|
||||
if o.ClientCAFile != "" {
|
||||
if _, err := os.Stat(o.ClientCAFile); err != nil {
|
||||
bs, err := ioutil.ReadFile(o.ClientCAFile)
|
||||
if err != nil {
|
||||
return fmt.Errorf("config: bad client ca file: %w", err)
|
||||
}
|
||||
o.ClientCA = base64.StdEncoding.EncodeToString(bs)
|
||||
}
|
||||
|
||||
// if no service account was defined, there should not be any policies that
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue