fix tls and key secrets
This commit is contained in:
@@ -20,6 +20,8 @@ spec:
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: api-env-secret
|
||||
- secretRef:
|
||||
name: optima-keys-secret
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
imagePullSecrets:
|
||||
|
||||
@@ -4,7 +4,8 @@ metadata:
|
||||
name: optima-api-ingress
|
||||
namespace: optima
|
||||
annotations:
|
||||
ingress.kubernetes.io/ssl-redirect: "false"
|
||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||
spec:
|
||||
tls:
|
||||
- secretName: osdci-net-cert
|
||||
|
||||
@@ -16,6 +16,8 @@ spec:
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: api-env-secret
|
||||
- secretRef:
|
||||
name: optima-keys-secret
|
||||
restartPolicy: Never
|
||||
imagePullSecrets:
|
||||
- name: github-container-registry
|
||||
|
||||
+7
-5
@@ -26,21 +26,23 @@ export const refreshTokenDuration = "30d";
|
||||
|
||||
const isProduction = process.env.NODE_ENV === "production";
|
||||
|
||||
const readKeyFile = (path: string) => readFileSync(path).toString();
|
||||
|
||||
export const accessTokenPrivateKey = isProduction
|
||||
? process.env.ACCESS_TOKEN_PRIVATE_KEY!
|
||||
: readFileSync(`.accessToken.key`).toString();
|
||||
: readKeyFile(`.accessToken.key`);
|
||||
export const refreshTokenPrivateKey = isProduction
|
||||
? process.env.REFRESH_TOKEN_PRIVATE_KEY!
|
||||
: readFileSync(`.refreshToken.key`).toString();
|
||||
: readKeyFile(`.refreshToken.key`);
|
||||
export const permissionsPrivateKey = isProduction
|
||||
? process.env.PERMISSIONS_PRIVATE_KEY!
|
||||
: readFileSync(`.permissions.key`).toString();
|
||||
: readKeyFile(`.permissions.key`);
|
||||
export const secureValuesPrivateKey = isProduction
|
||||
? process.env.SECURE_VALUES_PRIVATE_KEY!
|
||||
: readFileSync(`.secureValues.key`).toString();
|
||||
: readKeyFile(`.secureValues.key`);
|
||||
export const secureValuesPublicKey = isProduction
|
||||
? process.env.SECURE_VALUES_PUBLIC_KEY!
|
||||
: readFileSync(`public-keys/.secureValues.pub`).toString();
|
||||
: readKeyFile(`public-keys/.secureValues.pub`);
|
||||
|
||||
// Microsoft Auth Constants
|
||||
const msalConfig: msal.Configuration = {
|
||||
|
||||
Reference in New Issue
Block a user