diff --git a/backend/src/ee/services/license/license-fns.ts b/backend/src/ee/services/license/license-fns.ts index fa67b72d1..126f86c41 100644 --- a/backend/src/ee/services/license/license-fns.ts +++ b/backend/src/ee/services/license/license-fns.ts @@ -32,11 +32,11 @@ export const getDefaultOnPremFeatures = (): TFeatureSet => ({ oidcSSO: false, scim: false, ldap: false, - groups: false, + groups: true, status: null, trial_end: null, has_used_trial: true, - secretApproval: false, + secretApproval: true, secretRotation: true, caCrl: false, instanceUserManagement: false, diff --git a/backend/src/ee/services/license/license-types.ts b/backend/src/ee/services/license/license-types.ts index 6e671c26f..b41393b08 100644 --- a/backend/src/ee/services/license/license-types.ts +++ b/backend/src/ee/services/license/license-types.ts @@ -49,11 +49,11 @@ export type TFeatureSet = { oidcSSO: false; scim: false; ldap: false; - groups: false; + groups: true; status: null; trial_end: null; has_used_trial: true; - secretApproval: false; + secretApproval: true; secretRotation: true; caCrl: false; instanceUserManagement: false; diff --git a/backend/src/services/integration-auth/integration-app-list.ts b/backend/src/services/integration-auth/integration-app-list.ts index dd0cb16dc..c20cb9913 100644 --- a/backend/src/services/integration-auth/integration-app-list.ts +++ b/backend/src/services/integration-auth/integration-app-list.ts @@ -455,6 +455,28 @@ const getAppsCircleCI = async ({ accessToken }: { accessToken: string }) => { return apps; }; +/** + * Return list of projects for Databricks integration + */ +const getAppsDatabricks = async ({ accessToken }: { accessToken: string }) => { + const res = await request.get<{ scopes: { name: string; backend_type: string }[] }>( + `${IntegrationUrls.DATABRICKS_API_URL}/2.0/secrets/scopes/list`, + { + headers: { + Authorization: `Bearer ${accessToken}`, + "Accept-Encoding": "application/json" + } + } + ); + + const scopes = res.data.scopes.map((a) => ({ + name: a.name, // name maps to unique scope name in Databricks + backend_type: a.backend_type + })); + + return scopes; +}; + const getAppsTravisCI = async ({ accessToken }: { accessToken: string }) => { const res = ( await request.get<{ id: string; slug: string }[]>(`${IntegrationUrls.TRAVISCI_API_URL}/repos`, { @@ -1104,6 +1126,11 @@ export const getApps = async ({ accessToken }); + case Integrations.DATABRICKS: + return getAppsDatabricks({ + accessToken + }); + case Integrations.LARAVELFORGE: return getAppsLaravelForge({ accessToken, diff --git a/backend/src/services/integration-auth/integration-sync-secret.ts b/backend/src/services/integration-auth/integration-sync-secret.ts index 5085d4253..a335bce4e 100644 --- a/backend/src/services/integration-auth/integration-sync-secret.ts +++ b/backend/src/services/integration-auth/integration-sync-secret.ts @@ -2085,6 +2085,76 @@ const syncSecretsCircleCI = async ({ ); }; +/** + * Sync/push [secrets] to Databricks project + */ +const syncSecretsDatabricks = async ({ + integration, + secrets, + accessToken +}: { + integration: TIntegrations; + secrets: Record; + accessToken: string; +}) => { + // sync secrets to Databricks + await Promise.all( + Object.keys(secrets).map(async (key) => + request.post( + `${IntegrationUrls.DATABRICKS_API_URL}/2.0/secrets/put`, + { + scope: integration.app, + key, + string_value: secrets[key].value + }, + { + headers: { + Authorization: `Bearer ${accessToken}`, + "Accept-Encoding": "application/json" + } + } + ) + ) + ); + + // get secrets from Databricks + const getSecretsRes = ( + await request.get<{ secrets: { key: string; last_updated_timestamp: number }[] }>( + `${IntegrationUrls.DATABRICKS_API_URL}/2.0/secrets/list`, + { + headers: { + Authorization: `Bearer ${accessToken}`, + "Content-Type": "application/json" + }, + params: { + scope: integration.app + } + } + ) + ).data.secrets; + + // delete secrets from Databricks + await Promise.all( + getSecretsRes.map(async (sec) => { + if (!(sec.key in secrets)) { + return request.post( + `${IntegrationUrls.DATABRICKS_API_URL}/2.0/secrets/delete`, + { + scope: integration.app, + key: sec.key + }, + { + headers: { + Authorization: `Bearer ${accessToken}`, + "Content-Type": "application/json" + } + } + ); + } + }) + ); +}; + /** * Sync/push [secrets] to TravisCI project */ @@ -4021,6 +4091,13 @@ export const syncIntegrationSecrets = async ({ accessToken }); break; + case Integrations.DATABRICKS: + await syncSecretsDatabricks({ + integration, + secrets, + accessToken + }); + break; case Integrations.LARAVELFORGE: await syncSecretsLaravelForge({ integration, diff --git a/docs/images/integrations/databricks/integrations-databricks-auth.png b/docs/images/integrations/databricks/integrations-databricks-auth.png new file mode 100644 index 000000000..dc640f68a Binary files /dev/null and b/docs/images/integrations/databricks/integrations-databricks-auth.png differ diff --git a/docs/images/integrations/databricks/integrations-databricks-create.png b/docs/images/integrations/databricks/integrations-databricks-create.png new file mode 100644 index 000000000..058f08369 Binary files /dev/null and b/docs/images/integrations/databricks/integrations-databricks-create.png differ diff --git a/docs/images/integrations/databricks/integrations-databricks.png b/docs/images/integrations/databricks/integrations-databricks.png new file mode 100644 index 000000000..f48f6b95a Binary files /dev/null and b/docs/images/integrations/databricks/integrations-databricks.png differ diff --git a/docs/images/integrations/databricks/pat-token.png b/docs/images/integrations/databricks/pat-token.png new file mode 100644 index 000000000..02a264710 Binary files /dev/null and b/docs/images/integrations/databricks/pat-token.png differ diff --git a/docs/integrations/cicd/circleci.mdx b/docs/integrations/cicd/circleci.mdx index ed14b891e..0753f40f7 100644 --- a/docs/integrations/cicd/circleci.mdx +++ b/docs/integrations/cicd/circleci.mdx @@ -21,12 +21,6 @@ Prerequisites: ![integrations circleci authorization](../../images/integrations/circleci/integrations-circleci-auth.png) - - If this is your project's first cloud integration, then you'll have to grant - Infisical access to your project's environment variables. Although this step - breaks E2EE, it's necessary for Infisical to sync the environment variables to - the cloud platform. - Select which Infisical environment secrets you want to sync to which CircleCI project and press create integration to start syncing secrets to CircleCI. diff --git a/docs/integrations/cicd/codefresh.mdx b/docs/integrations/cicd/codefresh.mdx index e41e00f50..cf69ae04d 100644 --- a/docs/integrations/cicd/codefresh.mdx +++ b/docs/integrations/cicd/codefresh.mdx @@ -22,12 +22,6 @@ Prerequisites: ![integrations codefresh authorization](../../images/integrations/codefresh/integrations-codefresh-auth.png) - - If this is your project's first cloud integration, then you'll have to grant - Infisical access to your project's environment variables. Although this step - breaks E2EE, it's necessary for Infisical to sync the environment variables to - the cloud platform. - Select which Infisical environment secrets you want to sync to which Codefresh service and press create integration to start syncing secrets to Codefresh. diff --git a/docs/integrations/cicd/githubactions.mdx b/docs/integrations/cicd/githubactions.mdx index 93b1347f7..607a58d36 100644 --- a/docs/integrations/cicd/githubactions.mdx +++ b/docs/integrations/cicd/githubactions.mdx @@ -27,10 +27,6 @@ Prerequisites: ![integrations github authorization](../../images/integrations/github/integrations-github-auth.png) - - If this is your project's first cloud integration, then you'll have to grant Infisical access to your project's environment variables. - Although this step breaks E2EE, it's necessary for Infisical to sync the environment variables to the cloud platform. - Select which Infisical environment secrets you want to sync to which GitHub organization, repository, or repository environment. diff --git a/docs/integrations/cicd/gitlab.mdx b/docs/integrations/cicd/gitlab.mdx index c6d72a11e..2da61ef77 100644 --- a/docs/integrations/cicd/gitlab.mdx +++ b/docs/integrations/cicd/gitlab.mdx @@ -20,12 +20,6 @@ description: "How to sync secrets from Infisical to GitLab" ![integrations gitlab authorization](../../images/integrations/gitlab/integrations-gitlab-auth.png) - - If this is your project's first cloud integration, then you'll have to grant - Infisical access to your project's environment variables. Although this step - breaks E2EE, it's necessary for Infisical to sync the environment variables to - the cloud platform. - Select which Infisical environment secrets you want to sync to which GitLab repository and press create integration to start syncing secrets to GitLab. diff --git a/docs/integrations/cicd/rundeck.mdx b/docs/integrations/cicd/rundeck.mdx index a0743fd01..bda7d8162 100644 --- a/docs/integrations/cicd/rundeck.mdx +++ b/docs/integrations/cicd/rundeck.mdx @@ -21,13 +21,6 @@ Prerequisites: ![integrations rundeck authorization](../../images/integrations/rundeck/integrations-rundeck-auth.png) - - If this is your project's first cloud integration, then you'll have to grant - Infisical access to your project's environment variables. Although this step - breaks E2EE, it's necessary for Infisical to sync the environment variables to - the cloud platform. - - Select which Infisical environment secrets you want to sync to a Rundeck Key Storage Path and press create integration to start syncing secrets to Rundeck. diff --git a/docs/integrations/cicd/travisci.mdx b/docs/integrations/cicd/travisci.mdx index 4e70c7696..873c371b6 100644 --- a/docs/integrations/cicd/travisci.mdx +++ b/docs/integrations/cicd/travisci.mdx @@ -21,12 +21,6 @@ Prerequisites: ![integrations travis ci authorization](../../images/integrations/travis-ci/integrations-travisci-auth.png) - - If this is your project's first cloud integration, then you'll have to grant - Infisical access to your project's environment variables. Although this step - breaks E2EE, it's necessary for Infisical to sync the environment variables to - the cloud platform. - Select which Infisical environment secrets you want to sync to which Travis CI repository and press create integration to start syncing secrets to Travis CI. diff --git a/docs/integrations/cloud/aws-parameter-store.mdx b/docs/integrations/cloud/aws-parameter-store.mdx index 467789647..9ce84bd22 100644 --- a/docs/integrations/cloud/aws-parameter-store.mdx +++ b/docs/integrations/cloud/aws-parameter-store.mdx @@ -60,13 +60,6 @@ Prerequisites: ![integration auth](../../images/integrations/aws/integrations-aws-parameter-store-auth.png) - - If this is your project's first cloud integration, then you'll have to grant - Infisical access to your project's environment variables. Although this step - breaks E2EE, it's necessary for Infisical to sync the environment variables to - the cloud platform. - - Select which Infisical environment secrets you want to sync to which AWS Parameter Store region and indicate the path for your secrets. Then, press create integration to start syncing secrets to AWS Parameter Store. diff --git a/docs/integrations/cloud/checkly.mdx b/docs/integrations/cloud/checkly.mdx index 618082a3b..00ec38d2f 100644 --- a/docs/integrations/cloud/checkly.mdx +++ b/docs/integrations/cloud/checkly.mdx @@ -22,12 +22,6 @@ Prerequisites: ![integrations checkly authorization](../../images/integrations/checkly/integrations-checkly-auth.png) - - If this is your project's first cloud integration, then you'll have to grant - Infisical access to your project's environment variables. Although this step - breaks E2EE, it's necessary for Infisical to sync the environment variables to - the cloud platform. - Select which Infisical environment secrets you want to sync to Checkly and press create integration to start syncing secrets. diff --git a/docs/integrations/cloud/cloud-66.mdx b/docs/integrations/cloud/cloud-66.mdx index ab362137c..c087f6564 100644 --- a/docs/integrations/cloud/cloud-66.mdx +++ b/docs/integrations/cloud/cloud-66.mdx @@ -31,13 +31,6 @@ Copy and save your token. Click on the Cloud 66 tile and enter your API token to grant Infisical access to your Cloud 66 account. ![integrations cloud 66 tile in infisical dashboard](../../images/integrations/cloud-66/integrations-cloud-66-infisical-dashboard.png) - - If this is your project's first cloud integration, then you'll have to grant - Infisical access to your project's environment variables. Although this step - breaks E2EE, it's necessary for Infisical to sync the environment variables to - the cloud platform. - - Enter your Cloud 66 Personal Access Token here. Then click "Connect to Cloud 66". ![integrations cloud 66 tile in infisical dashboard](../../images/integrations/cloud-66/integrations-cloud-66-paste-pat.png) diff --git a/docs/integrations/cloud/cloudflare-pages.mdx b/docs/integrations/cloud/cloudflare-pages.mdx index 4d28cc574..addba4fcd 100644 --- a/docs/integrations/cloud/cloudflare-pages.mdx +++ b/docs/integrations/cloud/cloudflare-pages.mdx @@ -29,12 +29,6 @@ Prerequisites: ![integrations cloudflare authorization](../../images/integrations/cloudflare/integrations-cloudflare-auth.png) - - If this is your project's first cloud integration, then you'll have to grant - Infisical access to your project's environment variables. Although this step - breaks E2EE, it's necessary for Infisical to sync the environment variables to - the cloud platform. - Select which Infisical environment secrets you want to sync to Cloudflare and press create integration to start syncing secrets. diff --git a/docs/integrations/cloud/cloudflare-workers.mdx b/docs/integrations/cloud/cloudflare-workers.mdx index 9a126a0e3..10a579701 100644 --- a/docs/integrations/cloud/cloudflare-workers.mdx +++ b/docs/integrations/cloud/cloudflare-workers.mdx @@ -29,13 +29,6 @@ Prerequisites: ![integrations cloudflare authorization](../../images/integrations/cloudflare/integration-cloudflare-workers-connect.png) - - If this is your project's first cloud integration, then you'll have to grant - Infisical access to your project's environment variables. Although this step - breaks E2EE, it's necessary for Infisical to sync the environment variables to - the cloud platform. - - Select which Infisical environment secrets you want to sync to Cloudflare Workers and press create integration to start syncing secrets. diff --git a/docs/integrations/cloud/databricks.mdx b/docs/integrations/cloud/databricks.mdx new file mode 100644 index 000000000..f4597f272 --- /dev/null +++ b/docs/integrations/cloud/databricks.mdx @@ -0,0 +1,31 @@ +--- +title: "Databricks" +description: "Learn how to sync secrets from Infisical to Databricks." +--- + +Prerequisites: + +- Set up and add secrets to [Infisical Cloud](https://app.infisical.com) + + + + Obtain a Personal Access Token in User Settings > Developer > Access Tokens + + ![integrations databricks token](../../images/integrations/databricks/pat-token.png) + + Navigate to your project's integrations tab in Infisical. + + ![integrations](../../images/integrations.png) + + Press on the Databricks tile and input your Databricks Access Token to grant Infisical the necessary permissions in your Databricks account. + + ![integrations databricks authorization](../../images/integrations/databricks/integrations-databricks-auth.png) + + + + Select which Infisical environment and secret path you want to sync to which Databricks scope. Then, press create integration to start syncing secrets to Databricks. + + ![create integration Databricks](../../images/integrations/databricks/integrations-databricks-create.png) + ![integrations Databricks](../../images/integrations/databricks/integrations-databricks.png) + + \ No newline at end of file diff --git a/docs/integrations/cloud/digital-ocean-app-platform.mdx b/docs/integrations/cloud/digital-ocean-app-platform.mdx index 1ed255a48..a0ed545cc 100644 --- a/docs/integrations/cloud/digital-ocean-app-platform.mdx +++ b/docs/integrations/cloud/digital-ocean-app-platform.mdx @@ -20,13 +20,6 @@ Name it **infisical**, choose **No expiry**, and make sure to check **Write (opt Click on the **Digital Ocean App Platform** tile and enter your API token to grant Infisical access to your Digital Ocean account. ![integrations](../../images/integrations.png) - - If this is your project's first cloud integration, then you'll have to grant - Infisical access to your project's environment variables. Although this step - breaks E2EE, it's necessary for Infisical to sync the environment variables to - the cloud platform. - - Then enter your Digital Ocean Personal Access Token here. Then click "Connect to Digital Ocean App Platform". ![integrations infisical dashboard digital ocean integration](../../images/integrations/digital-ocean/integrations-do-enter-token.png) diff --git a/docs/integrations/cloud/flyio.mdx b/docs/integrations/cloud/flyio.mdx index 71b24e2a9..2aa14a919 100644 --- a/docs/integrations/cloud/flyio.mdx +++ b/docs/integrations/cloud/flyio.mdx @@ -22,12 +22,6 @@ Prerequisites: ![integrations fly authorization](../../images/integrations/flyio/integrations-flyio-auth.png) - - If this is your project's first cloud integration, then you'll have to grant - Infisical access to your project's environment variables. Although this step - breaks E2EE, it's necessary for Infisical to sync the environment variables to - the cloud platform. - Select which Infisical environment secrets you want to sync to which Fly.io app and press create integration to start syncing secrets to Fly.io. diff --git a/docs/integrations/cloud/gcp-secret-manager.mdx b/docs/integrations/cloud/gcp-secret-manager.mdx index 99edcd115..e57a976f0 100644 --- a/docs/integrations/cloud/gcp-secret-manager.mdx +++ b/docs/integrations/cloud/gcp-secret-manager.mdx @@ -24,12 +24,6 @@ description: "How to sync secrets from Infisical to GCP Secret Manager" ![integrations GCP authorization](../../images/integrations/gcp-secret-manager/integrations-gcp-secret-manager-auth.png) - - If this is your project's first cloud integration, then you'll have to grant - Infisical access to your project's environment variables. Although this step - breaks E2EE, it's necessary for Infisical to sync the environment variables to - the cloud platform. - In the **Connection** tab, select which Infisical environment secrets you want to sync to which GCP secret manager project. Lastly, press create integration to start syncing secrets to GCP secret manager. @@ -85,12 +79,6 @@ description: "How to sync secrets from Infisical to GCP Secret Manager" ![integrations GCP authorization options](../../images/integrations/gcp-secret-manager/integrations-gcp-secret-manager-auth-options.png) - - If this is your project's first cloud integration, then you'll have to grant - Infisical access to your project's environment variables. Although this step - breaks E2EE, it's necessary for Infisical to sync the environment variables to - the cloud platform. - In the **Connection** tab, select which Infisical environment secrets you want to sync to the GCP secret manager project. Lastly, press create integration to start syncing secrets to GCP secret manager. diff --git a/docs/integrations/cloud/hasura-cloud.mdx b/docs/integrations/cloud/hasura-cloud.mdx index 48d9d301b..f88c1eb50 100644 --- a/docs/integrations/cloud/hasura-cloud.mdx +++ b/docs/integrations/cloud/hasura-cloud.mdx @@ -21,12 +21,6 @@ Prerequisites: ![integrations hasura cloud authorization](../../images/integrations/hasura-cloud/integrations-hasura-cloud-auth.png) - - If this is your project's first cloud integration, then you'll have to grant - Infisical access to your project's environment variables. Although this step - breaks E2EE, it's necessary for Infisical to sync the environment variables to - the cloud platform. - Select which Infisical environment secrets you want to sync to which Hasura Cloud project and press create integration to start syncing secrets to Hasura Cloud. diff --git a/docs/integrations/cloud/heroku.mdx b/docs/integrations/cloud/heroku.mdx index 903ab8270..a63c3f381 100644 --- a/docs/integrations/cloud/heroku.mdx +++ b/docs/integrations/cloud/heroku.mdx @@ -19,12 +19,6 @@ description: "How to sync secrets from Infisical to Heroku" ![integrations heroku authorization](../../images/integrations/heroku/integrations-heroku-auth.png) - - If this is your project's first cloud integration, then you'll have to grant - Infisical access to your project's environment variables. Although this step - breaks E2EE, it's necessary for Infisical to sync the environment variables to - the cloud platform. - Select which Infisical environment secrets you want to sync to which Heroku app and press create integration to start syncing secrets to Heroku. diff --git a/docs/integrations/cloud/laravel-forge.mdx b/docs/integrations/cloud/laravel-forge.mdx index 5797692ea..c58c4a7be 100644 --- a/docs/integrations/cloud/laravel-forge.mdx +++ b/docs/integrations/cloud/laravel-forge.mdx @@ -27,12 +27,6 @@ Prerequisites: ![integrations laravel forge authorization](../../images/integrations/laravel-forge/integrations-laravelforge-auth.png) - - If this is your project's first cloud integration, then you'll have to grant - Infisical access to your project's environment variables. Although this step - breaks E2EE, it's necessary for Infisical to sync the environment variables to - the cloud platform. - Select which Infisical environment secrets you want to sync to which Laravel Forge site and press create integration to start syncing secrets to Laravel Forge. diff --git a/docs/integrations/cloud/netlify.mdx b/docs/integrations/cloud/netlify.mdx index f9b20abda..f793aae10 100644 --- a/docs/integrations/cloud/netlify.mdx +++ b/docs/integrations/cloud/netlify.mdx @@ -25,12 +25,6 @@ description: "How to sync secrets from Infisical to Netlify" ![integrations netlify authorization](../../images/integrations/netlify/integrations-netlify-auth.png) - - If this is your project's first cloud integration, then you'll have to grant - Infisical access to your project's environment variables. Although this step - breaks E2EE, it's necessary for Infisical to sync the environment variables to - the cloud platform. - Select which Infisical environment secrets you want to sync to which Netlify app and context. Lastly, press create integration to start syncing secrets to Netlify. diff --git a/docs/integrations/cloud/northflank.mdx b/docs/integrations/cloud/northflank.mdx index 117ac73a8..10dcb288e 100644 --- a/docs/integrations/cloud/northflank.mdx +++ b/docs/integrations/cloud/northflank.mdx @@ -23,12 +23,6 @@ Prerequisites: ![integrations northflank authorization](../../images/integrations/northflank/integrations-northflank-auth.png) - - If this is your project's first cloud integration, then you'll have to grant - Infisical access to your project's environment variables. Although this step - breaks E2EE, it's necessary for Infisical to sync the environment variables to - the cloud platform. - Select which Infisical environment secrets you want to sync to which Northflank project and secret group. Finally, press create integration to start syncing secrets to Northflank. diff --git a/docs/integrations/cloud/qovery.mdx b/docs/integrations/cloud/qovery.mdx index 6eae9b954..13aa6af46 100644 --- a/docs/integrations/cloud/qovery.mdx +++ b/docs/integrations/cloud/qovery.mdx @@ -21,12 +21,6 @@ Prerequisites: ![integrations qovery authorization](../../images/integrations/qovery/integrations-qovery-auth.png) - - If this is your project's first cloud integration, then you'll have to grant - Infisical access to your project's environment variables. Although this step - breaks E2EE, it is necessary for Infisical to sync the environment variables to - the cloud platform. - Select which Infisical environment secrets you want to sync to Qovery and press create integration to start syncing secrets. diff --git a/docs/integrations/cloud/railway.mdx b/docs/integrations/cloud/railway.mdx index 3f08d75a0..77b315517 100644 --- a/docs/integrations/cloud/railway.mdx +++ b/docs/integrations/cloud/railway.mdx @@ -30,12 +30,6 @@ Prerequisites: ![integrations railway authorization](../../images/integrations/railway/integrations-railway-authorization.png) - - If this is your project's first cloud integration, then you'll have to grant - Infisical access to your project's environment variables. Although this step - breaks E2EE, it's necessary for Infisical to sync the environment variables to - the cloud platform. - Select which Infisical environment secrets you want to sync to which Railway project and environment (and optionally service). Lastly, press create integration to start syncing secrets to Railway. diff --git a/docs/integrations/cloud/render.mdx b/docs/integrations/cloud/render.mdx index 970789a31..366316171 100644 --- a/docs/integrations/cloud/render.mdx +++ b/docs/integrations/cloud/render.mdx @@ -22,12 +22,6 @@ Prerequisites: ![integrations render authorization](../../images/integrations/render/integrations-render-auth.png) - - If this is your project's first cloud integration, then you'll have to grant - Infisical access to your project's environment variables. Although this step - breaks E2EE, it's necessary for Infisical to sync the environment variables to - the cloud platform. - Select which Infisical environment secrets you want to sync to which Render service and press create integration to start syncing secrets to Render. diff --git a/docs/integrations/cloud/supabase.mdx b/docs/integrations/cloud/supabase.mdx index 3e94c0f51..b5179c45f 100644 --- a/docs/integrations/cloud/supabase.mdx +++ b/docs/integrations/cloud/supabase.mdx @@ -28,12 +28,6 @@ Prerequisites: ![integrations supabase authorization](../../images/integrations/supabase/integrations-supabase-authorization.png) - - If this is your project's first cloud integration, then you'll have to grant - Infisical access to your project's environment variables. Although this step - breaks E2EE, it's necessary for Infisical to sync the environment variables to - the cloud platform. - Select which Infisical environment secrets you want to sync to which Supabase project. Lastly, press create integration to start syncing secrets to Supabase. diff --git a/docs/integrations/cloud/teamcity.mdx b/docs/integrations/cloud/teamcity.mdx index 20a9dfbea..3e713cc6a 100644 --- a/docs/integrations/cloud/teamcity.mdx +++ b/docs/integrations/cloud/teamcity.mdx @@ -28,12 +28,6 @@ Prerequisites: ![integrations teamcity authorization](../../images/integrations/teamcity/integrations-teamcity-auth.png) - - If this is your project's first cloud integration, then you'll have to grant - Infisical access to your project's environment variables. Although this step - breaks E2EE, it's necessary for Infisical to sync the environment variables to - the cloud platform. - Select which Infisical environment secrets you want to sync to which TeamCity project (and optionally build configuration) and press create integration to start syncing secrets to TeamCity. diff --git a/docs/integrations/cloud/windmill.mdx b/docs/integrations/cloud/windmill.mdx index 0fc6fddeb..d0b2b9643 100644 --- a/docs/integrations/cloud/windmill.mdx +++ b/docs/integrations/cloud/windmill.mdx @@ -22,12 +22,6 @@ Prerequisites: ![integrations windmill authorization](../../images/integrations/windmill/integrations-windmill-auth.png) - - If this is your project's first cloud integration, then you'll have to grant - Infisical access to your project's environment variables. Although this step - breaks E2EE, it's necessary for Infisical to sync the environment variables to - the cloud platform. - Select which Infisical environment secrets you want to sync to which Windmill workspace and press create integration to start syncing secrets to Windmill. diff --git a/frontend/public/data/frequentConstants.ts b/frontend/public/data/frequentConstants.ts index 1fd7e7789..80cb51028 100644 --- a/frontend/public/data/frequentConstants.ts +++ b/frontend/public/data/frequentConstants.ts @@ -16,6 +16,7 @@ const integrationSlugNameMapping: Mapping = { railway: "Railway", flyio: "Fly.io", circleci: "CircleCI", + databricks: "Databricks", travisci: "TravisCI", supabase: "Supabase", checkly: "Checkly", diff --git a/frontend/public/images/integrations/Databricks.png b/frontend/public/images/integrations/Databricks.png new file mode 100644 index 000000000..ec0ddbc02 Binary files /dev/null and b/frontend/public/images/integrations/Databricks.png differ diff --git a/frontend/src/pages/integrations/databricks/authorize.tsx b/frontend/src/pages/integrations/databricks/authorize.tsx new file mode 100644 index 000000000..1c0e1c7f5 --- /dev/null +++ b/frontend/src/pages/integrations/databricks/authorize.tsx @@ -0,0 +1,102 @@ +import { useState } from "react"; +import Head from "next/head"; +import Image from "next/image"; +import Link from "next/link"; +import { useRouter } from "next/router"; +import { faArrowUpRightFromSquare, faBookOpen } from "@fortawesome/free-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; + +import { useSaveIntegrationAccessToken } from "@app/hooks/api"; + +import { Button, Card, CardTitle, FormControl, Input } from "../../../components/v2"; + +export default function DatabricksCreateIntegrationPage() { + const router = useRouter(); + const { mutateAsync } = useSaveIntegrationAccessToken(); + + const [apiKey, setApiKey] = useState(""); + const [apiKeyErrorText, setApiKeyErrorText] = useState(""); + const [isLoading, setIsLoading] = useState(false); + + const handleButtonClick = async () => { + try { + setApiKeyErrorText(""); + if (apiKey.length === 0) { + setApiKeyErrorText("API Key cannot be blank"); + return; + } + + setIsLoading(true); + + const integrationAuth = await mutateAsync({ + workspaceId: localStorage.getItem("projectData.id"), + integration: "databricks", + accessToken: apiKey + }); + + setIsLoading(false); + + router.push(`/integrations/databricks/create?integrationAuthId=${integrationAuth.id}`); + } catch (err) { + console.error(err); + } + }; + + return ( +
+ + Authorize Databricks Integration + + + + +
+
+ Databricks logo +
+ Databricks Integration + + +
+ + Docs + +
+
+ +
+
+ + setApiKey(e.target.value)} /> + + +
+
+ ); +} + +DatabricksCreateIntegrationPage.requireAuth = true; diff --git a/frontend/src/pages/integrations/databricks/create.tsx b/frontend/src/pages/integrations/databricks/create.tsx new file mode 100644 index 000000000..a4764e684 --- /dev/null +++ b/frontend/src/pages/integrations/databricks/create.tsx @@ -0,0 +1,251 @@ +import { useEffect, useState } from "react"; +import Head from "next/head"; +import Image from "next/image"; +import Link from "next/link"; +import { useRouter } from "next/router"; +import { + faArrowUpRightFromSquare, + faBookOpen, + faBugs, + faCircleInfo +} from "@fortawesome/free-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import queryString from "query-string"; + +import { createNotification } from "@app/components/notifications"; +import { useCreateIntegration } from "@app/hooks/api"; + +import { + Button, + Card, + CardTitle, + FormControl, + Input, + Select, + SelectItem +} from "../../../components/v2"; +import { + useGetIntegrationAuthApps, + useGetIntegrationAuthById +} from "../../../hooks/api/integrationAuth"; +import { useGetWorkspaceById } from "../../../hooks/api/workspace"; + +export default function DatabricksCreateIntegrationPage() { + const router = useRouter(); + const { mutateAsync } = useCreateIntegration(); + + const { integrationAuthId } = queryString.parse(router.asPath.split("?")[1]); + + console.log("integrationAuthId", integrationAuthId) + + const { data: workspace } = useGetWorkspaceById(localStorage.getItem("projectData.id") ?? ""); + const { data: integrationAuth, isLoading: isintegrationAuthLoading } = useGetIntegrationAuthById( + (integrationAuthId as string) ?? "" + ); + + console.log("integrationAuth", integrationAuth) + const { data: integrationAuthScopes, isLoading: isIntegrationAuthScopesLoading } = + useGetIntegrationAuthApps({ + integrationAuthId: (integrationAuthId as string) ?? "" + }); + + console.log("integrationAuthScopes", integrationAuthScopes) + const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState(""); + const [targetScope, setTargetScope] = useState(""); + const [secretPath, setSecretPath] = useState("/"); + + const [isLoading, setIsLoading] = useState(false); + + useEffect(() => { + if (workspace) { + setSelectedSourceEnvironment(workspace.environments[0].slug); + } + }, [workspace]); + + const handleButtonClick = async () => { + try { + if (!integrationAuth?.id) return; + + if (!targetScope) { + createNotification({ + type: "error", + text: "Please select a scope" + }); + setIsLoading(false); + return; + } + + setIsLoading(true); + + const selectedScope = integrationAuthScopes?.find( + (integrationAuthScope) => integrationAuthScope.name === targetScope + ); + + if (!selectedScope) { + createNotification({ + type: "error", + text: "Invalid scope selected" + }); + setIsLoading(false); + return; + } + + await mutateAsync({ + integrationAuthId: integrationAuth?.id, + isActive: true, + app: selectedScope.name, // scope name + sourceEnvironment: selectedSourceEnvironment, + secretPath + }); + + setIsLoading(false); + + router.push(`/integrations/${localStorage.getItem("projectData.id")}`); + } catch (err) { + console.error(err); + } + }; + + return integrationAuth && workspace && selectedSourceEnvironment && integrationAuthScopes ? ( +
+ + Set Up Databricks Integration + + + + +
+
+ Databricks logo +
+ Databricks Integration + + +
+ + Docs + +
+
+ +
+
+ + + + + + setSecretPath(evt.target.value)} + placeholder="Provide a path, default is /" + /> + + + {integrationAuthScopes && ( + + + + )} + +
+
+
+
+ {" "} + Pro Tip +
+ + After creating an integration, your secrets will start syncing immediately. This might + cause an unexpected override of current secrets in Databricks with secrets from Infisical. + +
+
+ ) : ( +
+ + Set Up Databricks Integration + + + {isIntegrationAuthScopesLoading || isintegrationAuthLoading ? ( + infisical loading indicator + ) : ( +
+ +

+ Something went wrong. Please contact{" "} + + support@infisical.com + {" "} + if the issue persists. +

+
+ )} +
+ ); +} + +DatabricksCreateIntegrationPage.requireAuth = true; diff --git a/frontend/src/views/IntegrationsPage/IntegrationPage.utils.tsx b/frontend/src/views/IntegrationsPage/IntegrationPage.utils.tsx index 69d603f20..18b9022ca 100644 --- a/frontend/src/views/IntegrationsPage/IntegrationPage.utils.tsx +++ b/frontend/src/views/IntegrationsPage/IntegrationPage.utils.tsx @@ -74,6 +74,9 @@ export const redirectForProviderAuth = (integrationOption: TCloudIntegration) => case "circleci": link = `${window.location.origin}/integrations/circleci/authorize`; break; + case "databricks": + link = `${window.location.origin}/integrations/databricks/authorize`; + break; case "laravel-forge": link = `${window.location.origin}/integrations/laravel-forge/authorize`; break;