Skip to content

Commit 3da7a37

Browse files
authored
Merge pull request #34 from Cosmian/feat/update_sales
feat: update sales
2 parents 6703859 + 6599517 commit 3da7a37

14 files changed

+287
-147
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
export const BACKEND_URL = import.meta.env.VITE_KMS_URL as string;
2-
export const MSE_APP_URL = import.meta.env.VITE_CONFIDENTIAL_SERVICE_URL as string;
2+
export const RUNNER_URL = import.meta.env.VITE_CONFIDENTIAL_SERVICE_URL as string;

public/actions/javascript/sendDocumentContent.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { MSE_APP_URL } from "./backendConfig";
1+
import { RUNNER_URL } from "./backendConfig"
22

33
export const summarizeDocumentContent = async (textInput: string): Promise<{ summary: string } | Error> => {
44
const formData = new FormData();
55
formData.append("doc", textInput);
6-
const response = await fetch(`${MSE_APP_URL}/summarize`, {
6+
const response = await fetch(`${RUNNER_URL}/summarize`, {
77
method: "POST",
88
body: formData,
99
});

public/actions/javascript/sendEncryptedDocument.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import aes from "js-crypto-aes";
2-
import { MSE_APP_URL } from "./backendConfig";
1+
import aes from "js-crypto-aes"
2+
import { RUNNER_URL } from "./backendConfig"
33

44
export const sendEncryptedDocument = async (
55
textInput: Uint8Array,
@@ -13,7 +13,7 @@ export const sendEncryptedDocument = async (
1313
formData.append("key_id", keyUid);
1414
formData.append("nonce", btoa(String.fromCodePoint(...iv)));
1515
formData.append("encrypted_doc", new Blob([encryptedText]), "text.doc");
16-
const response = await fetch(`${MSE_APP_URL}/kms_summarize`, {
16+
const response = await fetch(`${RUNNER_URL}/kms_summarize`, {
1717
method: "POST",
1818
body: formData,
1919
});

public/actions/javascript/summarizeDocumentContent.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { MSE_APP_URL } from "./backendConfig";
1+
import { RUNNER_URL } from "./backendConfig"
22

33
export const summarizeDocumentContent = async (textInput: string, userToken: string): Promise<{ summary: string } | Error> => {
44
const formData = new FormData();
55
formData.append("doc", textInput);
6-
const response = await fetch(`${MSE_APP_URL}/summarize`, {
6+
const response = await fetch(`${RUNNER_URL}/summarize`, {
77
method: "POST",
88
headers: {
99
Authorization: "Bearer " + userToken,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
export const BACKEND_URL = import.meta.env.VITE_KMS_URL as string;
2-
export const MSE_APP_URL = import.meta.env.VITE_CONFIDENTIAL_SERVICE_URL as string;
2+
export const RUNNER_URL = import.meta.env.VITE_CONFIDENTIAL_SERVICE_URL as string;

src/actions/javascript/summarizeDocumentContent.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { MSE_APP_URL } from "./backendConfig";
1+
import { RUNNER_URL } from "./backendConfig"
22

33
export const summarizeDocumentContent = async (textInput: string, userToken: string): Promise<{ summary: string } | Error> => {
44
const formData = new FormData();
55
formData.append("doc", textInput);
6-
const response = await fetch(`${MSE_APP_URL}/summarize`, {
6+
const response = await fetch(`${RUNNER_URL}/summarize`, {
77
method: "POST",
88
headers: {
99
Authorization: "Bearer " + userToken,

src/assets/cse_schema.drawio.svg

Lines changed: 4 additions & 0 deletions
Loading

src/assets/google_cse_architecture.drawio.svg

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/component/layout.less

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,9 @@ ul {
184184
font-size: 1rem;
185185
}
186186
}
187+
.code-cmd {
188+
margin: 10px 0px 20px 20px;
189+
}
187190
.single-content .introduction,
188191
.content .introduction {
189192
font-family: "Montserrat", Arial, Helvetica, sans-serif;

src/pages/cse/AboutCse.tsx

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { Link } from "react-router-dom";
2-
import GoogleCse from "../../assets/google_cse_architecture.drawio.svg";
3-
import { ImageWrapper, SingleContent } from "../../component/Layout";
4-
import { useBoundStore } from "../../store/store";
5-
import { findCurrentNavigationItem } from "../../utils/navigationActions";
1+
import { Link } from "react-router-dom"
2+
import CseSchema from "../../assets/cse_schema.drawio.svg"
3+
import { ImageWrapper, SingleContent } from "../../component/Layout"
4+
import { useBoundStore } from "../../store/store"
5+
import { findCurrentNavigationItem } from "../../utils/navigationActions"
66

77
const AboutCse = (): JSX.Element => {
88
const steps = useBoundStore((state) => state.steps);
@@ -14,16 +14,22 @@ const AboutCse = (): JSX.Element => {
1414
<p className="introduction">
1515
Using Google{" "}
1616
<Link to="https://support.google.com/a/answer/10741897" target="_blank" rel="noopener noreferrer">
17-
client-side encryption
17+
CSE
1818
</Link>
19-
, we show how to summarize or translate an encrypted document, using Cosmian AI.
19+
{" "}(client-side encryption) or Microsoft{" "}
20+
<Link to="https://learn.microsoft.com/en-us/purview/double-key-encryption" target="_blank" rel="noopener noreferrer">
21+
DKE
22+
</Link>
23+
{" "}(double key encryption), together with Cosmian KMS, you can work with client-side encrypted documents.
24+
</p>
25+
<p>
26+
When configured on workplace applications - client-side encryption uses <b>Cosmian KMS</b> to handle encryption operations.
2027
</p>
2128
<p>
22-
Text content is parsed in the browser (using Cosmian AI dedicated Chrome extension) and sent to the runner AI, which is in a Cosmian
23-
VM (verifiabled TEE), using TLS connexion.
29+
<b>Cosmian AI</b> restores some AI functionalities without compromising security: text content is parsed directly in the browser via Cosmian AI’s dedicated Chrome extension, then securely sent to the AI runner within a Cosmian VM (verifiable TEE) over a TLS connection.
2430
</p>
25-
<ImageWrapper maxWidth={800}>
26-
<img src={GoogleCse} alt="Google CSE architecture" width="100%" />
31+
<ImageWrapper maxWidth={600} style={{marginTop: "50px"}}>
32+
<img src={CseSchema} alt="Global CSE architecture" width="100%" />
2733
</ImageWrapper>
2834
</SingleContent>
2935
);

src/pages/cse/ConfigureCse.tsx

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
import { useEffect } from "react"
2+
import { Link } from "react-router-dom"
3+
import Split from "../../component/Split"
4+
import { useBoundStore } from "../../store/store"
5+
import { findCurrentNavigationItem, updateNavigationSteps } from "../../utils/navigationActions"
6+
7+
const ConfigureCse = (): JSX.Element => {
8+
const { steps, setSteps } = useBoundStore((state) => state);
9+
const currentItem = findCurrentNavigationItem(steps);
10+
11+
useEffect(() => {
12+
return () => {
13+
updateNavigationSteps(steps, setSteps);
14+
};
15+
}, []);
16+
17+
return (
18+
<Split>
19+
<Split.Content>
20+
<h1>{currentItem?.label}</h1>
21+
<p>
22+
<Link to="https://cosmian.com/data-protection-suite/cosmian-kms/" target="_blank" rel="noopener noreferrer">
23+
Cosmian KMS
24+
</Link> (key management server) is compatible with Google Workspace client-side encryption.</p>
25+
<p>Using this feature, users from an organization can encrypt files and documents, in their browsers, before sending them to Google servers. The ephemeral encryption keys are protected by “key wrapping keys”, stored in the KMS and unavailable to Google. Only users that have the right to unwrap the ephemeral encryption keys inside the KMS, can decrypt the files. An overview is provided in Google’s{" "}
26+
<Link to="https://apps.google.com/supportwidget/articlehome?hl=en&article_url=https%3A%2F%2Fsupport.google.com%2Fa%2Fanswer%2F10741897%3Fhl%3Den&assistant_id=generic-unu&product_context=10741897&product_name=UnuFlow&trigger_context=a" target="_blank" rel="noopener noreferrer">
27+
About client-side encryption
28+
</Link> page.
29+
</p>
30+
<p>
31+
Enable CSE from Google Workspace client-side encryption page of the admin console.
32+
</p>
33+
<p>Configuration steps:</p>
34+
<ul>
35+
<li>Choose and configure an <b>Identity Provider</b></li>
36+
<li>Instantiate and configure a <b>Key Management Server</b> (Cosmian KMS)</li>
37+
<li>Generate <b><i>google_cse</i> key</b> from the KMS</li>
38+
<div className="code-cmd">
39+
<code>
40+
{GOOGLE_CSE_KEY}
41+
</code>
42+
<br />
43+
<code>
44+
{GOOGLE_CSE_GRANT}
45+
</code>
46+
</div>
47+
<li>Handle <b>guest Identity Providers</b> for external users <i>(optional)</i></li>
48+
<li>Generate <b>Gmail S/MIME</b> elements: users key-pairs and identities <i>(optional)</i></li>
49+
<div className="code-cmd">
50+
<code>
51+
{GOOGLE_CSE_SMIME_KEYPAIR}
52+
</code>
53+
< br/>
54+
<code>
55+
{GOOGLE_CSE_SMIME_IDENTITY}
56+
</code>
57+
</div>
58+
</ul>
59+
</Split.Content>
60+
</Split>
61+
);
62+
};
63+
64+
export default ConfigureCse;
65+
66+
67+
const GOOGLE_CSE_KEY = "> ckms sym keys create -t google_cse google_cse";
68+
69+
const GOOGLE_CSE_GRANT = "> ckms access-rights grant USER_ID google_cse get encrypt decrypt";
70+
71+
const GOOGLE_CSE_SMIME_KEYPAIR = "> ckms google key-pairs create --cse-key-id CSE_KEY_ID --subject-name \"C=FR, ST=IdF, L=Paris, O=YOUR_ORGANIZATION, OU=DEPARTMENT, CN=user@your_organization.com, emailAddress=user@your_organization.com\" -i ISSUER_PRIVATE_KEY_ID user@your_organization.com";
72+
73+
const GOOGLE_CSE_SMIME_IDENTITY = "> ckms google identities insert --user-id user@your_organization.com CREATED_KEYPAIR_ID";

src/pages/cse/ConfigureDke.tsx

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import { Link } from "react-router-dom"
2+
import Split from "../../component/Split"
3+
import { useBoundStore } from "../../store/store"
4+
import { findCurrentNavigationItem } from "../../utils/navigationActions"
5+
6+
const ConfigureDke = (): JSX.Element => {
7+
const { steps } = useBoundStore((state) => state);
8+
const currentItem = findCurrentNavigationItem(steps);
9+
10+
return (
11+
<Split>
12+
<Split.Content>
13+
<h1>{currentItem?.label}</h1>
14+
<p>Cosmian KMS (key management server) is compatible with Microsoft double key encryption.</p>
15+
<p>
16+
Microsoft DKE is a feature of Microsoft 365 that allows you to protect your most sensitive data by encrypting data on the client computer before sending it to Microsoft servers. One of the keys used to encrypt remains under your control and makes the data unreadable by Microsoft. This key is kept inside your instance of <Link to="https://cosmian.com/data-protection-suite/cosmian-kms/" target="_blank" rel="noopener noreferrer">
17+
Cosmian KMS.
18+
</Link>
19+
</p>
20+
<p>
21+
Once DKE is configured, the whole process consists in assigning a specific sensitivity label to a document. The label will indicate that the document is encrypted and that the key to decrypt it is stored in your Cosmian KMS.
22+
Please check the dedicated <Link to="https://learn.microsoft.com/en-us/purview/double-key-encryption" target="_blank" rel="noopener noreferrer">
23+
Microsoft documentation
24+
</Link> for a complete overview of the feature.
25+
</p>
26+
<p>The DKE feature is currently only available for the Office Windows clients.</p>
27+
<p>Configuration steps:</p>
28+
<ul>
29+
<li>Configure Microsoft DKE in Purview and create a sensitivity label for encryption</li>
30+
<li>Instantiate and configure Cosmian <b>Key Management Server</b> (Cosmian KMS)</li>
31+
<li>Generate <b>RSA key</b> with tag <i>dke_key</i></li>
32+
<div className="code-cmd">
33+
<code>
34+
{DKE_KEY}
35+
</code>
36+
</div>
37+
</ul>
38+
</Split.Content>
39+
</Split>
40+
);
41+
};
42+
43+
export default ConfigureDke;
44+
45+
const DKE_KEY = "> ckms rsa keys create --tag dke_key --size_in_bits 2048";

src/pages/cse/SetupCse.tsx renamed to src/pages/cse/SetupAiRunner.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { CheckCircleOutlined } from "@ant-design/icons";
2-
import { Button } from "cosmian_ui";
3-
import { useNavigate } from "react-router-dom";
4-
import { CodeBackground, VmCode } from "../../component/Code";
5-
import Split from "../../component/Split";
6-
import { useBoundStore, useCseStore } from "../../store/store";
7-
import { findCurrentNavigationItem, updateNavigationSteps } from "../../utils/navigationActions";
1+
import { CheckCircleOutlined } from "@ant-design/icons"
2+
import { Button } from "cosmian_ui"
3+
import { useNavigate } from "react-router-dom"
4+
import { CodeBackground, VmCode } from "../../component/Code"
5+
import Split from "../../component/Split"
6+
import { useBoundStore, useCseStore } from "../../store/store"
7+
import { findCurrentNavigationItem, updateNavigationSteps } from "../../utils/navigationActions"
88

9-
const SetupCse = (): JSX.Element => {
9+
const SetupAiRunner = (): JSX.Element => {
1010
const { integrity, setIntegrity } = useCseStore((state) => state);
1111
const { steps, setSteps } = useBoundStore((state) => state);
1212
const navigate = useNavigate();
@@ -43,9 +43,9 @@ const SetupCse = (): JSX.Element => {
4343
);
4444
};
4545

46-
export default SetupCse;
46+
export default SetupAiRunner;
4747

48-
const INTEGRITY = `$ ./cosmian_vm verify --url MSE_APP_URL --snapshot cosmian_vm.snapshot
48+
const INTEGRITY = `$ ./cosmian_vm verify --url RUNNER_URL --snapshot cosmian_vm.snapshot
4949
Fetching the collaterals...
5050
[ OK ] Verifying VM integrity
5151
[ OK ] Verifying TPM attestation

0 commit comments

Comments
 (0)