mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 16:59:22 +02:00
config: add support for policies stored in the databroker (#1099)
* wip * always use databroker config source * add test * valid policy, remove debug lines
This commit is contained in:
parent
821f2e9000
commit
b79e73b8b8
9 changed files with 965 additions and 6 deletions
|
@ -45,7 +45,8 @@ func New(src config.Source) (*Manager, error) {
|
|||
return
|
||||
}
|
||||
|
||||
mgr.Trigger(mgr.GetConfig())
|
||||
cfg = mgr.GetConfig()
|
||||
mgr.Trigger(cfg)
|
||||
})
|
||||
return mgr, nil
|
||||
}
|
||||
|
@ -112,6 +113,7 @@ func (mgr *Manager) updateAutocert(cfg *config.Config) error {
|
|||
cert, err = cm.CacheManagedCertificate(domain)
|
||||
}
|
||||
if err == nil {
|
||||
log.Info().Strs("names", cert.Names).Msg("autocert: added certificate")
|
||||
cfg.Options.Certificates = append(cfg.Options.Certificates, cert.Certificate)
|
||||
} else {
|
||||
log.Error().Err(err).Msg("autocert: failed to obtain client certificate")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue