Skip to content
This repository was archived by the owner on Aug 26, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions cmd/authsvc/authsec/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ import (
var clientSet kubernetes.Interface
var logger *zap.Logger

const bitSize = 512 // min size for encoding your payload

func generatePassword() string {
chars := []rune("ABCDEFGHIJKLMNOPQRSTUVWXYZ" +
"abcdefghijklmnopqrstuvwxyz" +
Expand Down Expand Up @@ -57,7 +55,7 @@ func initKube() error {

func generatePrivateKey() (*rsa.PrivateKey, error) {
// Private Key generation
privateKey, err := rsa.GenerateKey(rand.Reader, bitSize)
privateKey, err := rsa.GenerateKey(rand.Reader, 2048)
if err != nil {
return nil, err
}
Expand Down
9 changes: 8 additions & 1 deletion cmd/insprd/operators/nodes/converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package nodes

import (
"fmt"
"math"
"os"
"strconv"
"strings"
Expand All @@ -26,7 +27,13 @@ func (no *NodeOperator) dappToService(app *meta.App) *kubeService {
logger.Info("creating kubernetes service")

temp, _ := strconv.Atoi(os.Getenv("INSPR_LBSIDECAR_READ_PORT"))
lbsidecarPort = int32(temp)
if temp > 0 && temp < math.MaxUint16 {
lbsidecarPort = int32(temp)
} else {
// ref http://www.faqs.org/rfcs/rfc793.html
panic("invalid port number. the highest valid TCP / UDP port number is 65535 and the lowest is 1")
}

appID := toAppID(app)
appDeployName := toDeploymentName(app)
appLabels := map[string]string{"inspr-app": appID}
Expand Down