Add opt-in built-in Feishu OIDC issuer for OpenVPN
This commit is contained in:
1 parent
6ca609fde4
commit
63cdda4ae1
23 files changed
+1244
-17
No files matched your search
@@ -11,6 +11,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"vpn-platform/backend/internal/identityprovider"
|
||||
"vpn-platform/backend/internal/nginxgateway"
|
||||
"vpn-platform/backend/internal/service"
|
||||
"vpn-platform/backend/internal/tlsservice"
|
||||
@@ -37,10 +38,15 @@ func (s *Server) openvpnOIDCReadiness(c *gin.Context) {
|
||||
}
|
||||
}
|
||||
tls := tlsservice.Status()
|
||||
builtInIssuer, builtInClientID, builtInEnabled := identityprovider.PublicClient()
|
||||
port, _ := authGatewayPort(tls.Domain)
|
||||
issuerRoute, callbackRoute := nginxgateway.AuthRouteReady(port)
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"component_installed": path != "", "component_version": version,
|
||||
"https_management_ready": tls.Mode == "nginx" && tls.Valid && nginxgateway.Stage() == "https",
|
||||
"management_domain": tls.Domain,
|
||||
"authentication_entry_ready": false, // Depends on a distinct callback site and a configured provider.
|
||||
"authentication_entry_ready": port > 0 && callbackRoute,
|
||||
"built_in_issuer": builtInIssuer, "built_in_client_id": builtInClientID,
|
||||
"built_in_enabled": builtInEnabled, "built_in_gateway_ready": issuerRoute,
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user