session(proxy cert):associate session with proxy certificates (#1606)
* ce: session(proxy cert):associate session with proxy certificates
This commit is contained in:
1 parent
509669e260
commit
4527802c76
10 files changed
+382
-35
No files matched your search
@@ -999,7 +999,15 @@ func (s Service) AuthorizeSession(ctx context.Context, req *pbs.AuthorizeSession
|
||||
for _, sw := range selectedWorkers {
|
||||
workerAddresses = append(workerAddresses, sw.Address)
|
||||
}
|
||||
sess, err = sessionRepo.CreateSession(ctx, wrapper, sess, workerAddresses)
|
||||
var proxyCert *session.ProxyCertificate
|
||||
if t.GetProxyServerCertificate() != nil {
|
||||
pc := t.GetProxyServerCertificate()
|
||||
proxyCert = &session.ProxyCertificate{
|
||||
PrivateKey: pc.PrivateKeyPem,
|
||||
Certificate: pc.CertificatePem,
|
||||
}
|
||||
}
|
||||
sess, err = sessionRepo.CreateSession(ctx, wrapper, sess, workerAddresses, session.WithProxyCertificate(proxyCert))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user