Add mongo root password

This commit is contained in:
Maidul Islam
2023-02-19 12:52:28 -05:00
parent 20e7eae4fe
commit 5baccc73c9
2 changed files with 42 additions and 38 deletions
+33 -33
View File
@@ -138,7 +138,7 @@ const exchangeCodeAzure = async ({
try { try {
res = (await axios.post( res = (await axios.post(
INTEGRATION_AZURE_TOKEN_URL, INTEGRATION_AZURE_TOKEN_URL,
new URLSearchParams({ new URLSearchParams({
grant_type: 'authorization_code', grant_type: 'authorization_code',
code: code, code: code,
scope: 'https://vault.azure.net/.default openid offline_access', scope: 'https://vault.azure.net/.default openid offline_access',
@@ -147,16 +147,16 @@ const exchangeCodeAzure = async ({
redirect_uri: `${SITE_URL}/integrations/azure-key-vault/oauth2/callback` redirect_uri: `${SITE_URL}/integrations/azure-key-vault/oauth2/callback`
} as any) } as any)
)).data; )).data;
accessExpiresAt.setSeconds( accessExpiresAt.setSeconds(
accessExpiresAt.getSeconds() + res.expires_in accessExpiresAt.getSeconds() + res.expires_in
); );
} catch (err: any) { } catch (err: any) {
Sentry.setUser(null); Sentry.setUser(null);
Sentry.captureException(err); Sentry.captureException(err);
throw new Error('Failed OAuth2 code-token exchange with Azure'); throw new Error('Failed OAuth2 code-token exchange with Azure');
} }
return ({ return ({
accessToken: res.access_token, accessToken: res.access_token,
refreshToken: res.refresh_token, refreshToken: res.refresh_token,
@@ -175,36 +175,36 @@ const exchangeCodeAzure = async ({
* @returns {Date} obj2.accessExpiresAt - date of expiration for access token * @returns {Date} obj2.accessExpiresAt - date of expiration for access token
*/ */
const exchangeCodeHeroku = async ({ const exchangeCodeHeroku = async ({
code code
}: { }: {
code: string; code: string;
}) => { }) => {
let res: ExchangeCodeHerokuResponse; let res: ExchangeCodeHerokuResponse;
const accessExpiresAt = new Date(); const accessExpiresAt = new Date();
try { try {
res = (await axios.post( res = (await axios.post(
INTEGRATION_HEROKU_TOKEN_URL, INTEGRATION_HEROKU_TOKEN_URL,
new URLSearchParams({ new URLSearchParams({
grant_type: 'authorization_code', grant_type: 'authorization_code',
code: code, code: code,
client_secret: CLIENT_SECRET_HEROKU client_secret: CLIENT_SECRET_HEROKU
} as any) } as any)
)).data; )).data;
accessExpiresAt.setSeconds( accessExpiresAt.setSeconds(
accessExpiresAt.getSeconds() + res.expires_in accessExpiresAt.getSeconds() + res.expires_in
); );
} catch (err) { } catch (err) {
Sentry.setUser(null); Sentry.setUser(null);
Sentry.captureException(err); Sentry.captureException(err);
throw new Error('Failed OAuth2 code-token exchange with Heroku'); throw new Error('Failed OAuth2 code-token exchange with Heroku');
} }
return ({ return ({
accessToken: res.access_token, accessToken: res.access_token,
refreshToken: res.refresh_token, refreshToken: res.refresh_token,
accessExpiresAt accessExpiresAt
}); });
} }
/** /**
@@ -234,7 +234,7 @@ const exchangeCodeVercel = async ({ code }: { code: string }) => {
} catch (err) { } catch (err) {
Sentry.setUser(null); Sentry.setUser(null);
Sentry.captureException(err); Sentry.captureException(err);
throw new Error('Failed OAuth2 code-token exchange with Vercel'); throw new Error(`Failed OAuth2 code-token exchange with Vercel [err=${err}]`);
} }
return { return {
+9 -5
View File
@@ -209,6 +209,8 @@ mongodb:
## ##
databases: databases:
- "infisical" - "infisical"
rootPassword: root
rootUser: root
## MongoDB persistence configuration ## MongoDB persistence configuration
## ##
persistence: persistence:
@@ -250,7 +252,7 @@ ingress:
kubernetes.io/ingress.class: "nginx" kubernetes.io/ingress.class: "nginx"
# cert-manager.io/issuer: letsencrypt-nginx # cert-manager.io/issuer: letsencrypt-nginx
## @param ingress.hostName Ingress hostname (your custom domain name) ## @param ingress.hostName Ingress hostname (your custom domain name)
## Replace with your own domain ## Replace with your own domain
## ##
hostName: infisical.local hostName: infisical.local
## @skip ingress.frontend ## @skip ingress.frontend
@@ -264,9 +266,10 @@ ingress:
path: /api path: /api
pathType: Prefix pathType: Prefix
## @param ingress.tls Ingress TLS hosts (matching above hostName) ## @param ingress.tls Ingress TLS hosts (matching above hostName)
## Replace with your own domain ## Replace with your own domain
## ##
tls: [] tls:
[]
# - secretName: letsencrypt-nginx # - secretName: letsencrypt-nginx
# hosts: # hosts:
# - infisical.local # - infisical.local
@@ -338,7 +341,8 @@ mailhog:
ingressClassName: nginx ingressClassName: nginx
## @param mailhog.ingress.annotations Ingress annotations ## @param mailhog.ingress.annotations Ingress annotations
## ##
annotations: {} annotations:
{}
# kubernetes.io/ingress.class: nginx # kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true" # kubernetes.io/tls-acme: "true"
## @param mailhog.ingress.labels Ingress labels ## @param mailhog.ingress.labels Ingress labels
@@ -352,4 +356,4 @@ mailhog:
## ##
paths: paths:
- path: "/" - path: "/"
pathType: Prefix pathType: Prefix