Skip to content

Commit

Permalink
Update folder structure
Browse files Browse the repository at this point in the history
  • Loading branch information
vmatsiiako committed Nov 26, 2022
1 parent 6fcf35a commit c108949
Show file tree
Hide file tree
Showing 21 changed files with 30 additions and 104 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Not sure where to get started? [Book a free, non-pressure pairing sessions with

- [GitHub Discussions](https://github.com/Infisical/infisical/discussions) for help with building and discussion.
- [GitHub Issues](https://github.com/Infisical/infisical-cli/issues) for any bugs and errors you encounter using Infisical.
- [Community Slack](https://join.slack.com/t/infisical/shared_invite/zt-1dgg63ln8-G7PCNJdCymAT9YF3j1ewVA) for hanging out with the community and quick communication with the team.
- [Community Slack](https://join.slack.com/t/infisical-users/shared_invite/zt-1kdbk07ro-RtoyEt_9E~fyzGo_xQYP6g) for hanging out with the community and quick communication with the team.

## Status

Expand Down
2 changes: 1 addition & 1 deletion frontend/components/basic/dialog/AddServiceTokenDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import nacl from "tweetnacl";
import addServiceToken from "~/pages/api/serviceToken/addServiceToken";
import getLatestFileKey from "~/pages/api/workspace/getLatestFileKey";

import { decryptAssymmetric, encryptAssymmetric } from "../../utilities/crypto";
import { decryptAssymmetric, encryptAssymmetric } from "../../utilities/cryptography/crypto";
import Button from "../buttons/Button";
import InputField from "../InputField";
import ListBox from "../Listbox";
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/basic/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import createWorkspace from "~/pages/api/workspace/createWorkspace";
import getWorkspaces from "~/pages/api/workspace/getWorkspaces";

import NavBarDashboard from "../navigation/NavBarDashboard";
import { decryptAssymmetric, encryptAssymmetric } from "../utilities/crypto";
import { decryptAssymmetric, encryptAssymmetric } from "../utilities/cryptography/crypto";
import Button from "./buttons/Button";
import AddWorkspaceDialog from "./dialog/AddWorkspaceDialog";
import Listbox from "./Listbox";
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/basic/table/UserTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Listbox from "../Listbox";
const {
decryptAssymmetric,
encryptAssymmetric,
} = require("../../utilities/crypto");
} = require("../../utilities/cryptography/crypto");
const nacl = require("tweetnacl");
nacl.util = require("tweetnacl-util");

Expand Down
75 changes: 0 additions & 75 deletions frontend/components/billing/Card.js

This file was deleted.

4 changes: 2 additions & 2 deletions frontend/components/navigation/NavBarDashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import guidGenerator from "../utilities/randomId";
const supportOptions = [
[
<FontAwesomeIcon className="text-lg pl-1.5 pr-3" icon={faSlack} />,
"[NEW] Join Slack Forum",
"https://join.slack.com/t/infisical/shared_invite/zt-1dgg63ln8-G7PCNJdCymAT9YF3j1ewVA",
"Join Slack Forum",
"https://join.slack.com/t/infisical-users/shared_invite/zt-1kdbk07ro-RtoyEt_9E~fyzGo_xQYP6g",
],
[
<FontAwesomeIcon className="text-lg pl-1.5 pr-3" icon={faBook} />,
Expand Down
4 changes: 2 additions & 2 deletions frontend/components/utilities/attemptLogin.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import Aes256Gcm from "~/components/aes-256-gcm";
import Aes256Gcm from "~/components/utilities/cryptography/aes-256-gcm";
import login1 from "~/pages/api/auth/Login1";
import login2 from "~/pages/api/auth/Login2";
import getOrganizations from "~/pages/api/organization/getOrgs";
import getOrganizationUserProjects from "~/pages/api/organization/GetOrgUserProjects";

import { initPostHog } from "../analytics/posthog";
import { ENV } from "./config";
import pushKeys from "./pushKeys";
import pushKeys from "./secrets/pushKeys";
import SecurityClient from "./SecurityClient";

const nacl = require("tweetnacl");
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import changePassword2 from "~/pages/api/auth/ChangePassword2";
import SRP1 from "~/pages/api/auth/SRP1";

import Aes256Gcm from "../aes-256-gcm";
import Aes256Gcm from "./aes-256-gcm";

const nacl = require("tweetnacl");
nacl.util = require("tweetnacl-util");
Expand Down Expand Up @@ -63,6 +63,7 @@ const changePassword = async (
async () => {
clientNewPassword.createVerifier(
async (err, result) => {
// The Blob part here is needed to account for symbols that count as 2+ bytes (e.g., é, å, ø)
let { ciphertext, iv, tag } = Aes256Gcm.encrypt(
localStorage.getItem("PRIVATE_KEY"),
newPassword
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const nacl = require("tweetnacl");
nacl.util = require("tweetnacl-util");
const aes = require("../aes-256-gcm");
const aes = require("./aes-256-gcm");

/**
* Return assymmetrically encrypted [plaintext] using [publicKey] where
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import issueBackupPrivateKey from "~/pages/api/auth/IssueBackupPrivateKey";
import SRP1 from "~/pages/api/auth/SRP1";

import Aes256Gcm from "../aes-256-gcm";
import generateBackupPDF from "./generateBackupPDF";
import Aes256Gcm from "./aes-256-gcm";
import generateBackupPDF from "../generateBackupPDF";

const nacl = require("tweetnacl");
nacl.util = require("tweetnacl-util");
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import getSecrets from "~/pages/api/files/GetSecrets";

import guidGenerator from "./randomId";
import guidGenerator from "../randomId";

const {
decryptAssymmetric,
decryptSymmetric,
} = require("../../components/utilities/crypto");
} = require("../cryptography/crypto");
const nacl = require("tweetnacl");
nacl.util = require("tweetnacl-util");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const {
decryptSymmetric,
encryptSymmetric,
encryptAssymmetric,
} = require("../../components/utilities/crypto");
} = require("../cryptography/crypto");
const nacl = require("tweetnacl");
nacl.util = require("tweetnacl-util");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import publicKeyInfical from "~/pages/api/auth/publicKeyInfisical";
import changeHerokuConfigVars from "~/pages/api/integrations/ChangeHerokuConfigVars";

const crypto = require("crypto");
const { encryptSymmetric, encryptAssymmetric } = require("./crypto");
const { encryptSymmetric, encryptAssymmetric } = require("../cryptography/crypto");
const nacl = require("tweetnacl");
nacl.util = require("tweetnacl-util");

Expand Down
8 changes: 4 additions & 4 deletions frontend/pages/dashboard/[id].js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import BottonRightPopup from "~/components/basic/popups/BottomRightPopup";
import DashboardInputField from "~/components/dashboard/DashboardInputField";
import DropZone from "~/components/dashboard/DropZone";
import NavHeader from "~/components/navigation/NavHeader";
import getSecretsForProject from "~/utilities/getSecretsForProject";
import pushKeys from "~/utilities/pushKeys";
import pushKeysIntegration from "~/utilities/pushKeysIntegration";
import getSecretsForProject from "~/components/utilities/secrets/getSecretsForProject";
import pushKeys from "~/components/utilities/secrets/pushKeys";
import pushKeysIntegration from "~/components/utilities/secrets/pushKeysIntegration";
import guidGenerator from "~/utilities/randomId";

import getWorkspaceIntegrations from "../api/integrations/getWorkspaceIntegrations";
Expand Down Expand Up @@ -699,7 +699,7 @@ export default function Dashboard() {
data?.length > 8 ? "h-3/4" : "h-min"
}`}
>
<div className="sticky top-0 z-10 bg-bunker flex flex-row pl-4 pr-5 pt-4 pb-2 items-center justify-between text-gray-300 font-bold">
<div className="sticky top-0 z-40 bg-bunker flex flex-row pl-4 pr-5 pt-4 pb-2 items-center justify-between text-gray-300 font-bold">
{/* <FontAwesomeIcon icon={faAngleDown} /> */}
<div className="flex flex-row items-center">
<p className="pl-2 text-lg">
Expand Down
4 changes: 2 additions & 2 deletions frontend/pages/integrations/[id].js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import Button from "~/components/basic/buttons/Button";
import ListBox from "~/components/basic/Listbox";
import NavHeader from "~/components/navigation/NavHeader";
import getSecretsForProject from "~/utilities/getSecretsForProject";
import pushKeysIntegration from "~/utilities/pushKeysIntegration";
import getSecretsForProject from "~/components/utilities/secrets/getSecretsForProject";
import pushKeysIntegration from "~/components/utilities/secrets/pushKeysIntegration";
import guidGenerator from "~/utilities/randomId";

import deleteIntegration from "../api/integrations/DeleteIntegration";
Expand Down
4 changes: 2 additions & 2 deletions frontend/pages/settings/personal/[id].js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import Button from "~/components/basic/buttons/Button";
import InputField from "~/components/basic/InputField";
import NavHeader from "~/components/navigation/NavHeader";
import changePassword from "~/utilities/changePassword";
import changePassword from "~/components/utilities/cryptography/changePassword";
import passwordCheck from "~/utilities/checks/PasswordCheck";
import issueBackupKey from "~/utilities/issueBackupKey";
import issueBackupKey from "~/components/utilities/cryptography/issueBackupKey";

import getUser from "../../api/user/getUser";

Expand Down
4 changes: 2 additions & 2 deletions frontend/pages/signup.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import { useRouter } from "next/router";
import { faCheck, faWarning, faX } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";

import Aes256Gcm from "~/components/aes-256-gcm";
import Aes256Gcm from "~/components/utilities/cryptography/aes-256-gcm";
import Button from "~/components/basic/buttons/Button";
import Error from "~/components/basic/Error";
import InputField from "~/components/basic/InputField";
import attemptLogin from "~/utilities/attemptLogin";
import passwordCheck from "~/utilities/checks/PasswordCheck";
import issueBackupKey from "~/utilities/issueBackupKey";
import issueBackupKey from "~/components/utilities/cryptography/issueBackupKey";

import checkEmailVerificationCode from "./api/auth/CheckEmailVerificationCode";
import completeAccountInformationSignup from "./api/auth/CompleteAccountInformationSignup";
Expand Down
4 changes: 2 additions & 2 deletions frontend/pages/signupinvite.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import { useRouter } from "next/router";
import { faCheck, faWarning,faX } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";

import Aes256Gcm from "~/components/aes-256-gcm";
import Aes256Gcm from "~/components/utilities/cryptography/aes-256-gcm";
import Button from "~/components/basic/buttons/Button";
import InputField from "~/components/basic/InputField";
import attemptLogin from "~/utilities/attemptLogin";
import passwordCheck from "~/utilities/checks/PasswordCheck";
import issueBackupKey from "~/utilities/issueBackupKey";
import issueBackupKey from "~/components/utilities/cryptography/issueBackupKey";

import completeAccountInformationSignupInvite from "./api/auth/CompleteAccountInformationSignupInvite";
import verifySignupInvite from "./api/auth/VerifySignupInvite";
Expand Down
2 changes: 1 addition & 1 deletion frontend/pages/users/[id].js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const crypto = require("crypto");
const {
decryptAssymmetric,
encryptAssymmetric,
} = require("../../components/utilities/crypto");
} = require("../../components/utilities/cryptography/crypto");
const nacl = require("tweetnacl");
nacl.util = require("tweetnacl-util");

Expand Down

0 comments on commit c108949

Please sign in to comment.