Skip to content

Commit 5c1b85b

Browse files
authored
chore: replace references to CSFLE with “In-Use Encryption” COMPASS-5829 (#3105)
1 parent 4b5bad9 commit 5c1b85b

File tree

10 files changed

+29
-21
lines changed

10 files changed

+29
-21
lines changed

packages/compass-components/src/components/document-list/document.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ describe('Document', function () {
150150
};
151151
doc = new HadronDocument(obj);
152152
render(<Document value={doc}></Document>);
153-
expect(screen.getAllByTitle('Encrypted with CSFLE')).to.have.lengthOf(2);
153+
expect(screen.getAllByTitle('Encrypted Field')).to.have.lengthOf(2);
154154
});
155155

156156
it('should allow editing the null value (COMPASS-5697)', function () {

packages/compass-components/src/components/document-list/element.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ export const HadronElement: React.FunctionComponent<{
486486
value.decrypted && (
487487
<span
488488
data-test-id="hadron-document-element-decrypted-icon"
489-
title="Encrypted with CSFLE"
489+
title="Encrypted Field"
490490
>
491491
<Icon glyph="Key" size="small" />
492492
</span>

packages/compass-crud/src/components/insert-csfle-warning-banner.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function InsertCSFLEWarningBanner({ csfleState }) {
2222
return (
2323
<Banner variant={BannerVariant.Warning}>
2424
This insert operation will not encrypt any document fields because
25-
no schema or CSFLE configuration is associated with the collection.
25+
no schema or In-Use Encryption configuration is associated with the collection.
2626
</Banner>
2727
);
2828

@@ -40,7 +40,7 @@ function InsertCSFLEWarningBanner({ csfleState }) {
4040
return (
4141
<Banner variant={BannerVariant.Info}>
4242
This insert operation will encrypt all fields that are specified in the schema
43-
or CSFLE configuration associated with the collection.
43+
or In-Use Encryption configuration associated with the collection.
4444

4545
{fieldsNotice}
4646
</Banner>
@@ -50,7 +50,7 @@ function InsertCSFLEWarningBanner({ csfleState }) {
5050
return (
5151
<Banner variant={BannerVariant.Warning}>
5252
This insert operation will not encrypt any document fields because
53-
CSFLE support was explicitly disabled.
53+
In-Use Encryption support was explicitly disabled.
5454
</Banner>
5555
);
5656

packages/compass-crud/src/components/table-view/cell-renderer.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ class CellRenderer extends React.Component {
207207
this.props.value.decrypted && (
208208
<span
209209
data-test-id="hadron-document-element-decrypted-icon"
210-
title="Encrypted with CSFLE"
210+
title="Encrypted Field"
211211
>
212212
<Icon glyph="Key" size="small" />
213213
</span>

packages/compass-sidebar/src/components/csfle-connection-modal/csfle-connection-modal.jsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ const csfleBannerStyles = css({
2222
function CSFLEConnectionModal({ csfleMode, open, setOpen, setConnectionIsCSFLEEnabled }) {
2323
return (<Modal
2424
open={open}
25-
title="Client-Side Field-Level Encryption"
25+
title="In-Use Encryption"
2626
trackingId="csfle_connection_modal"
2727
setOpen={setOpen}
2828
>
2929
<div>
30-
<ModalTitle>CSFLE Connection Options</ModalTitle>
30+
<ModalTitle>In-Use Encryption Connection Options</ModalTitle>
3131
<Body>
32-
This connection is configured with Client-Side Field-Level Encryption enabled.
32+
This connection is configured with In-Use Encryption enabled.
3333
</Body>
3434
<div className={toggleContainerStyles}>
3535
<Toggle
@@ -47,18 +47,19 @@ function CSFLEConnectionModal({ csfleMode, open, setOpen, setConnectionIsCSFLEEn
4747
id="set-csfle-enabled-label"
4848
htmlFor="set-csfle-enabled"
4949
>
50-
Enable CSFLE for this connection
50+
Enable In-Use Encryption for this connection
5151
</Label>
5252
</div>
5353
<Description>
54-
Disabling CSFLE only affects how Compass accesses data.
54+
Disabling In-Use Encryption only affects how Compass accesses data.
5555
In order to make Compass forget KMS credentials, the
5656
connection must be fully closed.
5757
</Description>
5858
</div>
5959
<Banner className={csfleBannerStyles}>
60-
Client-side Field-Level Encryption is an Enterprise/Atlas-only feature
60+
In-Use Encryption is an Enterprise/Atlas-only feature
6161
of MongoDB.&nbsp;
62+
{/* TODO(COMPASS-5777): Use generic In-Use Encryption documentation URL instead of FLE1-specific one */}
6263
<Link href="https://www.mongodb.com/docs/drivers/security/client-side-field-level-encryption-guide/">
6364
Learn More
6465
</Link>

packages/compass-sidebar/src/components/csfle-marker/csfle-marker.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ function CSFLEMarker({ csfleMode, toggleCSFLEModalVisible }) {
3434
const buttonProps = mergeProps(
3535
{
3636
type: 'button',
37-
'aria-label': 'Open connection CSFLE configuration',
38-
title: 'Connection CSFLE configuration',
37+
'aria-label': 'Open connection In-Use Encryption configuration',
38+
title: 'Connection In-Use Encryption configuration',
3939
className: badgeButtonStyles,
4040
onClick: () => toggleCSFLEModalVisible()
4141
},
@@ -47,7 +47,7 @@ function CSFLEMarker({ csfleMode, toggleCSFLEModalVisible }) {
4747
<button {...buttonProps}>
4848
<Badge variant={csfleMode === 'enabled' ? BadgeVariant.DarkGray : BadgeVariant.LightGray}>
4949
<Icon glyph="Key" />
50-
CSFLE
50+
In-Use Encryption
5151
</Badge>
5252
</button>
5353
</div>

packages/connection-form/src/components/advanced-options-tabs/advanced-options-tabs.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ function AdvancedOptionsTabs({
7777

7878
if (csfleFeatureFlag) {
7979
// Add before advanced
80-
tabs.splice(-1, 0, { name: 'CSFLE', id: 'csfle', component: CSFLETab });
80+
tabs.splice(-1, 0, {
81+
name: 'In-Use Encryption',
82+
id: 'csfle',
83+
component: CSFLETab,
84+
});
8185
// TODO(COMPASS-5634): Figure out the exact spacing properties
8286
// for fitting all the tabs in here.
8387
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion

packages/connection-form/src/components/advanced-options-tabs/csfle-tab/csfle-tab.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ function CSFLETab({
117117
return (
118118
<div className={containerStyles}>
119119
<Banner>
120-
Client-side Field-Level Encryption is an Enterprise/Atlas-only feature
121-
of MongoDB.&nbsp;
120+
In-Use Encryption is an Enterprise/Atlas-only feature of MongoDB.&nbsp;
121+
{/* TODO(COMPASS-5777): Use generic In-Use Encryption documentation URL instead of FLE1-specific one */}
122122
<Link href="https://www.mongodb.com/docs/drivers/security/client-side-field-level-encryption-guide/">
123123
Learn More
124124
</Link>

packages/connection-form/src/components/connect-form.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ import { useConnectForm } from '../hooks/use-connect-form';
2727
import { validateConnectionOptionsErrors } from '../utils/validation';
2828
import SaveConnectionModal from './save-connection-modal';
2929

30+
const csfleFeatureFlag = process?.env?.COMPASS_CSFLE_SUPPORT === 'true';
31+
3032
const formContainerStyles = css({
3133
margin: 0,
3234
padding: 0,
3335
height: 'fit-content',
34-
width: spacing[6] * 10,
36+
width: spacing[6] * 10 + (csfleFeatureFlag ? 2 : 0),
3537
position: 'relative',
3638
display: 'inline-block',
3739
});

packages/connection-form/src/utils/validation.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ function validateCSFLEErrors(
292292
fieldTab: 'csfle',
293293
fieldName: 'keyVaultNamespace',
294294
message:
295-
'Key Vault namespace must be specified for CSFLE-enabled connections',
295+
'Key Vault namespace must be specified for In-Use-Encryption-enabled connections',
296296
});
297297
}
298298
const kmsProviders = autoEncryptionOptions.kmsProviders ?? {};
@@ -363,7 +363,8 @@ function validateCSFLEWarnings(
363363
const warnings: ConnectionFormWarning[] = [];
364364
if (connectionOptions.fleOptions?.storeCredentials) {
365365
warnings.push({
366-
message: 'CSFLE KMS provider credentials will be stored to disk.',
366+
message:
367+
'In-Use Encryption KMS provider credentials will be stored to disk.',
367368
});
368369
}
369370

0 commit comments

Comments
 (0)