mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 03:27:38 +00:00
feat: updated
This commit is contained in:
@@ -196,7 +196,7 @@ func (g *Gateway) Listen(ctx context.Context) error {
|
|||||||
if len(state.PeerCertificates) > 0 {
|
if len(state.PeerCertificates) > 0 {
|
||||||
organizationUnit := state.PeerCertificates[0].Subject.OrganizationalUnit
|
organizationUnit := state.PeerCertificates[0].Subject.OrganizationalUnit
|
||||||
commonName := state.PeerCertificates[0].Subject.CommonName
|
commonName := state.PeerCertificates[0].Subject.CommonName
|
||||||
if organizationUnit[0] != "gateway-client" && commonName != "cloud" {
|
if organizationUnit[0] != "gateway-client" || commonName != "cloud" {
|
||||||
log.Error().Msgf("Client certificate verification failed. Received %s, %s", organizationUnit, commonName)
|
log.Error().Msgf("Client certificate verification failed. Received %s, %s", organizationUnit, commonName)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@@ -262,7 +262,7 @@ func (g *Gateway) registerPermissionLifecycle(permissionFn func() error, done ch
|
|||||||
go func() {
|
go func() {
|
||||||
// wait for 5 mins
|
// wait for 5 mins
|
||||||
permissionFn()
|
permissionFn()
|
||||||
log.Printf("Ceated permission for incoming connections")
|
log.Printf("Created permission for incoming connections")
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case <-done:
|
case <-done:
|
||||||
|
|||||||
Reference in New Issue
Block a user